@llmnative/react 1.43.0 → 1.45.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.
package/dist/index.mjs CHANGED
@@ -2808,6 +2808,10 @@ var Pn = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10
2808
2808
  reorderRow: "Reorder row {key}"
2809
2809
  },
2810
2810
  gallery: { selectItem: "Select item {key}" },
2811
+ sortableList: {
2812
+ handle: "Move item {position} of {total}: drag it, or use the up and down arrows",
2813
+ moved: "Moved to position {position} of {total}"
2814
+ },
2811
2815
  crop: {
2812
2816
  enableCrop: "Click {scale} to enable this crop",
2813
2817
  variants: "Variants",
@@ -4284,7 +4288,7 @@ var Hi = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
4284
4288
  }))
4285
4289
  }, e);
4286
4290
  }, sa = ({ menuKey: e, as: t = "ul", badges: n = {}, before: r = void 0, after: i = void 0, wrapperClassName: a = void 0, className: o = void 0, headerClassName: s = void 0, itemClassName: c = void 0, linkClassName: l = void 0, iconClassName: u = void 0, textClassName: d = void 0, badgeClassName: p = void 0, arrowClassName: m = void 0, submenuClassName: h = void 0 }) => {
4287
- let g = zv(e), _ = J("menu"), v = ({ item: e, index: r }) => {
4291
+ let g = Vv(e), _ = J("menu"), v = ({ item: e, index: r }) => {
4288
4292
  let [i, a] = E(e.active);
4289
4293
  b(() => {
4290
4294
  a(e.active);
@@ -11136,6 +11140,7 @@ var vd = (e) => {
11136
11140
  }
11137
11141
  return [...t].map(([e, t]) => ({
11138
11142
  group: e,
11143
+ badge: t.find((e) => e.groupBadge)?.groupBadge,
11139
11144
  options: t
11140
11145
  }));
11141
11146
  }, yd = (e) => e === 0 ? "0" : String(Number(e < .01 ? e.toPrecision(2) : e.toFixed(e < 1 ? 3 : 2))), bd = (e) => !!(e.pricing && e.pricing.input === 0 && e.pricing.output === 0), xd = "h-7 w-7 cursor-pointer rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", Sd = "sticky -top-1 z-10 -mx-1 border-b border-border/60 bg-popover px-3 py-1.5 text-xs font-medium uppercase tracking-wide text-muted-foreground", Cd = "gap-3", wd = "gap-3 bg-success/10 hover:bg-success/20 focus:bg-success/20", Td = "ml-auto shrink-0 whitespace-nowrap text-xs tabular-nums text-muted-foreground", Ed = "ml-auto shrink-0 whitespace-nowrap text-xs italic text-warning", Dd = "h-7 max-w-[140px] rounded-md px-2 text-xs gap-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground truncate", Od = "w-full resize-none border-0 bg-transparent px-4 py-3 text-sm shadow-none outline-none focus-visible:ring-0 placeholder:text-muted-foreground";
@@ -11196,7 +11201,7 @@ function Ad({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
11196
11201
  }
11197
11202
  t.replace(t.triggerRange.start, t.triggerRange.end, `${t.trigger}${n.name} `);
11198
11203
  }
11199
- }, [ge]), ye = kd(p), be = () => {
11204
+ }, [ge]), ye = d.find((e) => e.value === p)?.label ?? kd(p), be = () => {
11200
11205
  o || i || (s({
11201
11206
  text: t,
11202
11207
  files: L.map((e) => e.file),
@@ -11311,7 +11316,7 @@ function Ad({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
11311
11316
  placement: "top",
11312
11317
  position: "start",
11313
11318
  triggerClassName: Dd
11314
- }, vd(d).map(({ group: e, options: t }) => /* @__PURE__ */ f.createElement(f.Fragment, { key: e ?? "" }, e !== void 0 && /* @__PURE__ */ f.createElement(pa, { className: Sd }, e), t.map((e) => /* @__PURE__ */ f.createElement(fa, {
11319
+ }, vd(d).map(({ group: e, badge: t, options: n }) => /* @__PURE__ */ f.createElement(f.Fragment, { key: e ?? "" }, e !== void 0 && /* @__PURE__ */ f.createElement(pa, { className: Sd }, t ? /* @__PURE__ */ f.createElement("span", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ f.createElement("span", { className: "min-w-0 truncate" }, e), /* @__PURE__ */ f.createElement(pr, { variant: t.variant ?? "light" }, t.label)) : e), n.map((e) => /* @__PURE__ */ f.createElement(fa, {
11315
11320
  key: e.value,
11316
11321
  onClick: () => m?.(e.value),
11317
11322
  className: bd(e) ? wd : e.pricing === void 0 ? void 0 : Cd
@@ -15168,7 +15173,7 @@ function Bp({ columns: e = void 0, records: t = void 0, footer: n = void 0, onRo
15168
15173
  width: "1%",
15169
15174
  whiteSpace: "nowrap"
15170
15175
  }
15171
- }))), Pe = /* @__PURE__ */ f.createElement(sg, {
15176
+ }))), Pe = /* @__PURE__ */ f.createElement(lg, {
15172
15177
  records: xe,
15173
15178
  appendTo: ee,
15174
15179
  wrapperClassName: "px-3 pt-4 pb-2",
@@ -16016,9 +16021,90 @@ function hm({ title: e = void 0, description: t = void 0, meta: n = void 0, badg
16016
16021
  }, z), /* @__PURE__ */ f.createElement(Z, { className: X(N.ListCard.wrapperClassName, y) }, _, V, v);
16017
16022
  }
16018
16023
  //#endregion
16024
+ //#region src/components/blocks/SortableList.tsx
16025
+ function gm(e, t, n) {
16026
+ let r = [...e], [i] = r.splice(t, 1);
16027
+ return r.splice(Math.max(0, Math.min(n, r.length)), 0, i), r;
16028
+ }
16029
+ function _m({ items: e, getKey: t, renderItem: n, onReorder: r = void 0, label: i = void 0, numbered: a = !1, disabled: o = !1, emptyState: s = void 0, className: c = void 0, itemClassName: l = void 0, cardClassName: u = void 0 }) {
16030
+ let d = Y("sortableList"), [p, m] = E(null), [h, g] = E(null), [_, v] = E(""), y = !o && !!r && e.length > 1;
16031
+ if (!e.length) return s ? /* @__PURE__ */ f.createElement(f.Fragment, null, s) : null;
16032
+ let b = (t, n) => {
16033
+ !r || t === n || n < 0 || n >= e.length || (r(gm(e, t, n), {
16034
+ fromIndex: t,
16035
+ toIndex: n,
16036
+ item: e[t]
16037
+ }), v(Vn(d.moved, {
16038
+ position: n + 1,
16039
+ total: e.length
16040
+ })));
16041
+ }, x = (e) => {
16042
+ if (p === null || !h) return;
16043
+ let t = h.after ? e + 1 : e;
16044
+ b(p, t > p ? t - 1 : t), m(null), g(null);
16045
+ };
16046
+ return /* @__PURE__ */ f.createElement("div", { className: c }, /* @__PURE__ */ f.createElement("ul", {
16047
+ className: "flex flex-col gap-2",
16048
+ "aria-label": i
16049
+ }, e.map((r, i) => {
16050
+ let o = n(r, i), s = h?.index === i && p !== null && p !== i;
16051
+ return /* @__PURE__ */ f.createElement("li", {
16052
+ key: t(r),
16053
+ className: X("relative flex items-stretch gap-2", p === i && "opacity-50", l),
16054
+ onDragOver: (e) => {
16055
+ if (!y || p === null) return;
16056
+ e.preventDefault();
16057
+ let t = e.currentTarget.getBoundingClientRect();
16058
+ g({
16059
+ index: i,
16060
+ after: e.clientY > t.top + t.height / 2
16061
+ });
16062
+ },
16063
+ onDragLeave: () => g((e) => e?.index === i ? null : e),
16064
+ onDrop: (e) => {
16065
+ y && (e.preventDefault(), x(i));
16066
+ }
16067
+ }, s && /* @__PURE__ */ f.createElement("span", {
16068
+ "aria-hidden": "true",
16069
+ className: X("pointer-events-none absolute inset-x-0 h-0.5 rounded-full bg-primary", h.after ? "-bottom-1.5" : "-top-1.5")
16070
+ }), y && /* @__PURE__ */ f.createElement("button", {
16071
+ type: "button",
16072
+ draggable: !0,
16073
+ "aria-label": Vn(d.handle, {
16074
+ position: i + 1,
16075
+ total: e.length
16076
+ }),
16077
+ className: "flex w-6 shrink-0 cursor-grab items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",
16078
+ onDragStart: (e) => {
16079
+ m(i), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t(r));
16080
+ },
16081
+ onDragEnd: () => {
16082
+ m(null), g(null);
16083
+ },
16084
+ onKeyDown: (e) => {
16085
+ e.key === "ArrowUp" ? (e.preventDefault(), b(i, i - 1)) : e.key === "ArrowDown" && (e.preventDefault(), b(i, i + 1));
16086
+ }
16087
+ }, /* @__PURE__ */ f.createElement(Q, {
16088
+ name: "grip-vertical",
16089
+ size: 16
16090
+ })), a && /* @__PURE__ */ f.createElement("span", {
16091
+ className: "flex w-6 shrink-0 items-center justify-center text-sm font-medium tabular-nums text-muted-foreground",
16092
+ "aria-hidden": "true"
16093
+ }, i + 1), /* @__PURE__ */ f.createElement(hm, {
16094
+ compact: !0,
16095
+ wrapperClassName: "min-w-0 flex-1",
16096
+ className: u,
16097
+ ...o
16098
+ }));
16099
+ })), /* @__PURE__ */ f.createElement("span", {
16100
+ className: "sr-only",
16101
+ "aria-live": "polite"
16102
+ }, _));
16103
+ }
16104
+ //#endregion
16019
16105
  //#region src/components/blocks/SideNav.tsx
16020
- var gm = 208, _m = 52;
16021
- function vm(e) {
16106
+ var vm = 208, ym = 52;
16107
+ function bm(e) {
16022
16108
  return e.map((e) => ({
16023
16109
  path: e.path,
16024
16110
  title: e.title,
@@ -16026,13 +16112,13 @@ function vm(e) {
16026
16112
  group: e.group,
16027
16113
  end: e.end,
16028
16114
  badge: e.badge,
16029
- children: e.children ? vm(e.children) : void 0
16115
+ children: e.children ? bm(e.children) : void 0
16030
16116
  }));
16031
16117
  }
16032
- function ym(e, t, n) {
16118
+ function xm(e, t, n) {
16033
16119
  return n ? e === t : e === t || t !== "/" && e.startsWith(t + "/");
16034
16120
  }
16035
- function bm(e) {
16121
+ function Sm(e) {
16036
16122
  let t = /* @__PURE__ */ new Map();
16037
16123
  for (let n of e) {
16038
16124
  let e = n.group ?? "General";
@@ -16043,28 +16129,28 @@ function bm(e) {
16043
16129
  items: t
16044
16130
  }));
16045
16131
  }
16046
- function xm({ value: e }) {
16132
+ function Cm({ value: e }) {
16047
16133
  let t = J("sideNav");
16048
16134
  return /* @__PURE__ */ f.createElement("span", { className: X("ml-auto shrink-0 text-[10px] font-semibold leading-none px-1.5 py-[3px] rounded-full bg-primary/15 text-primary", t.SideNav.itemBadgeClassName) }, e);
16049
16135
  }
16050
- function Sm({ children: e, open: t }) {
16136
+ function wm({ children: e, open: t }) {
16051
16137
  let { pathname: n } = M(), r = J("sideNav");
16052
16138
  return /* @__PURE__ */ f.createElement("div", { style: {
16053
16139
  maxHeight: t ? `${e.length * 34 + 8}px` : "0px",
16054
16140
  overflow: "hidden",
16055
16141
  transition: "max-height 200ms ease"
16056
16142
  } }, /* @__PURE__ */ f.createElement("div", { className: "py-0.5 space-y-0.5" }, e.map((e) => {
16057
- let t = ym(n, e.path, e.end);
16143
+ let t = xm(n, e.path, e.end);
16058
16144
  return /* @__PURE__ */ f.createElement(k, {
16059
16145
  key: e.path,
16060
16146
  to: e.path,
16061
16147
  "aria-current": t ? "page" : void 0,
16062
16148
  className: X("flex items-center rounded-md pl-9 pr-3 py-[6px] text-sm transition-colors", r.SideNav.subItemClassName, t ? r.SideNav.subItemActiveClassName : r.SideNav.subItemInactiveClassName)
16063
- }, /* @__PURE__ */ f.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ f.createElement(xm, { value: e.badge }));
16149
+ }, /* @__PURE__ */ f.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ f.createElement(Cm, { value: e.badge }));
16064
16150
  })));
16065
16151
  }
16066
- function Cm({ item: e, expanded: t, open: n, showIcons: r, onToggle: i }) {
16067
- let { pathname: a } = M(), o = J("sideNav"), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = ym(a, e.path, e.end), u = c && e.children.some((e) => ym(a, e.path, e.end)), d = l ? o.SideNav.itemActiveClassName : u ? o.SideNav.itemChildActiveClassName : o.SideNav.itemInactiveClassName, p = r ? /* @__PURE__ */ f.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", o.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ f.createElement(Q, {
16152
+ function Tm({ item: e, expanded: t, open: n, showIcons: r, onToggle: i }) {
16153
+ let { pathname: a } = M(), o = J("sideNav"), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = xm(a, e.path, e.end), u = c && e.children.some((e) => xm(a, e.path, e.end)), d = l ? o.SideNav.itemActiveClassName : u ? o.SideNav.itemChildActiveClassName : o.SideNav.itemInactiveClassName, p = r ? /* @__PURE__ */ f.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", o.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ f.createElement(Q, {
16068
16154
  name: e.icon,
16069
16155
  size: 17
16070
16156
  }) : /* @__PURE__ */ f.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-current opacity-30" }), !t && e.badge !== void 0 && /* @__PURE__ */ f.createElement("span", { className: X("absolute -top-0.5 -right-1 w-[7px] h-[7px] rounded-full bg-primary ring-1 ring-background", o.SideNav.itemCollapsedBadgeClassName) })) : null, m = {
@@ -16082,7 +16168,7 @@ function Cm({ item: e, expanded: t, open: n, showIcons: r, onToggle: i }) {
16082
16168
  }, p, /* @__PURE__ */ f.createElement("span", {
16083
16169
  style: m,
16084
16170
  className: o.SideNav.itemTextClassName
16085
- }, e.title), t && e.badge !== void 0 && /* @__PURE__ */ f.createElement(xm, { value: e.badge })), t && /* @__PURE__ */ f.createElement("button", {
16171
+ }, e.title), t && e.badge !== void 0 && /* @__PURE__ */ f.createElement(Cm, { value: e.badge })), t && /* @__PURE__ */ f.createElement("button", {
16086
16172
  onClick: () => i(e.path),
16087
16173
  className: X("shrink-0 flex items-center justify-center w-6 h-6 rounded transition-colors text-muted-foreground/50 hover:text-foreground hover:bg-accent", o.SideNav.itemToggleClassName),
16088
16174
  title: n ? s.collapseGroup : s.expandGroup,
@@ -16093,7 +16179,7 @@ function Cm({ item: e, expanded: t, open: n, showIcons: r, onToggle: i }) {
16093
16179
  } }, /* @__PURE__ */ f.createElement(Q, {
16094
16180
  name: "chevron-down",
16095
16181
  size: 13
16096
- })))), t && /* @__PURE__ */ f.createElement(Sm, {
16182
+ })))), t && /* @__PURE__ */ f.createElement(wm, {
16097
16183
  children: e.children,
16098
16184
  open: n
16099
16185
  })) : /* @__PURE__ */ f.createElement(k, {
@@ -16104,14 +16190,14 @@ function Cm({ item: e, expanded: t, open: n, showIcons: r, onToggle: i }) {
16104
16190
  }, p, /* @__PURE__ */ f.createElement("span", {
16105
16191
  style: m,
16106
16192
  className: o.SideNav.itemTextClassName
16107
- }, e.title), t && e.badge !== void 0 && /* @__PURE__ */ f.createElement(xm, { value: e.badge }));
16193
+ }, e.title), t && e.badge !== void 0 && /* @__PURE__ */ f.createElement(Cm, { value: e.badge }));
16108
16194
  }
16109
- function wm({ group: e, expanded: t, openItems: n, showIcons: r, onToggle: i }) {
16195
+ function Em({ group: e, expanded: t, openItems: n, showIcons: r, onToggle: i }) {
16110
16196
  let a = e.key === "General", o = J("sideNav");
16111
16197
  return /* @__PURE__ */ f.createElement("div", { className: "mb-1" }, !a && /* @__PURE__ */ f.createElement("div", {
16112
16198
  style: { height: t ? void 0 : "1px" },
16113
16199
  className: t ? "px-2 pb-0.5 pt-3 first:pt-1" : X("mx-2 my-2 bg-border/40", o.SideNav.groupDividerClassName)
16114
- }, t && /* @__PURE__ */ f.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", o.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ f.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ f.createElement(Cm, {
16200
+ }, t && /* @__PURE__ */ f.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", o.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ f.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ f.createElement(Tm, {
16115
16201
  key: e.path,
16116
16202
  item: e,
16117
16203
  expanded: t,
@@ -16120,8 +16206,8 @@ function wm({ group: e, expanded: t, openItems: n, showIcons: r, onToggle: i })
16120
16206
  onToggle: i
16121
16207
  }))));
16122
16208
  }
16123
- function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: s = !0, footer: c, header: l, embedded: u = !1 }) {
16124
- let { pathname: d } = M(), p = J("sideNav"), m = Y("sideNav"), h = zv(e ?? ""), g = t ?? (e ? vm(h) : []), _ = i !== void 0, [y, x] = E(r), S = i === void 0 ? y : i, C = v((e) => {
16209
+ function Dm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: s = !0, footer: c, header: l, embedded: u = !1 }) {
16210
+ let { pathname: d } = M(), p = J("sideNav"), m = Y("sideNav"), h = Vv(e ?? ""), g = t ?? (e ? bm(h) : []), _ = i !== void 0, [y, x] = E(r), S = i === void 0 ? y : i, C = v((e) => {
16125
16211
  let t = typeof e == "function" ? e(S) : e;
16126
16212
  _ ? a?.(t) : x(t);
16127
16213
  }, [
@@ -16133,7 +16219,7 @@ function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !
16133
16219
  k((e) => {
16134
16220
  let t = new Set(e);
16135
16221
  return [...g, ...n].forEach((e) => {
16136
- e.children?.some((e) => ym(d, e.path, e.end)) && t.add(e.path);
16222
+ e.children?.some((e) => xm(d, e.path, e.end)) && t.add(e.path);
16137
16223
  }), t;
16138
16224
  });
16139
16225
  }, [d]);
@@ -16148,7 +16234,7 @@ function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !
16148
16234
  S && (A.current = setTimeout(() => D(!1), 80));
16149
16235
  };
16150
16236
  if (g.length === 0 && n.length === 0) return null;
16151
- let I = bm(g), L = bm(n), R = (e, t) => e.map((e) => /* @__PURE__ */ f.createElement(wm, {
16237
+ let I = Sm(g), L = Sm(n), R = (e, t) => e.map((e) => /* @__PURE__ */ f.createElement(Em, {
16152
16238
  key: e.key,
16153
16239
  group: e,
16154
16240
  expanded: t,
@@ -16159,7 +16245,7 @@ function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !
16159
16245
  return u ? /* @__PURE__ */ f.createElement("nav", { className: X("px-1.5 py-2", p.SideNav.navClassName) }, R(I, !0), L.length > 0 && /* @__PURE__ */ f.createElement("div", { className: X("mt-2 border-t pt-2", p.SideNav.bottomNavClassName) }, R(L, !0))) : /* @__PURE__ */ f.createElement("div", {
16160
16246
  className: X("min-h-0", p.SideNav.wrapperClassName),
16161
16247
  style: {
16162
- width: S ? _m : gm,
16248
+ width: S ? ym : vm,
16163
16249
  height: "100%",
16164
16250
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
16165
16251
  flexShrink: 0,
@@ -16167,7 +16253,7 @@ function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !
16167
16253
  }
16168
16254
  }, /* @__PURE__ */ f.createElement("aside", {
16169
16255
  style: {
16170
- width: j ? gm : _m,
16256
+ width: j ? vm : ym,
16171
16257
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
16172
16258
  position: S ? "absolute" : "sticky",
16173
16259
  top: 0,
@@ -16209,7 +16295,7 @@ function Tm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !
16209
16295
  }
16210
16296
  //#endregion
16211
16297
  //#region src/components/widgets/grid-core/useGridDBRecords.ts
16212
- function Em({ path: e, where: t, order: n, fieldMap: r }) {
16298
+ function Om({ path: e, where: t, order: n, fieldMap: r }) {
16213
16299
  let i = Bi(), [a, o] = E([]), s = w(() => {
16214
16300
  if (t || n || r) return {
16215
16301
  where: t,
@@ -16229,13 +16315,13 @@ function Em({ path: e, where: t, order: n, fieldMap: r }) {
16229
16315
  }
16230
16316
  //#endregion
16231
16317
  //#region src/components/widgets/grid-core/resolveGridPathFromUrl.ts
16232
- function Dm(e) {
16318
+ function km(e) {
16233
16319
  if (e) return e;
16234
16320
  }
16235
16321
  //#endregion
16236
16322
  //#region src/components/widgets/grid-core/GridDB.tsx
16237
- function Om({ path: e, fromUrl: t, where: n, order: r, fieldMap: i, recordId: a = fo, ...o }) {
16238
- let s = M(), c = t ? Dm(s.pathname) : e, l = Em({
16323
+ function Am({ path: e, fromUrl: t, where: n, order: r, fieldMap: i, recordId: a = fo, ...o }) {
16324
+ let s = M(), c = t ? km(s.pathname) : e, l = Om({
16239
16325
  path: c,
16240
16326
  where: n,
16241
16327
  order: r,
@@ -16250,7 +16336,7 @@ function Om({ path: e, fromUrl: t, where: n, order: r, fieldMap: i, recordId: a
16250
16336
  dir: n
16251
16337
  };
16252
16338
  }, [r]), d = o.sortable === void 0 || o.sortable === !0 ? u ?? o.sortable : o.sortable;
16253
- return /* @__PURE__ */ f.createElement(xg, {
16339
+ return /* @__PURE__ */ f.createElement(Cg, {
16254
16340
  ...o,
16255
16341
  records: l,
16256
16342
  recordId: a,
@@ -16260,22 +16346,22 @@ function Om({ path: e, fromUrl: t, where: n, order: r, fieldMap: i, recordId: a
16260
16346
  }
16261
16347
  //#endregion
16262
16348
  //#region src/components/widgets/grid-core/utils.ts
16263
- var km = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Am = (e) => (t) => {
16349
+ var jm = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Mm = (e) => (t) => {
16264
16350
  if (typeof e == "function") return String(e(t));
16265
16351
  let n = t[e];
16266
16352
  return n == null || n === "" ? "" : String(n);
16267
- }, jm = (e, t) => {
16353
+ }, Nm = (e, t) => {
16268
16354
  if (e == null || e === "text") return t;
16269
16355
  if (e === "boolean") return t ? "Yes" : "No";
16270
16356
  if (e === "json") return t == null ? "" : JSON.stringify(t, null, 2);
16271
16357
  if (e === "badge" || e === "image" || e === "email") return t;
16272
16358
  let n = ft[e === "datetime" ? "dateTime" : e];
16273
16359
  return n ? n(t) : t;
16274
- }, Mm = (e, t) => typeof e.render == "function" ? e.render(t) : jm(e.render, t.value), Nm = (e) => ({
16360
+ }, Pm = (e, t) => typeof e.render == "function" ? e.render(t) : Nm(e.render, t.value), Fm = (e) => ({
16275
16361
  key: e,
16276
16362
  label: ft.toCamel(e, " "),
16277
16363
  sortable: !0
16278
- }), Pm = (e, t) => {
16364
+ }), Im = (e, t) => {
16279
16365
  let n = [], r = (e) => {
16280
16366
  f.Children.forEach(e, (e) => {
16281
16367
  if (!f.isValidElement(e)) return;
@@ -16284,25 +16370,25 @@ var km = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^
16284
16370
  });
16285
16371
  };
16286
16372
  return r(Array.isArray(e) ? e : [e]), n;
16287
- }, Fm = (e, t, n) => {
16373
+ }, Lm = (e, t, n) => {
16288
16374
  if (e?.length) return e;
16289
16375
  if (f.isValidElement(n)) {
16290
- let e = Pm(n, (e) => Nm(e.name));
16376
+ let e = Im(n, (e) => Fm(e.name));
16291
16377
  if (e.length > 0) return e;
16292
16378
  }
16293
16379
  let r = t[0];
16294
- return r ? Object.entries(r).reduce((e, [t, n]) => (t.startsWith("_") || (f.isValidElement(n) || typeof n != "object" || Array.isArray(n)) && e.push(Nm(t)), e), []) : [];
16295
- }, Im = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (e[t] = t === "delete" ? { kind: "delete" } : { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
16380
+ return r ? Object.entries(r).reduce((e, [t, n]) => (t.startsWith("_") || (f.isValidElement(n) || typeof n != "object" || Array.isArray(n)) && e.push(Fm(t)), e), []) : [];
16381
+ }, Rm = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (e[t] = t === "delete" ? { kind: "delete" } : { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
16296
16382
  add: { kind: "modal" },
16297
16383
  edit: { kind: "modal" },
16298
16384
  delete: { kind: "delete" }
16299
- } : {}, Lm = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Rm = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, zm = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : ft.toCamel(e, " "), Bm = (e) => {
16385
+ } : {}, zm = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Bm = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, Vm = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : ft.toCamel(e, " "), Hm = (e) => {
16300
16386
  if (e && typeof e != "boolean") return e;
16301
16387
  };
16302
16388
  //#endregion
16303
16389
  //#region src/components/widgets/grid-core/GridTableView.tsx
16304
- function Vm({ records: e, recordId: t, columns: n, runAction: r, sortable: i, pagination: a, selection: o = !1, selectedKeys: s, onSelectionChange: c, onRowClick: l, reorderable: u = !1, onReorder: d, activeKey: p, groupBy: m, wrapperClassName: h, className: g, heightClassName: _, scrollClassName: y, headerClassName: x, before: S, after: C }) {
16305
- let E = w(() => Am(t), [t]), D = T(/* @__PURE__ */ new Map()), O = w(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = w(() => n.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [n]);
16390
+ function Um({ records: e, recordId: t, columns: n, runAction: r, sortable: i, pagination: a, selection: o = !1, selectedKeys: s, onSelectionChange: c, onRowClick: l, reorderable: u = !1, onReorder: d, activeKey: p, groupBy: m, wrapperClassName: h, className: g, heightClassName: _, scrollClassName: y, headerClassName: x, before: S, after: C }) {
16391
+ let E = w(() => Mm(t), [t]), D = T(/* @__PURE__ */ new Map()), O = w(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = w(() => n.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [n]);
16306
16392
  b(() => {
16307
16393
  let t = new Set(e.map((e) => E(e)));
16308
16394
  for (let e of D.current.keys()) t.has(e) || D.current.delete(e);
@@ -16312,7 +16398,7 @@ function Vm({ records: e, recordId: t, columns: n, runAction: r, sortable: i, pa
16312
16398
  if (!o) return Wt(i, t);
16313
16399
  let s = Wt(i, t), c = D.current.get(a) ?? /* @__PURE__ */ new Map(), l = c.get(t), u = typeof o.render == "function";
16314
16400
  if (l && l.recordRef === i && l.valueRef === s && l.renderRef === o.render && (!u || l.rowIndex === n)) return l.output;
16315
- let d = Mm(o, {
16401
+ let d = Pm(o, {
16316
16402
  record: i,
16317
16403
  value: s,
16318
16404
  key: t,
@@ -16389,20 +16475,20 @@ function Vm({ records: e, recordId: t, columns: n, runAction: r, sortable: i, pa
16389
16475
  }
16390
16476
  //#endregion
16391
16477
  //#region src/Head.tsx
16392
- var Hm = g(null), Um = 0, Wm = "LLM Native", Gm = {
16478
+ var Wm = g(null), Gm = 0, Km = "LLM Native", qm = {
16393
16479
  charset: "UTF-8",
16394
16480
  viewport: "width=device-width, initial-scale=1.0"
16395
- }, Km = { lang: "en" };
16396
- function qm(e, t) {
16481
+ }, Jm = { lang: "en" };
16482
+ function Ym(e, t) {
16397
16483
  return t.includes(":") ? t : `${e}:${t}`;
16398
16484
  }
16399
- function Jm(e) {
16485
+ function Xm(e) {
16400
16486
  return Array.isArray(e) ? e.join(", ") : e;
16401
16487
  }
16402
- function Ym(e) {
16403
- return e === "siteName" ? "og:site_name" : qm("og", e);
16488
+ function Zm(e) {
16489
+ return e === "siteName" ? "og:site_name" : Ym("og", e);
16404
16490
  }
16405
- function Xm(e) {
16491
+ function Qm(e) {
16406
16492
  return [
16407
16493
  ...e.canonical ? [{
16408
16494
  rel: "canonical",
@@ -16420,7 +16506,7 @@ function Xm(e) {
16420
16506
  ...e.links ?? []
16421
16507
  ];
16422
16508
  }
16423
- function Zm(e) {
16509
+ function $m(e) {
16424
16510
  return [...e.prev ? [{
16425
16511
  rel: "prev",
16426
16512
  href: e.prev
@@ -16429,7 +16515,7 @@ function Zm(e) {
16429
16515
  href: e.next
16430
16516
  }] : []];
16431
16517
  }
16432
- function Qm(e) {
16518
+ function eh(e) {
16433
16519
  return (e.alternates ?? []).map((e) => ({
16434
16520
  rel: "alternate",
16435
16521
  href: e.href,
@@ -16439,28 +16525,28 @@ function Qm(e) {
16439
16525
  title: e.title
16440
16526
  }));
16441
16527
  }
16442
- function $m(e, t, n) {
16528
+ function th(e, t, n) {
16443
16529
  return {
16444
16530
  name: {
16445
16531
  description: e.description,
16446
16532
  ...e.meta ?? {},
16447
16533
  robots: n.robots ?? e.meta?.robots,
16448
16534
  googlebot: n.googlebot,
16449
- keywords: Jm(n.keywords),
16535
+ keywords: Xm(n.keywords),
16450
16536
  author: n.author,
16451
16537
  publisher: n.publisher,
16452
16538
  referrer: n.referrer,
16453
16539
  ...n.meta ?? {},
16454
- ...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [qm("twitter", e), t]))
16540
+ ...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [Ym("twitter", e), t]))
16455
16541
  },
16456
- property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [Ym(e), t]))
16542
+ property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [Zm(e), t]))
16457
16543
  };
16458
16544
  }
16459
- function eh(e, t, n, r) {
16545
+ function nh(e, t, n, r) {
16460
16546
  return [
16461
- ...Xm(t),
16462
- ...Zm(r),
16463
- ...Qm(n),
16547
+ ...Qm(t),
16548
+ ...$m(r),
16549
+ ...eh(n),
16464
16550
  ...e.canonical && !t.canonical ? [{
16465
16551
  rel: "canonical",
16466
16552
  href: e.canonical
@@ -16468,7 +16554,7 @@ function eh(e, t, n, r) {
16468
16554
  ...e.links ?? []
16469
16555
  ];
16470
16556
  }
16471
- function th(e) {
16557
+ function rh(e) {
16472
16558
  return [...(e.fonts ?? []).flatMap((e) => [
16473
16559
  ...(e.dnsPrefetch ?? []).map((e) => ({
16474
16560
  rel: "dns-prefetch",
@@ -16495,7 +16581,7 @@ function th(e) {
16495
16581
  }
16496
16582
  ])];
16497
16583
  }
16498
- function nh(e) {
16584
+ function ih(e) {
16499
16585
  return [
16500
16586
  ...e.manifest ? [{
16501
16587
  rel: "manifest",
@@ -16512,7 +16598,7 @@ function nh(e) {
16512
16598
  ...e.icons ?? []
16513
16599
  ];
16514
16600
  }
16515
- function rh(e) {
16601
+ function ah(e) {
16516
16602
  return {
16517
16603
  "theme-color": e.themeColor,
16518
16604
  "msapplication-TileColor": e.backgroundColor,
@@ -16524,27 +16610,27 @@ function rh(e) {
16524
16610
  "apple-mobile-web-app-status-bar-style": e.appleMobileWebAppStatusBarStyle
16525
16611
  };
16526
16612
  }
16527
- function ih(e) {
16613
+ function oh(e) {
16528
16614
  return Array.isArray(e.jsonLd) ? e.jsonLd : e.jsonLd ? [e.jsonLd] : [];
16529
16615
  }
16530
- function ah(e) {
16616
+ function sh(e) {
16531
16617
  return Object.fromEntries(Object.entries(e).filter(([, e]) => !!e));
16532
16618
  }
16533
- function oh(e) {
16619
+ function ch(e) {
16534
16620
  let { inline: t, ...n } = e;
16535
16621
  return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
16536
16622
  }
16537
- function sh(e) {
16623
+ function lh(e) {
16538
16624
  let { inline: t, ...n } = e;
16539
16625
  return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
16540
16626
  }
16541
- function ch({ appName: e, metadata: t, social: n, links: r, pagination: i, language: a, document: o, assets: s, pwa: c, schemaOrg: l }) {
16627
+ function uh({ appName: e, metadata: t, social: n, links: r, pagination: i, language: a, document: o, assets: s, pwa: c, schemaOrg: l }) {
16542
16628
  if (globalThis.document === void 0) return null;
16543
- let u = $m(t, n, o), d = rh(c), p = [
16544
- ...eh(r, o, a, i),
16545
- ...th(s),
16546
- ...nh(c)
16547
- ], m = ih(l);
16629
+ let u = th(t, n, o), d = ah(c), p = [
16630
+ ...nh(r, o, a, i),
16631
+ ...rh(s),
16632
+ ...ih(c)
16633
+ ], m = oh(l);
16548
16634
  return H(/* @__PURE__ */ f.createElement(f.Fragment, null, o.charset ? /* @__PURE__ */ f.createElement("meta", {
16549
16635
  charSet: o.charset,
16550
16636
  "data-rfs-head": "document"
@@ -16578,12 +16664,12 @@ function ch({ appName: e, metadata: t, social: n, links: r, pagination: i, langu
16578
16664
  "data-rfs-head": "pwa"
16579
16665
  }) : null), p.map((e, t) => /* @__PURE__ */ f.createElement("link", {
16580
16666
  key: `${e.rel}:${e.href ?? t}`,
16581
- ...ah(e),
16667
+ ...sh(e),
16582
16668
  "data-rfs-head": "link"
16583
16669
  })), (s.styles ?? []).map((e, t) => /* @__PURE__ */ f.createElement(f.Fragment, { key: `style:${e.href ?? t}` }, e.href ? /* @__PURE__ */ f.createElement("link", {
16584
16670
  rel: "stylesheet",
16585
16671
  href: e.href,
16586
- ...sh(e),
16672
+ ...lh(e),
16587
16673
  "data-rfs-head": "asset-style"
16588
16674
  }) : null, e.inline ? /* @__PURE__ */ f.createElement("style", {
16589
16675
  id: e.id,
@@ -16592,7 +16678,7 @@ function ch({ appName: e, metadata: t, social: n, links: r, pagination: i, langu
16592
16678
  title: e.title,
16593
16679
  "data-rfs-head": "asset-style"
16594
16680
  }, e.inline) : null)), (s.scripts ?? []).map((e, t) => /* @__PURE__ */ f.createElement(f.Fragment, { key: `script:${e.src ?? t}` }, e.src ? /* @__PURE__ */ f.createElement("script", {
16595
- ...oh(e),
16681
+ ...ch(e),
16596
16682
  "data-rfs-head": "asset-script"
16597
16683
  }) : null, e.inline ? /* @__PURE__ */ f.createElement("script", {
16598
16684
  type: e.type,
@@ -16605,15 +16691,15 @@ function ch({ appName: e, metadata: t, social: n, links: r, pagination: i, langu
16605
16691
  "data-rfs-head": "schema-org"
16606
16692
  }, JSON.stringify(e)))), globalThis.document.head);
16607
16693
  }
16608
- function lh({ appName: e = Wm, children: t }) {
16609
- let n = e || "LLM Native", r = f.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), i = f.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [a, o] = E({}), [s, c] = E([]), [l, u] = E({}), [d, p] = E({}), [m, h] = E({}), [g, _] = E(Km), [y, x] = E(Gm), [S, C] = E({}), [T, D] = E({}), [O, k] = E({}), A = v(() => o({}), []), j = v((e, t) => {
16694
+ function dh({ appName: e = Km, children: t }) {
16695
+ let n = e || "LLM Native", r = f.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), i = f.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [a, o] = E({}), [s, c] = E([]), [l, u] = E({}), [d, p] = E({}), [m, h] = E({}), [g, _] = E(Jm), [y, x] = E(qm), [S, C] = E({}), [T, D] = E({}), [O, k] = E({}), A = v(() => o({}), []), j = v((e, t) => {
16610
16696
  c((n) => [...n.filter((t) => t.id !== e), {
16611
16697
  id: e,
16612
16698
  metadata: t
16613
16699
  }]);
16614
16700
  }, []), M = v((e) => {
16615
16701
  c((t) => t.filter((t) => t.id !== e));
16616
- }, []), N = v(() => u({}), []), P = v(() => p({}), []), F = v(() => h({}), []), I = v(() => _(Km), []), L = v(() => x(Gm), []), R = v(() => C({}), []), z = v(() => D({}), []), B = v(() => k({}), []);
16702
+ }, []), N = v(() => u({}), []), P = v(() => p({}), []), F = v(() => h({}), []), I = v(() => _(Jm), []), L = v(() => x(qm), []), R = v(() => C({}), []), z = v(() => D({}), []), B = v(() => k({}), []);
16617
16703
  b(() => {
16618
16704
  globalThis.document !== void 0 && (globalThis.document.documentElement.lang = g.lang ?? r.current, globalThis.document.documentElement.dir = g.dir ?? i.current);
16619
16705
  }, [g.lang, g.dir]);
@@ -16673,7 +16759,7 @@ function lh({ appName: e = Wm, children: t }) {
16673
16759
  z,
16674
16760
  B
16675
16761
  ]);
16676
- return /* @__PURE__ */ f.createElement(Hm.Provider, { value: H }, t, /* @__PURE__ */ f.createElement(ch, {
16762
+ return /* @__PURE__ */ f.createElement(Wm.Provider, { value: H }, t, /* @__PURE__ */ f.createElement(uh, {
16677
16763
  appName: n,
16678
16764
  metadata: V,
16679
16765
  social: l,
@@ -16686,16 +16772,16 @@ function lh({ appName: e = Wm, children: t }) {
16686
16772
  schemaOrg: O
16687
16773
  }));
16688
16774
  }
16689
- function uh() {
16690
- return y(Hm);
16775
+ function fh() {
16776
+ return y(Wm);
16691
16777
  }
16692
- function dh(e) {
16778
+ function ph(e) {
16693
16779
  return JSON.stringify(e ?? {});
16694
16780
  }
16695
- function fh(e) {
16696
- let t = uh(), n = f.useRef(null);
16697
- n.current ||= (Um += 1, `metadata-${Um}`);
16698
- let r = dh(e);
16781
+ function mh(e) {
16782
+ let t = fh(), n = f.useRef(null);
16783
+ n.current ||= (Gm += 1, `metadata-${Gm}`);
16784
+ let r = ph(e);
16699
16785
  return b(() => {
16700
16786
  if (!t || !e) return;
16701
16787
  let r = n.current;
@@ -16706,40 +16792,40 @@ function fh(e) {
16706
16792
  r
16707
16793
  ]), t;
16708
16794
  }
16709
- function ph(e) {
16710
- let t = uh(), n = dh(e);
16795
+ function hh(e) {
16796
+ let t = fh(), n = ph(e);
16711
16797
  return b(() => {
16712
16798
  if (!t || !e) return;
16713
16799
  let n = t.social;
16714
16800
  return t.setSocialHead(e), () => t.setSocialHead(n);
16715
16801
  }, [t?.setSocialHead, n]), t;
16716
16802
  }
16717
- function mh(e) {
16718
- let t = uh(), n = dh(e);
16803
+ function gh(e) {
16804
+ let t = fh(), n = ph(e);
16719
16805
  return b(() => {
16720
16806
  if (!t || !e) return;
16721
16807
  let n = t.links;
16722
16808
  return t.setHeadLinks(e), () => t.setHeadLinks(n);
16723
16809
  }, [t?.setHeadLinks, n]), t;
16724
16810
  }
16725
- function hh(e) {
16726
- let t = uh(), n = dh(e);
16811
+ function _h(e) {
16812
+ let t = fh(), n = ph(e);
16727
16813
  return b(() => {
16728
16814
  if (!t || !e) return;
16729
16815
  let n = t.pagination;
16730
16816
  return t.setPaginationHead(e), () => t.setPaginationHead(n);
16731
16817
  }, [t?.setPaginationHead, n]), t;
16732
16818
  }
16733
- function gh(e) {
16734
- let t = uh(), n = dh(e);
16819
+ function vh(e) {
16820
+ let t = fh(), n = ph(e);
16735
16821
  return b(() => {
16736
16822
  if (!t || !e) return;
16737
16823
  let n = t.language;
16738
16824
  return t.setLanguageHead(e), () => t.setLanguageHead(n);
16739
16825
  }, [t?.setLanguageHead, n]), t;
16740
16826
  }
16741
- function _h(e) {
16742
- let t = uh(), n = dh(e);
16827
+ function yh(e) {
16828
+ let t = fh(), n = ph(e);
16743
16829
  return b(() => {
16744
16830
  if (!t || !e) return;
16745
16831
  let n = t.document;
@@ -16749,39 +16835,39 @@ function _h(e) {
16749
16835
  }), () => t.setDocumentHead(n);
16750
16836
  }, [t?.setDocumentHead, n]), t;
16751
16837
  }
16752
- function vh(e) {
16753
- let t = uh(), n = dh(e);
16838
+ function bh(e) {
16839
+ let t = fh(), n = ph(e);
16754
16840
  return b(() => {
16755
16841
  if (!t || !e) return;
16756
16842
  let n = t.assets;
16757
16843
  return t.setAssetsHead(e), () => t.setAssetsHead(n);
16758
16844
  }, [t?.setAssetsHead, n]), t;
16759
16845
  }
16760
- function yh(e) {
16761
- let t = uh(), n = dh(e);
16846
+ function xh(e) {
16847
+ let t = fh(), n = ph(e);
16762
16848
  return b(() => {
16763
16849
  if (!t || !e) return;
16764
16850
  let n = t.pwa;
16765
16851
  return t.setPwaHead(e), () => t.setPwaHead(n);
16766
16852
  }, [t?.setPwaHead, n]), t;
16767
16853
  }
16768
- function bh(e) {
16769
- let t = uh(), n = dh(e);
16854
+ function Sh(e) {
16855
+ let t = fh(), n = ph(e);
16770
16856
  return b(() => {
16771
16857
  if (!t || !e) return;
16772
16858
  let n = t.schemaOrg;
16773
16859
  return t.setSchemaOrg(e), () => t.setSchemaOrg(n);
16774
16860
  }, [t?.setSchemaOrg, n]), t;
16775
16861
  }
16776
- function xh(e) {
16777
- return fh(e), null;
16862
+ function Ch(e) {
16863
+ return mh(e), null;
16778
16864
  }
16779
16865
  //#endregion
16780
16866
  //#region src/components/widgets/MarkdownReader.tsx
16781
- var Sh = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Ch = (e) => !!e && !Sh(e) && !e.startsWith("#"), wh = (e) => e.startsWith("#"), Th = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Th).join("") : f.isValidElement(e) ? Th(e.props.children) : "", Eh = (e) => {
16867
+ var wh = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Th = (e) => !!e && !wh(e) && !e.startsWith("#"), Eh = (e) => e.startsWith("#"), Dh = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Dh).join("") : f.isValidElement(e) ? Dh(e.props.children) : "", Oh = (e) => {
16782
16868
  if (f.isValidElement(e)) return /language-([\w-]+)/.exec(e.props.className || "")?.[1];
16783
16869
  };
16784
- function Dh({ code: e, language: t }) {
16870
+ function kh({ code: e, language: t }) {
16785
16871
  let [n, r] = f.useState(!1), i = Y("code");
16786
16872
  return /* @__PURE__ */ f.createElement("div", { className: "relative my-4 overflow-hidden rounded-md border bg-muted/50" }, /* @__PURE__ */ f.createElement("div", { className: "flex h-9 items-center justify-between border-b px-3" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs font-medium text-muted-foreground" }, t || i.codeLanguageDefault), /* @__PURE__ */ f.createElement("button", {
16787
16873
  type: "button",
@@ -16791,7 +16877,7 @@ function Dh({ code: e, language: t }) {
16791
16877
  }
16792
16878
  }, n ? i.copied : i.copy)), /* @__PURE__ */ f.createElement("pre", { className: "m-0 overflow-x-auto p-4 text-xs leading-relaxed" }, /* @__PURE__ */ f.createElement("code", { className: t ? `language-${t}` : void 0 }, e)));
16793
16879
  }
16794
- var Oh = (e) => ({
16880
+ var Ah = (e) => ({
16795
16881
  h1: ({ className: e, ...t }) => /* @__PURE__ */ f.createElement("h1", {
16796
16882
  className: X("mt-8 scroll-m-20 text-3xl font-bold tracking-normal first:mt-0 [&>a]:no-underline [&>a:hover]:opacity-80", e),
16797
16883
  ...t
@@ -16845,18 +16931,18 @@ var Oh = (e) => ({
16845
16931
  ...t
16846
16932
  }),
16847
16933
  a: ({ className: t, href: n = "", onClick: r, ...i }) => /* @__PURE__ */ f.createElement("a", {
16848
- className: X(wh(n) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", t),
16934
+ className: X(Eh(n) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", t),
16849
16935
  href: n,
16850
- target: Sh(n) ? "_blank" : void 0,
16851
- rel: Sh(n) ? "noreferrer" : void 0,
16936
+ target: wh(n) ? "_blank" : void 0,
16937
+ rel: wh(n) ? "noreferrer" : void 0,
16852
16938
  onClick: (t) => {
16853
- r?.(t), !t.defaultPrevented && e && Ch(n) && (t.preventDefault(), e(n, t));
16939
+ r?.(t), !t.defaultPrevented && e && Th(n) && (t.preventDefault(), e(n, t));
16854
16940
  },
16855
16941
  ...i
16856
16942
  }),
16857
- pre: ({ children: e }) => /* @__PURE__ */ f.createElement(Dh, {
16858
- code: Th(e).replace(/\n$/, ""),
16859
- language: Eh(e)
16943
+ pre: ({ children: e }) => /* @__PURE__ */ f.createElement(kh, {
16944
+ code: Dh(e).replace(/\n$/, ""),
16945
+ language: Oh(e)
16860
16946
  }),
16861
16947
  code: ({ className: e, children: t, ...n }) => typeof e == "string" && e.startsWith("language-") ? /* @__PURE__ */ f.createElement("code", {
16862
16948
  className: e,
@@ -16871,13 +16957,13 @@ var Oh = (e) => ({
16871
16957
  ...t
16872
16958
  })
16873
16959
  });
16874
- function kh({ content: e, components: t, className: n, wrapperClassName: r, metadata: i, onInternalLinkClick: a }) {
16960
+ function jh({ content: e, components: t, className: n, wrapperClassName: r, metadata: i, onInternalLinkClick: a }) {
16875
16961
  let o = f.useMemo(() => e.match(/^#[ \t]+(.+)/m)?.[1]?.trim(), [e]);
16876
- fh(i || o ? {
16962
+ mh(i || o ? {
16877
16963
  ...i ?? {},
16878
16964
  title: i?.title ?? o
16879
16965
  } : void 0);
16880
- let s = f.useMemo(() => Oh(a), [a]);
16966
+ let s = f.useMemo(() => Ah(a), [a]);
16881
16967
  return /* @__PURE__ */ f.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", r, n) }, /* @__PURE__ */ f.createElement(Be, {
16882
16968
  remarkPlugins: [Ve],
16883
16969
  rehypePlugins: [
@@ -16893,28 +16979,28 @@ function kh({ content: e, components: t, className: n, wrapperClassName: r, meta
16893
16979
  }
16894
16980
  //#endregion
16895
16981
  //#region src/libs/streamingMarkdown.ts
16896
- var Ah = /^ {0,3}(`{3,}|~{3,})(.*)$/, jh = /^ {0,3}(`{1,2}|~{1,2})$/, Mh = /^\s*[-=]{1,2}\s*$/, Nh = /^\s*\|?[\s:|-]*$/, Ph = /^\s*:?-+:?\s*$/;
16897
- function Fh(e) {
16982
+ var Mh = /^ {0,3}(`{3,}|~{3,})(.*)$/, Nh = /^ {0,3}(`{1,2}|~{1,2})$/, Ph = /^\s*[-=]{1,2}\s*$/, Fh = /^\s*\|?[\s:|-]*$/, Ih = /^\s*:?-+:?\s*$/;
16983
+ function Lh(e) {
16898
16984
  let t = e.trim();
16899
16985
  return t.startsWith("|") && (t = t.slice(1)), t.endsWith("|") && !t.endsWith("\\|") && (t = t.slice(0, -1)), t.split(/(?<!\\)\|/);
16900
16986
  }
16901
- function Ih(e) {
16987
+ function Rh(e) {
16902
16988
  let t = e[0];
16903
16989
  if (!t.trimStart().startsWith("|")) return null;
16904
- let n = Fh(t).filter((e, t, n) => e.trim() !== "" || t < n.length - 1);
16990
+ let n = Lh(t).filter((e, t, n) => e.trim() !== "" || t < n.length - 1);
16905
16991
  if (n.length === 0) return [];
16906
16992
  let r = `| ${n.map(() => "---").join(" | ")} |`, i = t.trimEnd().endsWith("|") ? t : `${t.trimEnd()} |`;
16907
16993
  if (e.length === 1) return [i, r];
16908
16994
  let a = e[1];
16909
- if (!Nh.test(a)) return null;
16910
- let o = Fh(a);
16911
- return o.length === n.length && o.every((e) => Ph.test(e)) ? e : [
16995
+ if (!Fh.test(a)) return null;
16996
+ let o = Lh(a);
16997
+ return o.length === n.length && o.every((e) => Ih.test(e)) ? e : [
16912
16998
  i,
16913
16999
  r,
16914
17000
  ...e.slice(2)
16915
17001
  ];
16916
17002
  }
16917
- function Lh(e) {
17003
+ function zh(e) {
16918
17004
  let t = e, n = t.lastIndexOf("](");
16919
17005
  n >= 0 && !t.slice(n).includes(")") && (t += ")");
16920
17006
  let r = [], i = null, a = /^\s*[*+-]\s/.exec(t), o = a ? a[0].length : 0;
@@ -16978,18 +17064,18 @@ function Lh(e) {
16978
17064
  }
16979
17065
  return t;
16980
17066
  }
16981
- function Rh(e) {
17067
+ function Bh(e) {
16982
17068
  if (!e) return e;
16983
17069
  let t = e.split("\n"), n = null, r = 0;
16984
17070
  if (t.forEach((e, t) => {
16985
- let i = Ah.exec(e);
17071
+ let i = Mh.exec(e);
16986
17072
  n ? i && i[1][0] === n.char && i[1].length >= n.len && i[2].trim() === "" && (n = null, r = t + 1) : i && !(i[1][0] === "`" && i[2].includes("`")) && (n = {
16987
17073
  char: i[1][0],
16988
17074
  len: i[1].length
16989
17075
  });
16990
17076
  }), n) {
16991
17077
  let e = n;
16992
- return `${(jh.test(t[t.length - 1]) && t.length > 1 ? t.slice(0, -1) : t).join("\n")}\n${e.char.repeat(e.len)}`;
17078
+ return `${(Nh.test(t[t.length - 1]) && t.length > 1 ? t.slice(0, -1) : t).join("\n")}\n${e.char.repeat(e.len)}`;
16993
17079
  }
16994
17080
  let i = r;
16995
17081
  for (let e = t.length - 1; e >= r; e--) if (t[e].trim() === "") {
@@ -16998,19 +17084,19 @@ function Rh(e) {
16998
17084
  }
16999
17085
  let a = t.slice(0, i), o = t.slice(i);
17000
17086
  if (o.length === 0) return e;
17001
- if (jh.test(o[o.length - 1]) && (o = o.slice(0, -1)), o.length >= 2 && Mh.test(o[o.length - 1]) && (o = o.slice(0, -1)), o.length === 0) return a.join("\n").replace(/\n+$/, "");
17087
+ if (Nh.test(o[o.length - 1]) && (o = o.slice(0, -1)), o.length >= 2 && Ph.test(o[o.length - 1]) && (o = o.slice(0, -1)), o.length === 0) return a.join("\n").replace(/\n+$/, "");
17002
17088
  let s = o.length - 1;
17003
- o[s] = Lh(o[s]);
17004
- let c = Ih(o);
17089
+ o[s] = zh(o[s]);
17090
+ let c = Rh(o);
17005
17091
  return c && (o = c), [...a, ...o].join("\n");
17006
17092
  }
17007
17093
  //#endregion
17008
17094
  //#region src/components/widgets/chat/ChatMarkdown.tsx
17009
- var zh = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Bh = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Bh).join("") : f.isValidElement(e) ? Bh(e.props.children) : "", Vh = (e) => {
17095
+ var Vh = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Hh = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Hh).join("") : f.isValidElement(e) ? Hh(e.props.children) : "", Uh = (e) => {
17010
17096
  let t = Array.isArray(e) ? e[0] : e;
17011
17097
  if (f.isValidElement(t)) return /language-([\w#+-]+)/.exec(t.props.className || "")?.[1];
17012
17098
  };
17013
- function Hh({ code: e, language: t, highlight: n, classNames: r }) {
17099
+ function Wh({ code: e, language: t, highlight: n, classNames: r }) {
17014
17100
  let i = Y("code"), [a, o] = f.useState(!1), [s, c] = f.useState(null), l = n ? bs(t) : void 0;
17015
17101
  return f.useEffect(() => {
17016
17102
  if (!l) {
@@ -17047,7 +17133,7 @@ function Hh({ code: e, language: t, highlight: n, classNames: r }) {
17047
17133
  dangerouslySetInnerHTML: { __html: s }
17048
17134
  })));
17049
17135
  }
17050
- function Uh(e, t, n) {
17136
+ function Gh(e, t, n) {
17051
17137
  let r = (t) => function({ className: n, node: r, ...i }) {
17052
17138
  let a = t === "h1" ? "text-lg" : t === "h2" ? "text-base" : "text-sm";
17053
17139
  return f.createElement(t, {
@@ -17105,7 +17191,7 @@ function Uh(e, t, n) {
17105
17191
  ...r
17106
17192
  }),
17107
17193
  a: ({ className: t, href: r = "", onClick: i, node: a, ...o }) => {
17108
- let s = zh(r);
17194
+ let s = Vh(r);
17109
17195
  return /* @__PURE__ */ f.createElement("a", {
17110
17196
  className: X("font-medium text-primary underline-offset-2 hover:underline", e?.link, t),
17111
17197
  href: r,
@@ -17117,9 +17203,9 @@ function Uh(e, t, n) {
17117
17203
  ...o
17118
17204
  });
17119
17205
  },
17120
- pre: ({ children: n }) => /* @__PURE__ */ f.createElement(Hh, {
17121
- code: Bh(n).replace(/\n$/, ""),
17122
- language: Vh(n),
17206
+ pre: ({ children: n }) => /* @__PURE__ */ f.createElement(Wh, {
17207
+ code: Hh(n).replace(/\n$/, ""),
17208
+ language: Uh(n),
17123
17209
  highlight: t,
17124
17210
  classNames: e
17125
17211
  }),
@@ -17134,9 +17220,9 @@ function Uh(e, t, n) {
17134
17220
  })
17135
17221
  };
17136
17222
  }
17137
- var Wh = [Ve], Gh = [We];
17138
- function Kh({ content: e, streaming: t = !1, tone: n = "default", highlight: r = !0, onLinkClick: i, components: a, className: o, classNames: s }) {
17139
- let c = f.useMemo(() => t ? Rh(e ?? "") : e ?? "", [e, t]), l = f.useMemo(() => Uh(s, r, i), [
17223
+ var Kh = [Ve], qh = [We];
17224
+ function Jh({ content: e, streaming: t = !1, tone: n = "default", highlight: r = !0, onLinkClick: i, components: a, className: o, classNames: s }) {
17225
+ let c = f.useMemo(() => t ? Bh(e ?? "") : e ?? "", [e, t]), l = f.useMemo(() => Gh(s, r, i), [
17140
17226
  s,
17141
17227
  r,
17142
17228
  i
@@ -17148,25 +17234,25 @@ function Kh({ content: e, streaming: t = !1, tone: n = "default", highlight: r =
17148
17234
  className: X("rf-chat-markdown min-w-0 max-w-full break-words text-sm leading-relaxed", n === "muted" ? "text-muted-foreground" : "text-foreground", s?.root, o),
17149
17235
  "aria-busy": t || void 0
17150
17236
  }, /* @__PURE__ */ f.createElement(Be, {
17151
- remarkPlugins: Wh,
17152
- rehypePlugins: Gh,
17237
+ remarkPlugins: Kh,
17238
+ rehypePlugins: qh,
17153
17239
  components: u
17154
17240
  }, c));
17155
17241
  }
17156
17242
  //#endregion
17157
17243
  //#region src/components/widgets/chat/ChatReasoning.tsx
17158
- function qh(e, t) {
17244
+ function Yh(e, t) {
17159
17245
  let n = Math.max(1, Math.round(e));
17160
17246
  return n < 60 ? Vn(t.durationSeconds, { seconds: n }) : Vn(t.durationMinutes, {
17161
17247
  minutes: Math.floor(n / 60),
17162
17248
  seconds: n % 60
17163
17249
  });
17164
17250
  }
17165
- function Jh({ content: e, streaming: t = !1, duration: n, defaultOpen: r = !1, open: i, onOpenChange: a, label: o, icon: s = "brain", className: c, classNames: l }) {
17251
+ function Xh({ content: e, streaming: t = !1, duration: n, defaultOpen: r = !1, open: i, onOpenChange: a, label: o, icon: s = "brain", className: c, classNames: l }) {
17166
17252
  let u = Y("chat"), d = f.useId(), [p, m] = f.useState(null), h = i ?? p ?? (t || r), g = () => {
17167
17253
  let e = !h;
17168
17254
  i === void 0 && m(e), a?.(e);
17169
- }, _ = o ?? (t ? u.reasoningStreaming : n == null ? u.reasoning : Vn(u.reasoningFor, { duration: qh(n, u) }));
17255
+ }, _ = o ?? (t ? u.reasoningStreaming : n == null ? u.reasoning : Vn(u.reasoningFor, { duration: Yh(n, u) }));
17170
17256
  return /* @__PURE__ */ f.createElement("div", { className: X("rf-chat-reasoning my-2 min-w-0", c, l?.root) }, /* @__PURE__ */ f.createElement("button", {
17171
17257
  type: "button",
17172
17258
  onClick: g,
@@ -17187,7 +17273,7 @@ function Jh({ content: e, streaming: t = !1, duration: n, defaultOpen: r = !1, o
17187
17273
  "aria-label": typeof _ == "string" ? _ : u.reasoning,
17188
17274
  hidden: !h,
17189
17275
  className: X("mt-1 border-s-2 border-border ps-3", l?.content)
17190
- }, h && /* @__PURE__ */ f.createElement(Kh, {
17276
+ }, h && /* @__PURE__ */ f.createElement(Jh, {
17191
17277
  content: e,
17192
17278
  streaming: t,
17193
17279
  tone: "muted",
@@ -17196,10 +17282,10 @@ function Jh({ content: e, streaming: t = !1, duration: n, defaultOpen: r = !1, o
17196
17282
  }
17197
17283
  //#endregion
17198
17284
  //#region src/components/widgets/chat/ChatQuestions.tsx
17199
- var Yh = /^\s*(?:(\d{1,2})|([A-Za-z]))[.)]\s+(.+)$/s, Xh = /\s*[([]\s*(?:recommended|consigliat[ao]|empfohlen)\s*[)\]]\s*$/i;
17200
- function Zh(e, t, n, r, i) {
17201
- let a = e.options ?? [], o = a.map((e) => Yh.exec(e.label)), s = a.length > 0 && o.every(Boolean), c = s && o[0]?.[2] ? "alpha" : "numeric", l = a.map((t, n) => {
17202
- let r = s ? o[n][3].trim() : t.label, i = Xh.exec(r);
17285
+ var Zh = /^\s*(?:(\d{1,2})|([A-Za-z]))[.)]\s+(.+)$/s, Qh = /\s*[([]\s*(?:recommended|consigliat[ao]|empfohlen)\s*[)\]]\s*$/i;
17286
+ function $h(e, t, n, r, i) {
17287
+ let a = e.options ?? [], o = a.map((e) => Zh.exec(e.label)), s = a.length > 0 && o.every(Boolean), c = s && o[0]?.[2] ? "alpha" : "numeric", l = a.map((t, n) => {
17288
+ let r = s ? o[n][3].trim() : t.label, i = Qh.exec(r);
17203
17289
  i && (r = r.slice(0, i.index).trim());
17204
17290
  let a = typeof e.recommended == "number" ? e.recommended === n : typeof e.recommended == "string" ? e.recommended === r || e.recommended === t.label : !!i;
17205
17291
  return {
@@ -17217,31 +17303,31 @@ function Zh(e, t, n, r, i) {
17217
17303
  other: l.length === 0 || (e.custom ?? r)
17218
17304
  };
17219
17305
  }
17220
- var Qh = (e, t) => t === "alpha" ? String.fromCharCode(65 + e) : String(e + 1);
17221
- function $h(e, t) {
17306
+ var eg = (e, t) => t === "alpha" ? String.fromCharCode(65 + e) : String(e + 1);
17307
+ function tg(e, t) {
17222
17308
  return /^[1-9]$/.test(e) ? Number(e) - 1 : t === "alpha" && /^[a-z]$/i.test(e) ? e.toUpperCase().charCodeAt(0) - 65 : -1;
17223
17309
  }
17224
- function eg(e, t) {
17310
+ function ng(e, t) {
17225
17311
  return {
17226
17312
  ...e.id === void 0 ? {} : { id: e.id },
17227
17313
  ...e.header === void 0 ? {} : { header: e.header },
17228
17314
  values: t
17229
17315
  };
17230
17316
  }
17231
- var tg = "flex w-full items-start gap-2.5 rounded-md border px-2.5 py-2 text-start transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60", ng = 58, rg = 160, ig = "inline-flex h-8 items-center justify-center gap-1 rounded-md px-3 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
17232
- function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answers: i, disabled: a = !1, autoFocus: o = !1, submitLabel: s, className: c, classNames: l }) {
17317
+ var rg = "flex w-full items-start gap-2.5 rounded-md border px-2.5 py-2 text-start transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60", ig = 58, ag = 160, og = "inline-flex h-8 items-center justify-center gap-1 rounded-md px-3 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
17318
+ function sg({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answers: i, disabled: a = !1, autoFocus: o = !1, submitLabel: s, className: c, classNames: l }) {
17233
17319
  let u = Y("chat"), d = f.useId(), p = f.useRef(null), m = f.useRef([]), h = f.useRef(o ? "panel" : null), g = f.useRef(!0);
17234
17320
  f.useEffect(() => () => {
17235
17321
  g.current = !1;
17236
17322
  }, []);
17237
- let _ = f.useMemo(() => (e ?? []).map((e, t) => Zh(e, t, n, r, u)), [
17323
+ let _ = f.useMemo(() => (e ?? []).map((e, t) => $h(e, t, n, r, u)), [
17238
17324
  e,
17239
17325
  n,
17240
17326
  r,
17241
17327
  u
17242
17328
  ]), v = _.length, y = v > 1, [b, x] = f.useState(0), [S, C] = f.useState([]), [w, T] = f.useState([]), [E, D] = f.useState([]), [O, k] = f.useState(!1), [A, j] = f.useState(null), [M, N] = f.useState(!1), P = f.useRef(null), F = Ec({
17243
- minHeight: ng,
17244
- maxHeight: rg
17329
+ minHeight: ig,
17330
+ maxHeight: ag
17245
17331
  }), I = (e) => {
17246
17332
  let t = _[e];
17247
17333
  if (!t) return [];
@@ -17304,7 +17390,7 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17304
17390
  }
17305
17391
  }, te = async () => {
17306
17392
  if (!R || z) return;
17307
- let e = _.map((e, t) => eg(e.source, I(t)));
17393
+ let e = _.map((e, t) => ng(e.source, I(t)));
17308
17394
  k(!0);
17309
17395
  try {
17310
17396
  await t?.(e), g.current && j(e);
@@ -17348,7 +17434,7 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17348
17434
  }
17349
17435
  let r = _[b];
17350
17436
  if (r) {
17351
- let t = $h(e.key, r.numbering), n = r.options.length + (r.other && r.options.length > 0 ? 1 : 0);
17437
+ let t = tg(e.key, r.numbering), n = r.options.length + (r.other && r.options.length > 0 ? 1 : 0);
17352
17438
  if (t >= 0 && t < n) {
17353
17439
  e.preventDefault(), ee(b, t);
17354
17440
  return;
@@ -17432,11 +17518,11 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17432
17518
  "data-rf-option": "",
17433
17519
  disabled: a,
17434
17520
  onClick: () => ee(b, t),
17435
- className: X(tg, n ? "border-primary bg-primary/10" : e.recommended ? "border-primary/40 hover:bg-accent" : "border-border hover:bg-accent", l?.option, n && l?.optionSelected)
17521
+ className: X(rg, n ? "border-primary bg-primary/10" : e.recommended ? "border-primary/40 hover:bg-accent" : "border-border hover:bg-accent", l?.option, n && l?.optionSelected)
17436
17522
  }, /* @__PURE__ */ f.createElement("span", {
17437
17523
  "aria-hidden": "true",
17438
17524
  className: X("flex size-5 shrink-0 items-center justify-center rounded text-[11px] font-semibold", n ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground")
17439
- }, Qh(t, G.numbering)), /* @__PURE__ */ f.createElement("span", { className: "min-w-0 flex-1" }, /* @__PURE__ */ f.createElement("span", { className: "block text-sm" }, e.label), e.description && /* @__PURE__ */ f.createElement("span", { className: "block text-xs text-muted-foreground" }, e.description)), e.recommended && /* @__PURE__ */ f.createElement("span", { className: "shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary" }, u.recommended));
17525
+ }, eg(t, G.numbering)), /* @__PURE__ */ f.createElement("span", { className: "min-w-0 flex-1" }, /* @__PURE__ */ f.createElement("span", { className: "block text-sm" }, e.label), e.description && /* @__PURE__ */ f.createElement("span", { className: "block text-xs text-muted-foreground" }, e.description)), e.recommended && /* @__PURE__ */ f.createElement("span", { className: "shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary" }, u.recommended));
17440
17526
  }), G.other && G.options.length > 0 && /* @__PURE__ */ f.createElement("button", {
17441
17527
  type: "button",
17442
17528
  role: oe,
@@ -17444,11 +17530,11 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17444
17530
  "data-rf-option": "",
17445
17531
  disabled: a,
17446
17532
  onClick: () => ee(b, G.options.length),
17447
- className: X(tg, w[b] ? "border-primary bg-primary/10" : "border-border hover:bg-accent", l?.option, w[b] && l?.optionSelected)
17533
+ className: X(rg, w[b] ? "border-primary bg-primary/10" : "border-border hover:bg-accent", l?.option, w[b] && l?.optionSelected)
17448
17534
  }, /* @__PURE__ */ f.createElement("span", {
17449
17535
  "aria-hidden": "true",
17450
17536
  className: X("flex size-5 shrink-0 items-center justify-center rounded text-[11px] font-semibold", w[b] ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground")
17451
- }, Qh(G.options.length, G.numbering)), /* @__PURE__ */ f.createElement("span", { className: "min-w-0 flex-1 text-sm" }, u.other)), V && /* @__PURE__ */ f.createElement("textarea", {
17537
+ }, eg(G.options.length, G.numbering)), /* @__PURE__ */ f.createElement("span", { className: "min-w-0 flex-1 text-sm" }, u.other)), V && /* @__PURE__ */ f.createElement("textarea", {
17452
17538
  ref: P,
17453
17539
  rows: 2,
17454
17540
  value: B,
@@ -17471,24 +17557,24 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17471
17557
  className: "w-full rounded-md px-2 py-1.5 text-start transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
17472
17558
  }, /* @__PURE__ */ f.createElement("span", { className: "block text-xs text-muted-foreground" }, e.title), /* @__PURE__ */ f.createElement("span", { className: X("block text-sm", n.length === 0 && "italic text-destructive") }, n.length ? n.join(", ") : u.noAnswer)));
17473
17559
  })))), /* @__PURE__ */ f.createElement("div", { className: X("flex flex-wrap items-center justify-between gap-2 border-t border-border px-3 py-2", l?.footer) }, /* @__PURE__ */ f.createElement("span", { className: "text-[11px] text-muted-foreground" }, G && V && (M || se < 0) ? u.textKeyboardHint : G && se >= 0 ? Vn(u.keyboardHint, {
17474
- first: Qh(0, G.numbering),
17475
- last: Qh(se, G.numbering)
17560
+ first: eg(0, G.numbering),
17561
+ last: eg(se, G.numbering)
17476
17562
  }) : null), /* @__PURE__ */ f.createElement("div", { className: "ms-auto flex items-center gap-2" }, y && b > 0 && /* @__PURE__ */ f.createElement("button", {
17477
17563
  type: "button",
17478
17564
  onClick: () => H(b - 1),
17479
17565
  disabled: z,
17480
- className: X(ig, "border border-border hover:bg-accent")
17566
+ className: X(og, "border border-border hover:bg-accent")
17481
17567
  }, u.back), y && b < v ? /* @__PURE__ */ f.createElement("button", {
17482
17568
  type: "button",
17483
17569
  onClick: () => H(b + 1),
17484
17570
  disabled: z || !L(b),
17485
- className: X(ig, "border border-border hover:bg-accent")
17571
+ className: X(og, "border border-border hover:bg-accent")
17486
17572
  }, u.next) : /* @__PURE__ */ f.createElement("button", {
17487
17573
  type: "button",
17488
17574
  "data-rf-submit": "",
17489
17575
  onClick: () => void te(),
17490
17576
  disabled: z || !R,
17491
- className: X(ig, "bg-primary text-primary-foreground hover:bg-primary/90")
17577
+ className: X(og, "bg-primary text-primary-foreground hover:bg-primary/90")
17492
17578
  }, O && /* @__PURE__ */ f.createElement(Q, {
17493
17579
  name: "loader-2",
17494
17580
  size: 12,
@@ -17497,7 +17583,7 @@ function ag({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
17497
17583
  }
17498
17584
  //#endregion
17499
17585
  //#region src/components/widgets/TabDynamic.tsx
17500
- var og = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRemove: i = void 0, label: a = "Tab", min: o = 1, max: s = void 0, activeIndex: c = 0, title: l = void 0, readOnly: u = !1, tabPosition: d = "default" }) => {
17586
+ var cg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRemove: i = void 0, label: a = "Tab", min: o = 1, max: s = void 0, activeIndex: c = 0, title: l = void 0, readOnly: u = !1, tabPosition: d = "default" }) => {
17501
17587
  let { value: p, handleChange: m } = mp({
17502
17588
  name: t,
17503
17589
  onChange: n
@@ -17554,7 +17640,7 @@ var og = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
17554
17640
  }))),
17555
17641
  content: /* @__PURE__ */ f.createElement("div", { className: Np() }, C)
17556
17642
  }));
17557
- }, sg = ({ records: e, children: t, limit: n = void 0, page: r = void 0, maxPageButtons: i = void 0, appendTo: a = void 0, before: o = void 0, after: s = void 0, className: c = void 0, wrapperClassName: l = void 0, scrollToTopOnChange: u = void 0, scrollBehavior: d = void 0, align: p = void 0, sticky: m = void 0 }) => {
17643
+ }, lg = ({ records: e, children: t, limit: n = void 0, page: r = void 0, maxPageButtons: i = void 0, appendTo: a = void 0, before: o = void 0, after: s = void 0, className: c = void 0, wrapperClassName: l = void 0, scrollToTopOnChange: u = void 0, scrollBehavior: d = void 0, align: p = void 0, sticky: m = void 0 }) => {
17558
17644
  let h = J("pagination"), g = Y("common"), [_, v] = E(r || 1), [y, x] = E(e.length);
17559
17645
  e.length !== y && (x(e.length), v(1));
17560
17646
  let S = n || e.length, C = Math.ceil(e.length / S), T = (_ - 1) * S, D = T + S, O = w(() => e.slice(T, D), [
@@ -17620,7 +17706,7 @@ var og = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
17620
17706
  className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
17621
17707
  }, /* @__PURE__ */ f.createElement("span", null, "»"))))), s);
17622
17708
  return /* @__PURE__ */ f.createElement(f.Fragment, null, t(O, T), a ? H(F, a) : a === void 0 && F);
17623
- }, cg = ({ records: e = void 0, header: t = void 0, footer: n = void 0, overlays: r = void 0, renderItem: i = void 0, onRowClick: a = void 0, onSelectionChange: o = void 0, sortable: s = !1, pagination: c = void 0, gap: l = void 0, columns: u = void 0, groupBy: d = void 0, selectedKeys: p = void 0, before: m = void 0, after: h = void 0, wrapperClassName: g = void 0, className: _ = void 0, headerClassName: y = void 0, scrollClassName: x = void 0, bodyClassName: S = void 0, footerClassName: C = void 0, selectedClassName: D = void 0 }) => {
17709
+ }, ug = ({ records: e = void 0, header: t = void 0, footer: n = void 0, overlays: r = void 0, renderItem: i = void 0, onRowClick: a = void 0, onSelectionChange: o = void 0, sortable: s = !1, pagination: c = void 0, gap: l = void 0, columns: u = void 0, groupBy: d = void 0, selectedKeys: p = void 0, before: m = void 0, after: h = void 0, wrapperClassName: g = void 0, className: _ = void 0, headerClassName: y = void 0, scrollClassName: x = void 0, bodyClassName: S = void 0, footerClassName: C = void 0, selectedClassName: D = void 0 }) => {
17624
17710
  let O = J("gallery"), k = Y("gallery"), A = Y("common"), j = D || O.Gallery.selectedClassName, [M, N] = E(null), P = v((e) => {
17625
17711
  e && N(e);
17626
17712
  }, []), F = l ?? O.Gallery.gap, I = u ?? O.Gallery.rowCols, L = {
@@ -17829,7 +17915,7 @@ var og = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
17829
17915
  d,
17830
17916
  U
17831
17917
  ]);
17832
- return he === void 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, /* @__PURE__ */ f.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : he.length === 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ f.createElement("div", { className: X("flex items-stretch gap-3", g || O.Gallery.wrapperClassName) }, m && /* @__PURE__ */ f.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, m), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", _ || O.Gallery.className) }, t && /* @__PURE__ */ f.createElement("div", { className: y || O.Gallery.headerClassName }, t), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1", x || O.Gallery.scrollClassName) }, /* @__PURE__ */ f.createElement(sg, {
17918
+ return he === void 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, /* @__PURE__ */ f.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : he.length === 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ f.createElement("div", { className: X("flex items-stretch gap-3", g || O.Gallery.wrapperClassName) }, m && /* @__PURE__ */ f.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, m), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", _ || O.Gallery.className) }, t && /* @__PURE__ */ f.createElement("div", { className: y || O.Gallery.headerClassName }, t), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1", x || O.Gallery.scrollClassName) }, /* @__PURE__ */ f.createElement(lg, {
17833
17919
  records: he,
17834
17920
  appendTo: M,
17835
17921
  wrapperClassName: "px-3 pt-4 pb-2",
@@ -17850,12 +17936,12 @@ var og = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
17850
17936
  };
17851
17937
  //#endregion
17852
17938
  //#region src/components/widgets/grid-core/GridGalleryView.tsx
17853
- function lg({ records: e, recordId: t, sortable: n, pagination: r, selection: i = !1, selectedKeys: a, onSelectionChange: o, onRowClick: s, groupBy: c, wrapperClassName: l, before: u, after: d, columns: p, overlays: m, renderItem: h }) {
17854
- let g = w(() => Am(t), [t]), _ = w(() => e.reduce((e, t) => (e.set(g(t), t), e), /* @__PURE__ */ new Map()), [g, e]), v = w(() => e.map((e) => ({
17939
+ function dg({ records: e, recordId: t, sortable: n, pagination: r, selection: i = !1, selectedKeys: a, onSelectionChange: o, onRowClick: s, groupBy: c, wrapperClassName: l, before: u, after: d, columns: p, overlays: m, renderItem: h }) {
17940
+ let g = w(() => Mm(t), [t]), _ = w(() => e.reduce((e, t) => (e.set(g(t), t), e), /* @__PURE__ */ new Map()), [g, e]), v = w(() => e.map((e) => ({
17855
17941
  ...e,
17856
17942
  [fo]: g(e)
17857
17943
  })), [e, g]);
17858
- return /* @__PURE__ */ f.createElement(cg, {
17944
+ return /* @__PURE__ */ f.createElement(ug, {
17859
17945
  records: v,
17860
17946
  overlays: m,
17861
17947
  renderItem: h ? (e, t, n) => h(e, t, n) : void 0,
@@ -17891,8 +17977,8 @@ function lg({ records: e, recordId: t, sortable: n, pagination: r, selection: i
17891
17977
  }
17892
17978
  //#endregion
17893
17979
  //#region src/components/widgets/grid-core/useGridActions.tsx
17894
- function ug({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId: i, sourcePath: a, db: o, onSave: s, onDelete: c, onComplete: l, audit: u = !1 }) {
17895
- let d = M(), p = N(), m = x(), h = ip(), g = w(() => Am(i), [i]), _ = w(() => Im(e, !!t), [e, t]), [y, S] = E(null), C = w(() => `${km(a || "grid-records")}-${km(m)}`, [m, a]), T = v(() => {
17980
+ function fg({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId: i, sourcePath: a, db: o, onSave: s, onDelete: c, onComplete: l, audit: u = !1 }) {
17981
+ let d = M(), p = N(), m = x(), h = ip(), g = w(() => Mm(i), [i]), _ = w(() => Rm(e, !!t), [e, t]), [y, S] = E(null), C = w(() => `${jm(a || "grid-records")}-${jm(m)}`, [m, a]), T = v(() => {
17896
17982
  S(null), n && d.hash.startsWith(`#${C}:`) && p({
17897
17983
  pathname: d.pathname,
17898
17984
  search: d.search,
@@ -17923,7 +18009,7 @@ function ug({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId
17923
18009
  a
17924
18010
  ]), O = v(async () => h.save(), [h]), k = v(async (e, t) => {
17925
18011
  let r = _[e];
17926
- if (!r || !Lm(r, t) || Rm(r, t)) return;
18012
+ if (!r || !zm(r, t) || Bm(r, t)) return;
17927
18013
  let i = {
17928
18014
  actionKey: e,
17929
18015
  record: t,
@@ -18085,8 +18171,8 @@ function ug({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId
18085
18171
  }
18086
18172
  //#endregion
18087
18173
  //#region src/components/widgets/grid-core/useGridColumns.ts
18088
- function dg({ columns: e, records: t, form: n }) {
18089
- return w(() => Fm(e, t, n), [
18174
+ function pg({ columns: e, records: t, form: n }) {
18175
+ return w(() => Lm(e, t, n), [
18090
18176
  e,
18091
18177
  n,
18092
18178
  t
@@ -18094,7 +18180,7 @@ function dg({ columns: e, records: t, form: n }) {
18094
18180
  }
18095
18181
  //#endregion
18096
18182
  //#region src/components/widgets/grid-core/useGridPreparedRecords.ts
18097
- function fg({ records: e, onLoad: t }) {
18183
+ function mg({ records: e, onLoad: t }) {
18098
18184
  let [n, r] = E(e), [i, a] = E(!1);
18099
18185
  return b(() => {
18100
18186
  if (!t) {
@@ -18117,7 +18203,7 @@ function fg({ records: e, onLoad: t }) {
18117
18203
  }
18118
18204
  //#endregion
18119
18205
  //#region src/components/widgets/grid-core/useGridSelection.ts
18120
- function pg({ selection: e }) {
18206
+ function hg({ selection: e }) {
18121
18207
  let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = E(r ?? []), [s, c] = E([]), l = r?.join("\0") ?? "";
18122
18208
  b(() => {
18123
18209
  o(r ?? []), c([]);
@@ -18150,7 +18236,7 @@ function pg({ selection: e }) {
18150
18236
  }
18151
18237
  //#endregion
18152
18238
  //#region src/components/widgets/grid-core/GridCore.tsx
18153
- var mg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || zm(e, t, i) : zm(e, t, i), hg = (e) => {
18239
+ var gg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || Vm(e, t, i) : Vm(e, t, i), _g = (e) => {
18154
18240
  switch (e.kind) {
18155
18241
  case "select": return "";
18156
18242
  case "multiselect": return [];
@@ -18164,7 +18250,7 @@ var mg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
18164
18250
  };
18165
18251
  default: return e.defaultValue ?? !1;
18166
18252
  }
18167
- }, gg = (e, t) => {
18253
+ }, vg = (e, t) => {
18168
18254
  switch (e.kind) {
18169
18255
  case "select": return typeof t == "string" && t !== "";
18170
18256
  case "multiselect": return Array.isArray(t) && t.length > 0;
@@ -18178,7 +18264,7 @@ var mg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
18178
18264
  }
18179
18265
  default: return !!t != !!(e.defaultValue ?? !1);
18180
18266
  }
18181
- }, _g = (e, t, n) => {
18267
+ }, yg = (e, t, n) => {
18182
18268
  switch (e.kind) {
18183
18269
  case "select": return e.predicate(t, n);
18184
18270
  case "multiselect": return e.predicate(t, n);
@@ -18186,7 +18272,7 @@ var mg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
18186
18272
  case "numberRange": return e.predicate(t, n);
18187
18273
  default: return e.predicate(t, n);
18188
18274
  }
18189
- }, vg = (e, t, n) => {
18275
+ }, bg = (e, t, n) => {
18190
18276
  switch (e.kind) {
18191
18277
  case "select": {
18192
18278
  let n = e.options.find((e) => e.value === t);
@@ -18210,10 +18296,10 @@ var mg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
18210
18296
  }
18211
18297
  default: return e.label;
18212
18298
  }
18213
- }, yg = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
18214
- function bg({ filter: e, value: t, onChange: n, dict: r }) {
18299
+ }, xg = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
18300
+ function Sg({ filter: e, value: t, onChange: n, dict: r }) {
18215
18301
  if (e.kind === "select") return /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("select", {
18216
- className: yg,
18302
+ className: xg,
18217
18303
  value: t,
18218
18304
  onChange: (e) => n(e.target.value)
18219
18305
  }, /* @__PURE__ */ f.createElement("option", { value: "" }, r.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ f.createElement("option", {
@@ -18235,7 +18321,7 @@ function bg({ filter: e, value: t, onChange: n, dict: r }) {
18235
18321
  let i = t;
18236
18322
  return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeFrom), /* @__PURE__ */ f.createElement("input", {
18237
18323
  type: "date",
18238
- className: yg,
18324
+ className: xg,
18239
18325
  value: i.from,
18240
18326
  onChange: (e) => n({
18241
18327
  ...i,
@@ -18243,7 +18329,7 @@ function bg({ filter: e, value: t, onChange: n, dict: r }) {
18243
18329
  })
18244
18330
  })), /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeTo), /* @__PURE__ */ f.createElement("input", {
18245
18331
  type: "date",
18246
- className: yg,
18332
+ className: xg,
18247
18333
  value: i.to,
18248
18334
  onChange: (e) => n({
18249
18335
  ...i,
@@ -18255,7 +18341,7 @@ function bg({ filter: e, value: t, onChange: n, dict: r }) {
18255
18341
  let i = t;
18256
18342
  return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeMin), /* @__PURE__ */ f.createElement("input", {
18257
18343
  type: "number",
18258
- className: yg,
18344
+ className: xg,
18259
18345
  value: i.min ?? "",
18260
18346
  onChange: (e) => n({
18261
18347
  ...i,
@@ -18263,7 +18349,7 @@ function bg({ filter: e, value: t, onChange: n, dict: r }) {
18263
18349
  })
18264
18350
  })), /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeMax), /* @__PURE__ */ f.createElement("input", {
18265
18351
  type: "number",
18266
- className: yg,
18352
+ className: xg,
18267
18353
  value: i.max ?? "",
18268
18354
  onChange: (e) => n({
18269
18355
  ...i,
@@ -18282,15 +18368,15 @@ function bg({ filter: e, value: t, onChange: n, dict: r }) {
18282
18368
  className: X("pointer-events-none absolute inset-0 rounded-full transition-colors duration-200 ease-out peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2", i ? "bg-primary" : "bg-muted-foreground/35")
18283
18369
  }, /* @__PURE__ */ f.createElement("span", { className: X("pointer-events-none absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-background shadow-sm transition-transform duration-200 ease-out", i && "translate-x-4") }))), /* @__PURE__ */ f.createElement("span", { className: "text-sm text-foreground" }, e.label));
18284
18370
  }
18285
- function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, form: a, editDeepLink: o, header: s, footer: c, view: l = "table", views: u, sticky: d, wrapperClassName: p, cardClassName: m, bodyClassName: h, loading: g = !1, title: _, before: y, after: x, sortable: S = !0, pagination: C, selection: T, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
18286
- let R = J("grid"), z = Y("grid"), B = Y("common"), V = w(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Bi(), { preparedRecords: U, loading: ee } = fg({
18371
+ function Cg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, form: a, editDeepLink: o, header: s, footer: c, view: l = "table", views: u, sticky: d, wrapperClassName: p, cardClassName: m, bodyClassName: h, loading: g = !1, title: _, before: y, after: x, sortable: S = !0, pagination: C, selection: T, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
18372
+ let R = J("grid"), z = Y("grid"), B = Y("common"), V = w(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Bi(), { preparedRecords: U, loading: ee } = mg({
18287
18373
  records: e,
18288
18374
  onLoad: L
18289
- }), te = dg({
18375
+ }), te = pg({
18290
18376
  columns: r,
18291
18377
  records: U,
18292
18378
  form: a
18293
- }), [ne, re] = E(() => Object.fromEntries((M ?? []).map((e) => [e.key, hg(e)]))), [W, G] = E(!1), ie = v((e, t) => {
18379
+ }), [ne, re] = E(() => Object.fromEntries((M ?? []).map((e) => [e.key, _g(e)]))), [W, G] = E(!1), ie = v((e, t) => {
18294
18380
  re((n) => ({
18295
18381
  ...n,
18296
18382
  [e]: t
@@ -18298,9 +18384,9 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18298
18384
  }, []), ae = v((e) => {
18299
18385
  re((t) => ({
18300
18386
  ...t,
18301
- [e.key]: hg(e)
18387
+ [e.key]: _g(e)
18302
18388
  }));
18303
- }, []), oe = (M ?? []).filter((e) => gg(e, ne[e.key] ?? hg(e))), se = w(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => _g(t, e, ne[t.key] ?? hg(t)))), [
18389
+ }, []), oe = (M ?? []).filter((e) => vg(e, ne[e.key] ?? _g(e))), se = w(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => yg(t, e, ne[t.key] ?? _g(t)))), [
18304
18390
  U,
18305
18391
  M,
18306
18392
  ne
@@ -18315,7 +18401,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18315
18401
  key: e.key,
18316
18402
  variant: "info",
18317
18403
  className: "inline-flex items-center gap-1"
18318
- }, vg(e, ne[e.key] ?? hg(e), z), /* @__PURE__ */ f.createElement(ri, {
18404
+ }, bg(e, ne[e.key] ?? _g(e), z), /* @__PURE__ */ f.createElement(ri, {
18319
18405
  icon: "x",
18320
18406
  variant: "link",
18321
18407
  ariaLabel: `${z.filtersClearAll} ${e.label}`,
@@ -18330,12 +18416,12 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18330
18416
  label: z.filtersClearAll,
18331
18417
  variant: "link",
18332
18418
  disabled: oe.length === 0,
18333
- onClick: () => re(Object.fromEntries(M.map((e) => [e.key, hg(e)])))
18419
+ onClick: () => re(Object.fromEntries(M.map((e) => [e.key, _g(e)])))
18334
18420
  })
18335
- }, /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ f.createElement(bg, {
18421
+ }, /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ f.createElement(Sg, {
18336
18422
  key: e.key,
18337
18423
  filter: e,
18338
- value: ne[e.key] ?? hg(e),
18424
+ value: ne[e.key] ?? _g(e),
18339
18425
  onChange: (t) => ie(e.key, t),
18340
18426
  dict: z
18341
18427
  })))) : null, fe = j === !0 ? {} : j || void 0, [pe, me] = E(""), K = w(() => {
@@ -18394,7 +18480,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18394
18480
  ve.overlays,
18395
18481
  ve.renderItem,
18396
18482
  ke
18397
- ]), { mode: je, activeSelectionKeys: Me, selectionState: Ne, handleSelectionChange: Pe } = pg({ selection: T }), { normalizedActions: Fe, activeAction: Ie, activeActionConfig: q, activeActionBody: Le, activeKey: Re, runAction: ze, close: Be, getActionContext: Ve, getModalActionContext: He, getRecordKey: Ue, formController: We } = ug({
18483
+ ]), { mode: je, activeSelectionKeys: Me, selectionState: Ne, handleSelectionChange: Pe } = hg({ selection: T }), { normalizedActions: Fe, activeAction: Ie, activeActionConfig: q, activeActionBody: Le, activeKey: Re, runAction: ze, close: Be, getActionContext: Ve, getModalActionContext: He, getRecordKey: Ue, formController: We } = fg({
18398
18484
  actions: i,
18399
18485
  form: a,
18400
18486
  editDeepLink: o,
@@ -18424,18 +18510,18 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18424
18510
  ze
18425
18511
  ]), Je = D || Ke ? qe : void 0, Ye = v((e, t, n) => {
18426
18512
  let r = Fe[e];
18427
- return !r || !Lm(r, t) ? null : /* @__PURE__ */ f.createElement(ri, {
18513
+ return !r || !zm(r, t) ? null : /* @__PURE__ */ f.createElement(ri, {
18428
18514
  className: n || (e === "add" ? "btn-primary" : void 0),
18429
18515
  icon: r.icon,
18430
- label: zm(e, r, V),
18431
- disabled: Rm(r, t),
18516
+ label: Vm(e, r, V),
18517
+ disabled: Bm(r, t),
18432
18518
  onClick: () => ze(e, t)
18433
18519
  });
18434
18520
  }, [
18435
18521
  Fe,
18436
18522
  ze,
18437
18523
  V
18438
- ]), Xe = w(() => Object.entries(Fe).filter(([e, t]) => e !== "edit" && e !== "delete" && Lm(t, void 0)).map(([e]) => e), [Fe]), Ze = w(() => ({
18524
+ ]), Xe = w(() => Object.entries(Fe).filter(([e, t]) => e !== "edit" && e !== "delete" && zm(t, void 0)).map(([e]) => e), [Fe]), Ze = w(() => ({
18439
18525
  title: _,
18440
18526
  records: U,
18441
18527
  selection: Ne,
@@ -18528,7 +18614,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18528
18614
  if (q.footer === !1) return !1;
18529
18615
  if (q.footer !== void 0 && it) return typeof q.footer == "function" ? q.footer(it) : q.footer;
18530
18616
  }
18531
- }, [q, it]), st = Bm(S);
18617
+ }, [q, it]), st = Hm(S);
18532
18618
  return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(Ki, {
18533
18619
  wrapperClassName: p,
18534
18620
  header: nt,
@@ -18538,7 +18624,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18538
18624
  bodyClassName: X(R.Grid.Card.bodyClassName, h),
18539
18625
  footerClassName: R.Grid.Card.footerClassName,
18540
18626
  loading: g || ee
18541
- }, ye === "gallery" ? /* @__PURE__ */ f.createElement(lg, {
18627
+ }, ye === "gallery" ? /* @__PURE__ */ f.createElement(dg, {
18542
18628
  records: K,
18543
18629
  recordId: t,
18544
18630
  sortable: st || S,
@@ -18554,7 +18640,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18554
18640
  columns: ve.columns,
18555
18641
  overlays: Ae,
18556
18642
  renderItem: ve.renderItem
18557
- }) : /* @__PURE__ */ f.createElement(Vm, {
18643
+ }) : /* @__PURE__ */ f.createElement(Um, {
18558
18644
  records: K,
18559
18645
  recordId: t,
18560
18646
  columns: we,
@@ -18580,7 +18666,7 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18580
18666
  size: (q.kind === "modal" || q.kind === "delete") && q.size || R.Grid.Modal.size,
18581
18667
  position: (q.kind === "modal" || q.kind === "delete") && q.position || R.Grid.Modal.position,
18582
18668
  header: at,
18583
- title: mg(Ie.actionKey, q, q.kind === "modal" || q.kind === "delete" ? He(Ie.actionKey, Ie.record) : Ve(Ie.actionKey, Ie.record), z.deleteConfirm, V),
18669
+ title: gg(Ie.actionKey, q, q.kind === "modal" || q.kind === "delete" ? He(Ie.actionKey, Ie.record) : Ve(Ie.actionKey, Ie.record), z.deleteConfirm, V),
18584
18670
  onClose: Be,
18585
18671
  onSave: q.kind === "modal" && q.footer === void 0 && (Ie.actionKey === "add" || Ie.actionKey === "edit") ? (e) => We.save(e) : void 0,
18586
18672
  onDelete: q.kind === "delete" ? async () => {
@@ -18608,18 +18694,18 @@ function xg({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
18608
18694
  }
18609
18695
  //#endregion
18610
18696
  //#region src/components/widgets/grid-core/GridArray.tsx
18611
- function Sg(e) {
18612
- return /* @__PURE__ */ f.createElement(xg, e);
18697
+ function wg(e) {
18698
+ return /* @__PURE__ */ f.createElement(Cg, e);
18613
18699
  }
18614
18700
  //#endregion
18615
18701
  //#region src/components/widgets/Grid.tsx
18616
- function Cg(e) {
18617
- return "records" in e ? /* @__PURE__ */ f.createElement(Sg, e) : /* @__PURE__ */ f.createElement(Om, e);
18702
+ function Tg(e) {
18703
+ return "records" in e ? /* @__PURE__ */ f.createElement(wg, e) : /* @__PURE__ */ f.createElement(Am, e);
18618
18704
  }
18619
18705
  //#endregion
18620
18706
  //#region src/pages/Users.tsx
18621
- function wg() {
18622
- return /* @__PURE__ */ f.createElement(Cg, {
18707
+ function Eg() {
18708
+ return /* @__PURE__ */ f.createElement(Tg, {
18623
18709
  path: "/users",
18624
18710
  recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
18625
18711
  form: /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(Uc, {
@@ -18646,10 +18732,10 @@ function wg() {
18646
18732
  }
18647
18733
  //#endregion
18648
18734
  //#region src/pages/NotFound.tsx
18649
- var Tg = () => {
18735
+ var Dg = () => {
18650
18736
  let e = Y("common");
18651
18737
  return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ f.createElement("h1", null, "404"), /* @__PURE__ */ f.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ f.createElement(k, { to: "/" }, /* @__PURE__ */ f.createElement(Q, { name: "house-door" }), " ", e.goHome));
18652
- }, Eg = ({ size: e = 28 }) => /* @__PURE__ */ f.createElement("svg", {
18738
+ }, Og = ({ size: e = 28 }) => /* @__PURE__ */ f.createElement("svg", {
18653
18739
  xmlns: "http://www.w3.org/2000/svg",
18654
18740
  width: e,
18655
18741
  height: e,
@@ -18669,7 +18755,7 @@ var Tg = () => {
18669
18755
  x2: "12.01",
18670
18756
  y1: "17",
18671
18757
  y2: "17"
18672
- })), Dg = ({ open: e }) => /* @__PURE__ */ f.createElement("svg", {
18758
+ })), kg = ({ open: e }) => /* @__PURE__ */ f.createElement("svg", {
18673
18759
  xmlns: "http://www.w3.org/2000/svg",
18674
18760
  width: "13",
18675
18761
  height: "13",
@@ -18684,7 +18770,7 @@ var Tg = () => {
18684
18770
  transform: e ? "rotate(180deg)" : "none",
18685
18771
  flexShrink: 0
18686
18772
  }
18687
- }, /* @__PURE__ */ f.createElement("polyline", { points: "6 9 12 15 18 9" })), Og = () => /* @__PURE__ */ f.createElement("svg", {
18773
+ }, /* @__PURE__ */ f.createElement("polyline", { points: "6 9 12 15 18 9" })), Ag = () => /* @__PURE__ */ f.createElement("svg", {
18688
18774
  xmlns: "http://www.w3.org/2000/svg",
18689
18775
  width: "13",
18690
18776
  height: "13",
@@ -18701,7 +18787,7 @@ var Tg = () => {
18701
18787
  y: "8",
18702
18788
  rx: "2",
18703
18789
  ry: "2"
18704
- }), /* @__PURE__ */ f.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), kg = () => /* @__PURE__ */ f.createElement("svg", {
18790
+ }), /* @__PURE__ */ f.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), jg = () => /* @__PURE__ */ f.createElement("svg", {
18705
18791
  xmlns: "http://www.w3.org/2000/svg",
18706
18792
  width: "13",
18707
18793
  height: "13",
@@ -18711,7 +18797,7 @@ var Tg = () => {
18711
18797
  strokeWidth: "2",
18712
18798
  strokeLinecap: "round",
18713
18799
  strokeLinejoin: "round"
18714
- }, /* @__PURE__ */ f.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ f.createElement("path", { d: "M22 2 11 13" })), Ag = () => /* @__PURE__ */ f.createElement("svg", {
18800
+ }, /* @__PURE__ */ f.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ f.createElement("path", { d: "M22 2 11 13" })), Mg = () => /* @__PURE__ */ f.createElement("svg", {
18715
18801
  xmlns: "http://www.w3.org/2000/svg",
18716
18802
  width: "14",
18717
18803
  height: "14",
@@ -18721,7 +18807,7 @@ var Tg = () => {
18721
18807
  strokeWidth: "2",
18722
18808
  strokeLinecap: "round",
18723
18809
  strokeLinejoin: "round"
18724
- }, /* @__PURE__ */ f.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ f.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ f.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ f.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ f.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ f.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ f.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ f.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ f.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ f.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), jg = (e, t) => ({
18810
+ }, /* @__PURE__ */ f.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ f.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ f.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ f.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ f.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ f.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ f.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ f.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ f.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ f.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), Ng = (e, t) => ({
18725
18811
  error: {
18726
18812
  message: e.message,
18727
18813
  stack: e.stack ?? ""
@@ -18732,8 +18818,8 @@ var Tg = () => {
18732
18818
  userAgent: typeof navigator < "u" ? navigator.userAgent : "",
18733
18819
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
18734
18820
  }
18735
- }), Mg = (e, t) => {
18736
- let n = jg(e, t);
18821
+ }), Pg = (e, t) => {
18822
+ let n = Ng(e, t);
18737
18823
  return [
18738
18824
  `Error: ${n.error.message}`,
18739
18825
  "",
@@ -18748,7 +18834,7 @@ var Tg = () => {
18748
18834
  `Timestamp: ${n.context.timestamp}`,
18749
18835
  `Agent: ${n.context.userAgent}`
18750
18836
  ].join("\n");
18751
- }, Ng = ({ children: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, e(Yn().errorBoundary)), Pg = class extends f.Component {
18837
+ }, Fg = ({ children: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, e(Yn().errorBoundary)), Ig = class extends f.Component {
18752
18838
  constructor(e) {
18753
18839
  super(e), this.state = {
18754
18840
  error: null,
@@ -18770,7 +18856,7 @@ var Tg = () => {
18770
18856
  };
18771
18857
  copy = () => {
18772
18858
  let { error: e, errorInfo: t } = this.state;
18773
- e && navigator.clipboard?.writeText(Mg(e, t)).then(() => {
18859
+ e && navigator.clipboard?.writeText(Pg(e, t)).then(() => {
18774
18860
  this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
18775
18861
  });
18776
18862
  };
@@ -18779,7 +18865,7 @@ var Tg = () => {
18779
18865
  e && n && (this.setState({ reportState: "sending" }), fetch(n, {
18780
18866
  method: "POST",
18781
18867
  headers: { "Content-Type": "application/json" },
18782
- body: JSON.stringify(jg(e, t))
18868
+ body: JSON.stringify(Ng(e, t))
18783
18869
  }).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
18784
18870
  };
18785
18871
  render() {
@@ -18789,16 +18875,16 @@ var Tg = () => {
18789
18875
  if (typeof o == "function") return o(e, this.reset);
18790
18876
  if (o != null) return o;
18791
18877
  let u = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), d = (t?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = c ? "flex min-h-screen flex-col items-center justify-center bg-background p-8" : "flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center p-8";
18792
- return /* @__PURE__ */ f.createElement(Ng, null, (t) => /* @__PURE__ */ f.createElement("div", { className: p }, /* @__PURE__ */ f.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ f.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ f.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ f.createElement(Eg, { size: 22 })), /* @__PURE__ */ f.createElement("div", null, /* @__PURE__ */ f.createElement("p", { className: "text-sm font-semibold text-foreground" }, t.title), /* @__PURE__ */ f.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, t.description))), /* @__PURE__ */ f.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ f.createElement("button", {
18878
+ return /* @__PURE__ */ f.createElement(Fg, null, (t) => /* @__PURE__ */ f.createElement("div", { className: p }, /* @__PURE__ */ f.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ f.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ f.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ f.createElement(Og, { size: 22 })), /* @__PURE__ */ f.createElement("div", null, /* @__PURE__ */ f.createElement("p", { className: "text-sm font-semibold text-foreground" }, t.title), /* @__PURE__ */ f.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, t.description))), /* @__PURE__ */ f.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ f.createElement("button", {
18793
18879
  onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
18794
18880
  className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
18795
- }, /* @__PURE__ */ f.createElement(Dg, { open: n }), t.technicalDetails, /* @__PURE__ */ f.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), n && /* @__PURE__ */ f.createElement("div", { className: "border-t" }, /* @__PURE__ */ f.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, u.join("\n")))), l && /* @__PURE__ */ f.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ f.createElement("button", {
18881
+ }, /* @__PURE__ */ f.createElement(kg, { open: n }), t.technicalDetails, /* @__PURE__ */ f.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), n && /* @__PURE__ */ f.createElement("div", { className: "border-t" }, /* @__PURE__ */ f.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, u.join("\n")))), l && /* @__PURE__ */ f.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ f.createElement("button", {
18796
18882
  onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
18797
18883
  className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-amber-700 dark:text-amber-400 transition-colors hover:opacity-80"
18798
- }, /* @__PURE__ */ f.createElement(Ag, null), /* @__PURE__ */ f.createElement(Dg, { open: r }), t.debugInformation, /* @__PURE__ */ f.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), r && /* @__PURE__ */ f.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.context), /* @__PURE__ */ f.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.time), /* @__PURE__ */ f.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.agent), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), d.length > 0 && /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.componentTree), /* @__PURE__ */ f.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, d.join("\n"))), /* @__PURE__ */ f.createElement("button", {
18884
+ }, /* @__PURE__ */ f.createElement(Mg, null), /* @__PURE__ */ f.createElement(kg, { open: r }), t.debugInformation, /* @__PURE__ */ f.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), r && /* @__PURE__ */ f.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.context), /* @__PURE__ */ f.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.time), /* @__PURE__ */ f.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.agent), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), d.length > 0 && /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.componentTree), /* @__PURE__ */ f.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, d.join("\n"))), /* @__PURE__ */ f.createElement("button", {
18799
18885
  onClick: this.copy,
18800
18886
  className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
18801
- }, /* @__PURE__ */ f.createElement(Og, null), i ? t.copied : t.copyDebug))), /* @__PURE__ */ f.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ f.createElement("button", {
18887
+ }, /* @__PURE__ */ f.createElement(Ag, null), i ? t.copied : t.copyDebug))), /* @__PURE__ */ f.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ f.createElement("button", {
18802
18888
  onClick: this.reset,
18803
18889
  className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
18804
18890
  }, t.tryAgain), /* @__PURE__ */ f.createElement("a", {
@@ -18808,15 +18894,15 @@ var Tg = () => {
18808
18894
  onClick: this.sendReport,
18809
18895
  disabled: a === "sending" || a === "sent",
18810
18896
  className: "ml-auto flex items-center gap-1.5 rounded-md border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-accent disabled:opacity-50"
18811
- }, /* @__PURE__ */ f.createElement(kg, null), a === "idle" && t.sendReport, a === "sending" && t.sending, a === "sent" && t.reportSent, a === "failed" && t.reportFailed)))));
18897
+ }, /* @__PURE__ */ f.createElement(jg, null), a === "idle" && t.sendReport, a === "sending" && t.sending, a === "sent" && t.reportSent, a === "failed" && t.reportFailed)))));
18812
18898
  }
18813
- }, Fg = async () => {
18899
+ }, Lg = async () => {
18814
18900
  window.google?.accounts?.id || (At([{
18815
18901
  src: "https://accounts.google.com/gsi/client",
18816
18902
  async: !0,
18817
18903
  clean: !0
18818
18904
  }]), await new Promise((e) => setTimeout(e, 0)));
18819
- }, Ig = class {
18905
+ }, Rg = class {
18820
18906
  getConfigurationState() {
18821
18907
  return xi("GoogleAuthProvider", bi(eo("oAuth2"), ["clientId"], "google.oAuth2."));
18822
18908
  }
@@ -18839,7 +18925,7 @@ var Tg = () => {
18839
18925
  async signIn(e = {}) {
18840
18926
  let t = eo("oAuth2");
18841
18927
  if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
18842
- return await Fg(), new Promise((n, r) => {
18928
+ return await Lg(), new Promise((n, r) => {
18843
18929
  if (!window.google?.accounts?.id) {
18844
18930
  r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
18845
18931
  return;
@@ -18920,41 +19006,41 @@ var Tg = () => {
18920
19006
  isAuthenticated() {
18921
19007
  return !!this.getUser();
18922
19008
  }
18923
- }, Lg = g(null), Rg = ({ registry: e, defaultKey: t, children: n }) => {
19009
+ }, zg = g(null), Bg = ({ registry: e, defaultKey: t, children: n }) => {
18924
19010
  let r = w(() => ({
18925
19011
  registry: e,
18926
19012
  defaultKey: t
18927
19013
  }), [e, t]);
18928
- return /* @__PURE__ */ f.createElement(Lg.Provider, { value: r }, n);
18929
- }, zg = (e) => {
18930
- let t = y(Lg);
19014
+ return /* @__PURE__ */ f.createElement(zg.Provider, { value: r }, n);
19015
+ }, Vg = (e) => {
19016
+ let t = y(zg);
18931
19017
  if (!t) return null;
18932
19018
  let n = e ?? t.defaultKey;
18933
19019
  return t.registry[n] ?? null;
18934
- }, Bg = g(null), Vg = ({ registry: e, defaultKey: t, children: n }) => {
19020
+ }, Hg = g(null), Ug = ({ registry: e, defaultKey: t, children: n }) => {
18935
19021
  let r = w(() => ({
18936
19022
  registry: e,
18937
19023
  defaultKey: t
18938
19024
  }), [e, t]);
18939
- return /* @__PURE__ */ f.createElement(Bg.Provider, { value: r }, n);
18940
- }, Hg = (e) => {
18941
- let t = y(Bg);
19025
+ return /* @__PURE__ */ f.createElement(Hg.Provider, { value: r }, n);
19026
+ }, Wg = (e) => {
19027
+ let t = y(Hg);
18942
19028
  if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
18943
19029
  let n = e ?? t.defaultKey, r = t.registry[n];
18944
19030
  if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
18945
19031
  return r;
18946
- }, Ug = {
19032
+ }, Gg = {
18947
19033
  key: "@key",
18948
19034
  value: "@value"
18949
- }, Wg = () => Je(), Gg = (e, t, n) => {
19035
+ }, Kg = () => Je(), qg = (e, t, n) => {
18950
19036
  let r = `Error during ${e}: ${String(t)}`;
18951
19037
  if (n) throw Error(r);
18952
19038
  console.error(r);
18953
- }, Kg = (e, t) => {
19039
+ }, Jg = (e, t) => {
18954
19040
  if (!e || !(t in e)) return e;
18955
19041
  let { [t]: n, ...r } = e;
18956
19042
  return Object.keys(r).length ? r : void 0;
18957
- }, qg = (e) => {
19043
+ }, Yg = (e) => {
18958
19044
  let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
18959
19045
  return t.gt !== void 0 && (n = {
18960
19046
  ...n,
@@ -18972,28 +19058,28 @@ var Tg = () => {
18972
19058
  condition: t,
18973
19059
  clientCondition: n
18974
19060
  };
18975
- }, Jg = (e, t) => {
19061
+ }, Xg = (e, t) => {
18976
19062
  switch (t) {
18977
- case Ug.key: return $e(e, Ze());
18978
- case Ug.value: return $e(e, Qe());
19063
+ case Gg.key: return $e(e, Ze());
19064
+ case Gg.value: return $e(e, Qe());
18979
19065
  default: return $e(e, Xe(t));
18980
19066
  }
18981
- }, Yg = (e, t, n) => {
19067
+ }, Zg = (e, t, n) => {
18982
19068
  let [r] = Object.entries(t || {});
18983
19069
  if (!r) return {
18984
19070
  dbRef: e,
18985
19071
  clientWhere: n
18986
19072
  };
18987
- let [i] = r, a = Jg(e, i), o = n?.[i];
19073
+ let [i] = r, a = Xg(e, i), o = n?.[i];
18988
19074
  if (o == null) return {
18989
19075
  dbRef: a,
18990
19076
  clientWhere: n
18991
19077
  };
18992
- let { condition: s, clientCondition: c } = qg(o);
19078
+ let { condition: s, clientCondition: c } = Yg(o);
18993
19079
  switch (!0) {
18994
19080
  case s.eq !== void 0: return {
18995
19081
  dbRef: $e(a, Ke(s.eq)),
18996
- clientWhere: Kg(n, i)
19082
+ clientWhere: Jg(n, i)
18997
19083
  };
18998
19084
  case s.gte !== void 0 && s.lte !== void 0:
18999
19085
  a = $e(a, rt(s.gte), Ge(s.lte));
@@ -19021,11 +19107,11 @@ var Tg = () => {
19021
19107
  return {
19022
19108
  dbRef: a,
19023
19109
  clientWhere: c ? {
19024
- ...Kg(n, i) || {},
19110
+ ...Jg(n, i) || {},
19025
19111
  [i]: c
19026
- } : Kg(n, i)
19112
+ } : Jg(n, i)
19027
19113
  };
19028
- }, Xg = (e, t) => {
19114
+ }, Qg = (e, t) => {
19029
19115
  if (!t) return e;
19030
19116
  let n = t.split("."), r = e;
19031
19117
  for (let e of n) {
@@ -19033,10 +19119,10 @@ var Tg = () => {
19033
19119
  r = r[e];
19034
19120
  }
19035
19121
  return r;
19036
- }, Zg = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
19122
+ }, $g = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
19037
19123
  numeric: !0,
19038
19124
  sensitivity: "base"
19039
- }), Qg = (e, t) => {
19125
+ }), e_ = (e, t) => {
19040
19126
  let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
19041
19127
  for (let [t, r] of Object.entries(n)) switch (t) {
19042
19128
  case "eq":
@@ -19063,23 +19149,23 @@ var Tg = () => {
19063
19149
  default: return !1;
19064
19150
  }
19065
19151
  return !0;
19066
- }, $g = (e, t, n) => {
19152
+ }, t_ = (e, t, n) => {
19067
19153
  let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
19068
- if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Qg(Xg(e, t), n)))), r) {
19154
+ if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => e_(Qg(e, t), n)))), r) {
19069
19155
  let e = [r, ...i];
19070
19156
  o.sort((t, n) => {
19071
19157
  for (let [r, i] of e) {
19072
- let e = Zg(Xg(t[1], r), Xg(n[1], r));
19158
+ let e = $g(Qg(t[1], r), Qg(n[1], r));
19073
19159
  if (e) return i === "desc" ? -e : e;
19074
19160
  }
19075
19161
  return 0;
19076
19162
  });
19077
19163
  }
19078
19164
  return Object.fromEntries(o);
19079
- }, e_ = async (e) => {
19080
- let t = await so()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, et(Wg()).toString());
19165
+ }, n_ = async (e) => {
19166
+ let t = await so()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, et(Kg()).toString());
19081
19167
  return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
19082
- }, t_ = class e {
19168
+ }, r_ = class e {
19083
19169
  static listenerRegistered = !1;
19084
19170
  constructor() {
19085
19171
  !e.listenerRegistered && typeof Xa == "function" && (e.listenerRegistered = !0, Xa((e) => {
@@ -19094,44 +19180,44 @@ var Tg = () => {
19094
19180
  }
19095
19181
  readShallow = async (e, t = !1) => {
19096
19182
  try {
19097
- let t = await e_(e), n = await fetch(t);
19183
+ let t = await n_(e), n = await fetch(t);
19098
19184
  if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
19099
19185
  let r = await n.json();
19100
19186
  return r ? Object.keys(r) : [];
19101
19187
  } catch (n) {
19102
- return Gg(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
19188
+ return qg(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
19103
19189
  }
19104
19190
  };
19105
19191
  read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
19106
- let { dbRef: a, clientWhere: o } = Yg(et(Wg(), e), n, t);
19192
+ let { dbRef: a, clientWhere: o } = Zg(et(Kg(), e), n, t);
19107
19193
  try {
19108
19194
  let t = await qe(a);
19109
19195
  if (t.exists()) {
19110
19196
  `${e}`;
19111
- let i = $g(t.val(), o, n);
19197
+ let i = t_(t.val(), o, n);
19112
19198
  return r ? Object.values(i) : i;
19113
19199
  }
19114
- i && Gg(`Data not found in Firebase for path ${e}`, null, i);
19200
+ i && qg(`Data not found in Firebase for path ${e}`, null, i);
19115
19201
  } catch (t) {
19116
- Gg(`reading data in Firebase for ${e}`, t, i);
19202
+ qg(`reading data in Firebase for ${e}`, t, i);
19117
19203
  }
19118
19204
  };
19119
19205
  update = async (e, t, n = !1) => {
19120
19206
  try {
19121
- await it(et(Wg(), e), t), `${e}`;
19207
+ await it(et(Kg(), e), t), `${e}`;
19122
19208
  } catch (t) {
19123
- Gg(`updating data in Firebase for ${e}`, t, n);
19209
+ qg(`updating data in Firebase for ${e}`, t, n);
19124
19210
  }
19125
19211
  };
19126
19212
  set = async (e, t, n = !1) => {
19127
19213
  try {
19128
- await nt(et(Wg(), e), t), `${e}`;
19214
+ await nt(et(Kg(), e), t), `${e}`;
19129
19215
  } catch (t) {
19130
- Gg(`updating data in Firebase for ${e}`, t, n);
19216
+ qg(`updating data in Firebase for ${e}`, t, n);
19131
19217
  }
19132
19218
  };
19133
19219
  setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
19134
- let a = Wg(), o = et(a, e);
19220
+ let a = Kg(), o = et(a, e);
19135
19221
  try {
19136
19222
  r && (await tt(o), i?.(0, 0, `Purging existing data at ${e}`));
19137
19223
  let a = Object.entries(Gt(t)), s = Math.ceil(a.length / n);
@@ -19142,14 +19228,14 @@ var Tg = () => {
19142
19228
  i?.(r, s, `Saving chunk ${r}/${s}`);
19143
19229
  }
19144
19230
  } catch (t) {
19145
- Gg(`setting data in chunks in Firebase for ${e}`, t, !1);
19231
+ qg(`setting data in chunks in Firebase for ${e}`, t, !1);
19146
19232
  }
19147
19233
  };
19148
19234
  remove = async (e, t = !1) => {
19149
19235
  try {
19150
- await tt(et(Wg(), e)), `${e}`;
19236
+ await tt(et(Kg(), e)), `${e}`;
19151
19237
  } catch (n) {
19152
- Gg(`removing data from Firebase for ${e}`, n, t);
19238
+ qg(`removing data from Firebase for ${e}`, n, t);
19153
19239
  }
19154
19240
  };
19155
19241
  count = async (e) => (await this.readShallow(e)).length;
@@ -19157,14 +19243,14 @@ var Tg = () => {
19157
19243
  let o = so();
19158
19244
  if (!o || !e) return () => void 0;
19159
19245
  let s = () => {
19160
- let { dbRef: o, clientWhere: s } = Yg(et(Wg(), e), r, n);
19246
+ let { dbRef: o, clientWhere: s } = Zg(et(Kg(), e), r, n);
19161
19247
  return Ye(o, (e) => {
19162
19248
  let n = e.val();
19163
19249
  if (!n) {
19164
19250
  t([]);
19165
19251
  return;
19166
19252
  }
19167
- let o = a ? a($g(n, s, r)) : $g(n, s, r), c = Object.entries(o);
19253
+ let o = a ? a(t_(n, s, r)) : t_(n, s, r), c = Object.entries(o);
19168
19254
  if (!i) {
19169
19255
  t(c.map(([e, t], n) => typeof t == "object" && t ? {
19170
19256
  _index: n,
@@ -19173,22 +19259,22 @@ var Tg = () => {
19173
19259
  } : {
19174
19260
  _index: n,
19175
19261
  [fo]: e,
19176
- [Ug.value]: t
19262
+ [Gg.value]: t
19177
19263
  }));
19178
19264
  return;
19179
19265
  }
19180
19266
  let l = Object.keys(i);
19181
19267
  t(c.map(([e, t], n) => {
19182
19268
  let r = typeof t == "object" && t ? {
19183
- [Ug.key]: e,
19269
+ [Gg.key]: e,
19184
19270
  ...t
19185
19271
  } : {
19186
- [Ug.key]: e,
19187
- [Ug.value]: t
19272
+ [Gg.key]: e,
19273
+ [Gg.value]: t
19188
19274
  }, a = {};
19189
19275
  for (let n of l) {
19190
19276
  let o = i[n];
19191
- a[n] = o.includes("{") ? ft.parse(r, o) : o === Ug.key ? e : o === Ug.value ? t : r[o];
19277
+ a[n] = o.includes("{") ? ft.parse(r, o) : o === Gg.key ? e : o === Gg.value ? t : r[o];
19192
19278
  }
19193
19279
  return {
19194
19280
  [fo]: e,
@@ -19205,10 +19291,10 @@ var Tg = () => {
19205
19291
  };
19206
19292
  };
19207
19293
  };
19208
- new t_();
19294
+ new r_();
19209
19295
  //#endregion
19210
19296
  //#region src/providers/auth/firebase/FirebaseAuthProvider.ts
19211
- var n_ = {
19297
+ var i_ = {
19212
19298
  github: "github.com",
19213
19299
  apple: "apple.com",
19214
19300
  microsoft: "microsoft.com",
@@ -19216,11 +19302,11 @@ var n_ = {
19216
19302
  twitter: "twitter.com",
19217
19303
  facebook: "facebook.com"
19218
19304
  };
19219
- function r_(e) {
19220
- let t = n_[e] ?? e;
19305
+ function a_(e) {
19306
+ let t = i_[e] ?? e;
19221
19307
  return new G(t);
19222
19308
  }
19223
- function i_(e) {
19309
+ function o_(e) {
19224
19310
  return e ? {
19225
19311
  uid: e.uid,
19226
19312
  email: e.email ?? void 0,
@@ -19229,7 +19315,7 @@ function i_(e) {
19229
19315
  isAnonymous: e.isAnonymous
19230
19316
  } : null;
19231
19317
  }
19232
- var a_ = class {
19318
+ var s_ = class {
19233
19319
  options;
19234
19320
  appName;
19235
19321
  initPromise;
@@ -19243,7 +19329,7 @@ var a_ = class {
19243
19329
  return this.getConfigurationState().configured;
19244
19330
  }
19245
19331
  getUser() {
19246
- return i_(so(this.appName)?.currentUser ?? null);
19332
+ return o_(so(this.appName)?.currentUser ?? null);
19247
19333
  }
19248
19334
  isAuthenticated() {
19249
19335
  return !!this.getUser();
@@ -19255,18 +19341,18 @@ var a_ = class {
19255
19341
  let n = e.method ?? "password";
19256
19342
  if (n === "anonymous") {
19257
19343
  let { user: e } = await ue(t);
19258
- return i_(e);
19344
+ return o_(e);
19259
19345
  }
19260
19346
  if (n === "oauth") {
19261
19347
  let { provider: n } = e;
19262
19348
  if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
19263
- let { user: r } = await me(t, r_(n));
19264
- return i_(r);
19349
+ let { user: r } = await me(t, a_(n));
19350
+ return o_(r);
19265
19351
  }
19266
19352
  let { email: r, password: i } = e;
19267
19353
  if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
19268
19354
  let { user: a } = await pe(t, r, i);
19269
- return i_(a);
19355
+ return o_(a);
19270
19356
  }
19271
19357
  async signOut() {
19272
19358
  await this.initPromise;
@@ -19277,7 +19363,7 @@ var a_ = class {
19277
19363
  onAuthChange(e) {
19278
19364
  if (!this.options.config) {
19279
19365
  let t = so(this.appName);
19280
- return t ? se(t, (t) => e(i_(t))) : (e(null), () => {});
19366
+ return t ? se(t, (t) => e(o_(t))) : (e(null), () => {});
19281
19367
  }
19282
19368
  let t = () => {}, n = !1;
19283
19369
  return this.initPromise.then(() => {
@@ -19287,7 +19373,7 @@ var a_ = class {
19287
19373
  e(null);
19288
19374
  return;
19289
19375
  }
19290
- t = se(r, (t) => e(i_(t)));
19376
+ t = se(r, (t) => e(o_(t)));
19291
19377
  }), () => {
19292
19378
  n = !0, t();
19293
19379
  };
@@ -19305,26 +19391,26 @@ var a_ = class {
19305
19391
  let { claims: n } = await t.currentUser.getIdTokenResult(e);
19306
19392
  return n;
19307
19393
  }
19308
- }, o_ = "https://oauth2.googleapis.com/token";
19309
- function s_(e) {
19394
+ }, c_ = "https://oauth2.googleapis.com/token";
19395
+ function l_(e) {
19310
19396
  let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
19311
19397
  for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
19312
19398
  return r.buffer;
19313
19399
  }
19314
- function c_(e) {
19400
+ function u_(e) {
19315
19401
  return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
19316
19402
  }
19317
- async function l_(e, t) {
19318
- let n = `${c_(JSON.stringify({
19403
+ async function d_(e, t) {
19404
+ let n = `${u_(JSON.stringify({
19319
19405
  alg: "RS256",
19320
19406
  typ: "JWT"
19321
- }))}.${c_(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", s_(t), {
19407
+ }))}.${u_(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", l_(t), {
19322
19408
  name: "RSASSA-PKCS1-v1_5",
19323
19409
  hash: "SHA-256"
19324
19410
  }, !1, ["sign"]);
19325
- return `${n}.${c_(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
19411
+ return `${n}.${u_(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
19326
19412
  }
19327
- var u_ = class {
19413
+ var f_ = class {
19328
19414
  config;
19329
19415
  cache = /* @__PURE__ */ new Map();
19330
19416
  constructor(e) {
@@ -19333,13 +19419,13 @@ var u_ = class {
19333
19419
  async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
19334
19420
  let t = this.cache.get(e);
19335
19421
  if (t && t.expiresAt > Date.now() + 6e4) return t.token;
19336
- let n = Math.floor(Date.now() / 1e3), r = await l_({
19422
+ let n = Math.floor(Date.now() / 1e3), r = await d_({
19337
19423
  iss: this.config.client_email,
19338
19424
  scope: e,
19339
- aud: o_,
19425
+ aud: c_,
19340
19426
  iat: n,
19341
19427
  exp: n + 3600
19342
- }, this.config.private_key), i = await fetch(o_, {
19428
+ }, this.config.private_key), i = await fetch(c_, {
19343
19429
  method: "POST",
19344
19430
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
19345
19431
  body: new URLSearchParams({
@@ -19357,7 +19443,7 @@ var u_ = class {
19357
19443
  expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
19358
19444
  }), a.access_token;
19359
19445
  }
19360
- }, d_ = "www.dropbox.com/oauth2", f_ = class {
19446
+ }, p_ = "www.dropbox.com/oauth2", m_ = class {
19361
19447
  config;
19362
19448
  constructor(e) {
19363
19449
  this.config = e;
@@ -19381,7 +19467,7 @@ var u_ = class {
19381
19467
  async signIn(e = {}) {
19382
19468
  if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
19383
19469
  return Oi({
19384
- authServer: d_,
19470
+ authServer: p_,
19385
19471
  clientID: this.config.clientId,
19386
19472
  scopes: e.scopes,
19387
19473
  refreshParamName: "token_access_type"
@@ -19402,14 +19488,14 @@ var u_ = class {
19402
19488
  isAuthenticated() {
19403
19489
  return this.isConfigured() ? !!Ni(this.config.clientId)?.access_token : !1;
19404
19490
  }
19405
- }, p_ = (e) => ({
19491
+ }, h_ = (e) => ({
19406
19492
  uid: e.login,
19407
19493
  displayName: e.name || e.login,
19408
19494
  ...e.email ? { email: e.email } : {},
19409
19495
  ...e.avatarUrl ? { photoURL: e.avatarUrl } : {},
19410
19496
  provider: "github",
19411
19497
  login: e.login
19412
- }), m_ = class {
19498
+ }), g_ = class {
19413
19499
  config;
19414
19500
  user = null;
19415
19501
  listeners = /* @__PURE__ */ new Set();
@@ -19436,7 +19522,7 @@ var u_ = class {
19436
19522
  return this.loading ??= fetch(`${this.base}/me`, {
19437
19523
  credentials: "include",
19438
19524
  headers: { Accept: "application/json" }
19439
- }).then(async (e) => e.ok ? p_(await e.json()) : null).catch(() => null).then((e) => (this.setUser(e), e)).finally(() => {
19525
+ }).then(async (e) => e.ok ? h_(await e.json()) : null).catch(() => null).then((e) => (this.setUser(e), e)).finally(() => {
19440
19526
  this.loading = null;
19441
19527
  }), this.loading;
19442
19528
  }
@@ -19460,7 +19546,7 @@ var u_ = class {
19460
19546
  let t = (e?.uid ?? null) !== (this.user?.uid ?? null);
19461
19547
  this.user = e, t && this.listeners.forEach((t) => t(e));
19462
19548
  }
19463
- }, h_ = (e) => {
19549
+ }, __ = (e) => {
19464
19550
  let t = eo("oAuth2");
19465
19551
  if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
19466
19552
  let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
@@ -19477,8 +19563,8 @@ var u_ = class {
19477
19563
  };
19478
19564
  //#endregion
19479
19565
  //#region src/providers/email/google/email.ts
19480
- async function g_({ to: e, bcc: t, subject: n, message: r }) {
19481
- let i = await h_(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
19566
+ async function v_({ to: e, bcc: t, subject: n, message: r }) {
19567
+ let i = await __(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
19482
19568
  t && t.length && a.push(`Bcc: ${t.join(", ")}`);
19483
19569
  let o = [
19484
19570
  ...a,
@@ -19503,7 +19589,7 @@ async function g_({ to: e, bcc: t, subject: n, message: r }) {
19503
19589
  }
19504
19590
  //#endregion
19505
19591
  //#region src/providers/email/google/GmailEmailProvider.ts
19506
- var __ = class {
19592
+ var y_ = class {
19507
19593
  getConfigurationState() {
19508
19594
  return xi("GmailEmailProvider", bi(eo("oAuth2"), ["clientId"], "google.oAuth2."));
19509
19595
  }
@@ -19512,7 +19598,7 @@ var __ = class {
19512
19598
  }
19513
19599
  async send(e) {
19514
19600
  if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
19515
- await g_({
19601
+ await v_({
19516
19602
  to: Array.isArray(e.to) ? e.to : [e.to],
19517
19603
  bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
19518
19604
  subject: e.subject,
@@ -19522,7 +19608,7 @@ var __ = class {
19522
19608
  };
19523
19609
  //#endregion
19524
19610
  //#region src/providers/auth/supabase/SupabaseAuthProvider.ts
19525
- function v_(e) {
19611
+ function b_(e) {
19526
19612
  return e ? {
19527
19613
  uid: e.id,
19528
19614
  email: e.email ?? void 0,
@@ -19531,7 +19617,7 @@ function v_(e) {
19531
19617
  raw: e
19532
19618
  } : null;
19533
19619
  }
19534
- var y_ = class {
19620
+ var x_ = class {
19535
19621
  config;
19536
19622
  get client() {
19537
19623
  return wo(this.config.url, this.config.anonKey);
@@ -19546,7 +19632,7 @@ var y_ = class {
19546
19632
  return this.getConfigurationState().configured;
19547
19633
  }
19548
19634
  getUser() {
19549
- return v_((this.client.auth?._session ?? null)?.user ?? null);
19635
+ return b_((this.client.auth?._session ?? null)?.user ?? null);
19550
19636
  }
19551
19637
  isAuthenticated() {
19552
19638
  return !!this.getUser();
@@ -19556,7 +19642,7 @@ var y_ = class {
19556
19642
  if (t === "anonymous") {
19557
19643
  let { data: e, error: t } = await this.client.auth.signInAnonymously();
19558
19644
  if (t) throw t;
19559
- return v_(e.user);
19645
+ return b_(e.user);
19560
19646
  }
19561
19647
  if (t === "magic_link") {
19562
19648
  let t = e.email;
@@ -19585,7 +19671,7 @@ var y_ = class {
19585
19671
  password: r
19586
19672
  });
19587
19673
  if (a) throw a;
19588
- return v_(i.user);
19674
+ return b_(i.user);
19589
19675
  }
19590
19676
  async signOut() {
19591
19677
  let { error: e } = await this.client.auth.signOut();
@@ -19593,10 +19679,10 @@ var y_ = class {
19593
19679
  }
19594
19680
  onAuthChange(e) {
19595
19681
  this.client.auth.getSession().then(({ data: t }) => {
19596
- e(v_(t.session?.user ?? null));
19682
+ e(b_(t.session?.user ?? null));
19597
19683
  });
19598
19684
  let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
19599
- e(v_(n?.user ?? null));
19685
+ e(b_(n?.user ?? null));
19600
19686
  });
19601
19687
  return () => t.unsubscribe();
19602
19688
  }
@@ -19607,15 +19693,15 @@ var y_ = class {
19607
19693
  if (!n) throw Error("SupabaseAuthProvider: no active session");
19608
19694
  return n;
19609
19695
  }
19610
- }, b_ = "https://api.anthropic.com/v1/models", x_ = "https://api.anthropic.com/v1/messages";
19611
- function S_(e) {
19696
+ }, S_ = "https://api.anthropic.com/v1/models", C_ = "https://api.anthropic.com/v1/messages";
19697
+ function w_(e) {
19612
19698
  return {
19613
19699
  name: e.name,
19614
19700
  description: e.description,
19615
19701
  input_schema: e.inputSchema
19616
19702
  };
19617
19703
  }
19618
- function C_(e) {
19704
+ function T_(e) {
19619
19705
  if (e.role === "user") return {
19620
19706
  role: "user",
19621
19707
  content: e.content
@@ -19647,7 +19733,7 @@ function C_(e) {
19647
19733
  }))
19648
19734
  };
19649
19735
  }
19650
- function w_(e) {
19736
+ function E_(e) {
19651
19737
  let t = e?.content;
19652
19738
  if (!Array.isArray(t)) return null;
19653
19739
  let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
@@ -19666,7 +19752,7 @@ function w_(e) {
19666
19752
  text: i
19667
19753
  } : null;
19668
19754
  }
19669
- var T_ = {
19755
+ var D_ = {
19670
19756
  id: "anthropic",
19671
19757
  label: "Anthropic",
19672
19758
  description: "Claude models via the Anthropic API.",
@@ -19690,7 +19776,7 @@ var T_ = {
19690
19776
  supportsDocuments: !0
19691
19777
  },
19692
19778
  discoverModels: async (e) => {
19693
- let t = await nn(b_, { headers: {
19779
+ let t = await nn(S_, { headers: {
19694
19780
  "x-api-key": e,
19695
19781
  "anthropic-version": "2023-06-01"
19696
19782
  } }, Fu);
@@ -19718,7 +19804,7 @@ var T_ = {
19718
19804
  type: "text",
19719
19805
  text: t.prompt
19720
19806
  }] : t.prompt;
19721
- return w_(await nn(x_, {
19807
+ return E_(await nn(C_, {
19722
19808
  method: "POST",
19723
19809
  headers: {
19724
19810
  "x-api-key": e,
@@ -19729,18 +19815,18 @@ var T_ = {
19729
19815
  model: t.model,
19730
19816
  max_tokens: 4096,
19731
19817
  ...t.role ? { system: xu.parseRole(t.role, t) } : {},
19732
- messages: [...(t.history ?? []).map(C_), ...t.prompt ? [{
19818
+ messages: [...(t.history ?? []).map(T_), ...t.prompt ? [{
19733
19819
  role: "user",
19734
19820
  content: r
19735
19821
  }] : []],
19736
- ...t.tools?.length ? { tools: t.tools.map(S_) } : {},
19822
+ ...t.tools?.length ? { tools: t.tools.map(w_) } : {},
19737
19823
  ...typeof t.temperature == "number" ? { temperature: t.temperature } : {}
19738
19824
  },
19739
19825
  signal: t.signal
19740
19826
  }, Fu));
19741
19827
  }
19742
- }, E_ = (e) => typeof e.id == "string" ? e.id : void 0, D_ = (e) => e.replace(/\/+$/, "");
19743
- function O_(e) {
19828
+ }, O_ = (e) => typeof e.id == "string" ? e.id : void 0, k_ = (e) => e.replace(/\/+$/, "");
19829
+ function A_(e) {
19744
19830
  return {
19745
19831
  type: "function",
19746
19832
  function: {
@@ -19750,7 +19836,7 @@ function O_(e) {
19750
19836
  }
19751
19837
  };
19752
19838
  }
19753
- function k_(e) {
19839
+ function j_(e) {
19754
19840
  if (typeof e != "string") return {};
19755
19841
  try {
19756
19842
  return JSON.parse(e);
@@ -19758,7 +19844,7 @@ function k_(e) {
19758
19844
  return {};
19759
19845
  }
19760
19846
  }
19761
- function A_(e) {
19847
+ function M_(e) {
19762
19848
  return e.role === "user" ? [{
19763
19849
  role: "user",
19764
19850
  content: e.content
@@ -19779,7 +19865,7 @@ function A_(e) {
19779
19865
  content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
19780
19866
  }));
19781
19867
  }
19782
- function j_(e) {
19868
+ function N_(e) {
19783
19869
  let t = e?.choices?.[0]?.message;
19784
19870
  if (!t) return null;
19785
19871
  let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
@@ -19792,7 +19878,7 @@ function j_(e) {
19792
19878
  return {
19793
19879
  id: String(e.id),
19794
19880
  name: String(t.name ?? ""),
19795
- input: k_(t.arguments)
19881
+ input: j_(t.arguments)
19796
19882
  };
19797
19883
  }),
19798
19884
  text: e || void 0
@@ -19804,8 +19890,8 @@ function j_(e) {
19804
19890
  text: r
19805
19891
  } : null;
19806
19892
  }
19807
- var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i, defaultModel: a, fallbackModels: o, baseUrl: s, modelsUrl: c, chatCompletionsUrl: l, dashboardUrl: u, credentialsHint: f, validateApiKey: p, mapModelEntry: m = E_ }) => {
19808
- let h = D_(s), g = c || `${h}/models`, _ = l || `${h}/chat/completions`;
19893
+ var P_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i, defaultModel: a, fallbackModels: o, baseUrl: s, modelsUrl: c, chatCompletionsUrl: l, dashboardUrl: u, credentialsHint: f, validateApiKey: p, mapModelEntry: m = O_ }) => {
19894
+ let h = k_(s), g = c || `${h}/models`, _ = l || `${h}/chat/completions`;
19809
19895
  return {
19810
19896
  id: e,
19811
19897
  label: t,
@@ -19882,22 +19968,22 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19882
19968
  role: "system",
19883
19969
  content: xu.parseRole(n.role, n)
19884
19970
  }] : [],
19885
- ...(n.history ?? []).flatMap(A_),
19971
+ ...(n.history ?? []).flatMap(M_),
19886
19972
  ...n.prompt ? [{
19887
19973
  role: "user",
19888
19974
  content: i
19889
19975
  }] : []
19890
19976
  ],
19891
- ...n.tools?.length ? { tools: n.tools.map(O_) } : {},
19977
+ ...n.tools?.length ? { tools: n.tools.map(A_) } : {},
19892
19978
  ...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
19893
19979
  },
19894
19980
  signal: n.signal
19895
19981
  }, Fu);
19896
19982
  if (!a) throw Vu(t);
19897
- return j_(a);
19983
+ return N_(a);
19898
19984
  }
19899
19985
  };
19900
- }, N_ = "https://api.cloudflare.com/client/v4", P_ = 100, F_ = 5, I_ = /-guard-/, L_ = "Cloudflare Workers AI", R_ = "Open-weight models (Llama, GPT-OSS, Qwen, Gemma, GLM…) with a free daily allowance.", z_ = "https://dash.cloudflare.com/?to=/:account/ai/workers-ai", B_ = "Cloudflare dashboard → AI → Workers AI → REST API: create a Workers AI API token and copy the Account ID.", V_ = [{
19986
+ }, F_ = "https://api.cloudflare.com/client/v4", I_ = 100, L_ = 5, R_ = /-guard-/, z_ = "Cloudflare Workers AI", B_ = "Open-weight models (Llama, GPT-OSS, Qwen, Gemma, GLM…) with a free daily allowance.", V_ = "https://dash.cloudflare.com/?to=/:account/ai/workers-ai", H_ = "Cloudflare dashboard → AI → Workers AI → REST API: create a Workers AI API token and copy the Account ID.", U_ = [{
19901
19987
  key: "apiKey",
19902
19988
  label: "API Token",
19903
19989
  type: "password"
@@ -19906,7 +19992,7 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19906
19992
  label: "Account ID",
19907
19993
  type: "text",
19908
19994
  placeholder: "32-character account id"
19909
- }], H_ = (e, t) => (e.properties ?? []).some((e) => e.property_id === t && String(e.value) === "true"), U_ = (e) => {
19995
+ }], W_ = (e, t) => (e.properties ?? []).some((e) => e.property_id === t && String(e.value) === "true"), G_ = (e) => {
19910
19996
  let t = (e.properties ?? []).find((e) => e.property_id === "price")?.value;
19911
19997
  if (!Array.isArray(t)) return;
19912
19998
  let n = (e) => {
@@ -19919,11 +20005,11 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19919
20005
  currency: "USD",
19920
20006
  source: "provider"
19921
20007
  };
19922
- }, W_ = (e) => e?.map((e) => e.role === "assistant" && !e.content ? {
20008
+ }, K_ = (e) => e?.map((e) => e.role === "assistant" && !e.content ? {
19923
20009
  ...e,
19924
20010
  content: ""
19925
- } : e), G_ = ({ accountId: e, defaultModel: t = "@cf/meta/llama-3.3-70b-instruct-fp8-fast", includePaidModels: n = !1 }) => {
19926
- let r = `${N_}/accounts/${encodeURIComponent(e.trim())}`, i = `${r}/ai/models/search`, a = (e, t, n) => {
20011
+ } : e), q_ = ({ accountId: e, defaultModel: t = "@cf/meta/llama-3.3-70b-instruct-fp8-fast", includePaidModels: n = !1 }) => {
20012
+ let r = `${F_}/accounts/${encodeURIComponent(e.trim())}`, i = `${r}/ai/models/search`, a = (e, t, n) => {
19927
20013
  let r = new URLSearchParams({
19928
20014
  task: "Text Generation",
19929
20015
  hide_experimental: "true",
@@ -19931,10 +20017,10 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19931
20017
  per_page: String(n)
19932
20018
  });
19933
20019
  return nn(`${i}?${r}`, { headers: { Authorization: `Bearer ${e}` } }, Fu);
19934
- }, o = M_({
20020
+ }, o = P_({
19935
20021
  id: "cloudflare",
19936
- label: L_,
19937
- description: R_,
20022
+ label: z_,
20023
+ description: B_,
19938
20024
  configKey: "cloudflare",
19939
20025
  requiredConfigKeys: ["ai.cloudflare.apiToken", "ai.cloudflare.accountId"],
19940
20026
  defaultModel: t,
@@ -19945,8 +20031,8 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19945
20031
  "@cf/meta/llama-4-scout-17b-16e-instruct"
19946
20032
  ].filter((e, t, n) => n.indexOf(e) === t),
19947
20033
  baseUrl: `${r}/ai/v1`,
19948
- dashboardUrl: z_,
19949
- credentialsHint: B_,
20034
+ dashboardUrl: V_,
20035
+ credentialsHint: H_,
19950
20036
  validateApiKey: async (e) => {
19951
20037
  try {
19952
20038
  let t = await a(e, 1, 1);
@@ -19967,33 +20053,33 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
19967
20053
  });
19968
20054
  return {
19969
20055
  ...o,
19970
- credentialFields: V_,
20056
+ credentialFields: U_,
19971
20057
  discoverModels: async (e) => {
19972
20058
  let t = [];
19973
- for (let r = 1; r <= F_; r++) {
19974
- let i = await a(e, r, P_), o = Array.isArray(i?.result) ? i.result : [];
19975
- if (o.filter((e) => !I_.test(e.name ?? "")).filter((e) => n || !H_(e, "require_workers_paid")).forEach((e) => {
20059
+ for (let r = 1; r <= L_; r++) {
20060
+ let i = await a(e, r, I_), o = Array.isArray(i?.result) ? i.result : [];
20061
+ if (o.filter((e) => !R_.test(e.name ?? "")).filter((e) => n || !W_(e, "require_workers_paid")).forEach((e) => {
19976
20062
  e.name && t.push({
19977
20063
  model: e.name,
19978
- pricing: U_(e)
20064
+ pricing: G_(e)
19979
20065
  });
19980
- }), o.length < P_) break;
20066
+ }), o.length < I_) break;
19981
20067
  }
19982
20068
  return t;
19983
20069
  },
19984
20070
  complete: (e, t) => o.complete(e, {
19985
20071
  ...t,
19986
- history: W_(t.history)
20072
+ history: K_(t.history)
19987
20073
  })
19988
20074
  };
19989
- }, K_ = {
20075
+ }, J_ = {
19990
20076
  id: "cloudflare",
19991
- label: L_,
19992
- description: R_,
19993
- credentialFields: V_,
19994
- credentialsUrl: z_,
19995
- credentialsHint: B_
19996
- }, q_ = M_({
20077
+ label: z_,
20078
+ description: B_,
20079
+ credentialFields: U_,
20080
+ credentialsUrl: V_,
20081
+ credentialsHint: H_
20082
+ }, Y_ = P_({
19997
20083
  id: "deepseek",
19998
20084
  label: "DeepSeek",
19999
20085
  description: "Cost-efficient reasoning and chat models.",
@@ -20003,15 +20089,15 @@ var M_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
20003
20089
  baseUrl: "https://api.deepseek.com",
20004
20090
  dashboardUrl: "https://platform.deepseek.com/api_keys",
20005
20091
  credentialsHint: "DeepSeek platform → API Keys → Create new API key."
20006
- }), J_ = "https://generativelanguage.googleapis.com/v1beta/models", Y_ = "https://generativelanguage.googleapis.com/v1beta/models";
20007
- function X_(e) {
20092
+ }), X_ = "https://generativelanguage.googleapis.com/v1beta/models", Z_ = "https://generativelanguage.googleapis.com/v1beta/models";
20093
+ function Q_(e) {
20008
20094
  return [{ function_declarations: e.map((e) => ({
20009
20095
  name: e.name,
20010
20096
  description: e.description,
20011
20097
  parameters: e.inputSchema
20012
20098
  })) }];
20013
20099
  }
20014
- function Z_(e) {
20100
+ function $_(e) {
20015
20101
  if (e.role === "user") return {
20016
20102
  role: "user",
20017
20103
  parts: [{ text: e.content }]
@@ -20036,7 +20122,7 @@ function Z_(e) {
20036
20122
  } }))
20037
20123
  };
20038
20124
  }
20039
- function Q_(e) {
20125
+ function ev(e) {
20040
20126
  let t = e?.candidates?.[0]?.content?.parts;
20041
20127
  if (!Array.isArray(t)) return null;
20042
20128
  let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
@@ -20055,7 +20141,7 @@ function Q_(e) {
20055
20141
  text: i
20056
20142
  } : null;
20057
20143
  }
20058
- var $_ = {
20144
+ var tv = {
20059
20145
  id: "gemini",
20060
20146
  label: "Gemini",
20061
20147
  description: "Google's multimodal Gemini model family.",
@@ -20079,12 +20165,12 @@ var $_ = {
20079
20165
  supportsDocuments: !0
20080
20166
  },
20081
20167
  discoverModels: async (e) => {
20082
- let t = await nn(`${J_}?key=${e}`, null, Fu);
20168
+ let t = await nn(`${X_}?key=${e}`, null, Fu);
20083
20169
  return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
20084
20170
  },
20085
20171
  validateApiKey: async (e) => {
20086
20172
  try {
20087
- let t = await nn(`${J_}?key=${e}`, null, Fu);
20173
+ let t = await nn(`${X_}?key=${e}`, null, Fu);
20088
20174
  return t === null ? {
20089
20175
  valid: !1,
20090
20176
  error: "Nessuna risposta dal server (CORS o rete)"
@@ -20105,22 +20191,22 @@ var $_ = {
20105
20191
  mime_type: e.mimeType,
20106
20192
  data: e.base64
20107
20193
  } }), { text: t.prompt }];
20108
- return Q_(await nn(`${Y_}/${t.model}:generateContent?key=${e}`, {
20194
+ return ev(await nn(`${Z_}/${t.model}:generateContent?key=${e}`, {
20109
20195
  method: "POST",
20110
20196
  headers: t.logId ? { [d]: t.logId } : void 0,
20111
20197
  body: {
20112
- contents: [...(t.history ?? []).map(Z_), ...t.prompt ? [{
20198
+ contents: [...(t.history ?? []).map($_), ...t.prompt ? [{
20113
20199
  role: "user",
20114
20200
  parts: n
20115
20201
  }] : []],
20116
20202
  ...t.role ? { systemInstruction: { parts: [{ text: xu.parseRole(t.role, t) }] } } : {},
20117
- ...t.tools?.length ? { tools: X_(t.tools) } : {},
20203
+ ...t.tools?.length ? { tools: Q_(t.tools) } : {},
20118
20204
  generationConfig: typeof t.temperature == "number" ? { temperature: t.temperature } : void 0
20119
20205
  },
20120
20206
  signal: t.signal
20121
20207
  }, Fu));
20122
20208
  }
20123
- }, ev = M_({
20209
+ }, nv = P_({
20124
20210
  id: "mistral",
20125
20211
  label: "Mistral",
20126
20212
  description: "European-hosted open and commercial language models.",
@@ -20134,7 +20220,7 @@ var $_ = {
20134
20220
  baseUrl: "https://api.mistral.ai/v1",
20135
20221
  dashboardUrl: "https://console.mistral.ai/api-keys",
20136
20222
  credentialsHint: "Mistral Console → API Keys → Create new key."
20137
- }), tv = /whisper|orpheus|tts|guard/i, nv = M_({
20223
+ }), rv = /whisper|orpheus|tts|guard/i, iv = P_({
20138
20224
  id: "groq",
20139
20225
  label: "Groq",
20140
20226
  description: "Very fast inference on open-weight models, with a free tier.",
@@ -20144,8 +20230,8 @@ var $_ = {
20144
20230
  baseUrl: "https://api.groq.com/openai/v1",
20145
20231
  dashboardUrl: "https://console.groq.com/keys",
20146
20232
  credentialsHint: "Groq Console → API Keys → Create API Key.",
20147
- mapModelEntry: (e) => typeof e.id == "string" && e.active !== !1 && !tv.test(e.id) ? e.id : void 0
20148
- }), rv = M_({
20233
+ mapModelEntry: (e) => typeof e.id == "string" && e.active !== !1 && !rv.test(e.id) ? e.id : void 0
20234
+ }), av = P_({
20149
20235
  id: "openai",
20150
20236
  label: "OpenAI",
20151
20237
  description: "GPT models via the OpenAI API.",
@@ -20163,8 +20249,8 @@ var $_ = {
20163
20249
  baseUrl: "https://api.openai.com/v1",
20164
20250
  dashboardUrl: "https://platform.openai.com/api-keys",
20165
20251
  credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
20166
- }), iv = "https://opencode.ai/zen/v1/models", av = "https://opencode.ai/zen/v1/chat/completions", ov = "deepseek-v4.1-flash", sv = [
20167
- ov,
20252
+ }), ov = "https://opencode.ai/zen/v1/models", sv = "https://opencode.ai/zen/v1/chat/completions", cv = "deepseek-v4.1-flash", lv = [
20253
+ cv,
20168
20254
  "deepseek-v4-pro",
20169
20255
  "glm-5.3",
20170
20256
  "glm-5.3-flash",
@@ -20172,13 +20258,13 @@ var $_ = {
20172
20258
  "kimi-k3",
20173
20259
  "minimax-m3",
20174
20260
  "qwen3.8-flash"
20175
- ], cv = /-free$/, lv = /* @__PURE__ */ new Set(["big-pickle"]), uv = (e) => cv.test(e) || lv.has(e), dv = {
20261
+ ], uv = /-free$/, dv = /* @__PURE__ */ new Set(["big-pickle"]), fv = (e) => uv.test(e) || dv.has(e), pv = {
20176
20262
  id: "opencode",
20177
20263
  label: "OpenCode",
20178
20264
  description: "OpenCode Zen — a curated set of coding-focused models.",
20179
20265
  configKey: "openCodeApiKey",
20180
- defaultModel: ov,
20181
- fallbackModels: sv,
20266
+ defaultModel: cv,
20267
+ fallbackModels: lv,
20182
20268
  dashboardUrl: "https://opencode.ai",
20183
20269
  credentialsHint: "OpenCode Zen dashboard → API Keys → Create Key.",
20184
20270
  credentialFields: [{
@@ -20192,12 +20278,12 @@ var $_ = {
20192
20278
  supportsDocuments: !0
20193
20279
  },
20194
20280
  discoverModels: async (e) => {
20195
- let t = await nn(iv, { headers: { Authorization: `Bearer ${e}` } }, Fu);
20196
- return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !uv(e));
20281
+ let t = await nn(ov, { headers: { Authorization: `Bearer ${e}` } }, Fu);
20282
+ return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !fv(e));
20197
20283
  },
20198
- complete: (e, t) => fv(av, "OpenCode", e, t)
20284
+ complete: (e, t) => mv(sv, "OpenCode", e, t)
20199
20285
  };
20200
- async function fv(e, t, n, r, i = {}) {
20286
+ async function mv(e, t, n, r, i = {}) {
20201
20287
  let a = r.attachments ?? [], o = a.length > 0 ? a.map((e) => e.mimeType.startsWith("image/") ? {
20202
20288
  type: "image_url",
20203
20289
  image_url: { url: `data:${e.mimeType};base64,${e.base64}` }
@@ -20224,24 +20310,24 @@ async function fv(e, t, n, r, i = {}) {
20224
20310
  role: "system",
20225
20311
  content: xu.parseRole(r.role, r)
20226
20312
  }] : [],
20227
- ...(r.history ?? []).flatMap(A_),
20313
+ ...(r.history ?? []).flatMap(M_),
20228
20314
  ...r.prompt ? [{
20229
20315
  role: "user",
20230
20316
  content: o
20231
20317
  }] : []
20232
20318
  ],
20233
- ...r.tools?.length ? { tools: r.tools.map(O_) } : {},
20319
+ ...r.tools?.length ? { tools: r.tools.map(A_) } : {},
20234
20320
  ...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
20235
20321
  },
20236
20322
  signal: r.signal
20237
20323
  }, Fu);
20238
20324
  if (!s) throw Vu(t);
20239
- return j_(s);
20325
+ return N_(s);
20240
20326
  }
20241
20327
  //#endregion
20242
20328
  //#region src/providers/ai/opencodeGo.ts
20243
- var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/go/v1/chat/completions", hv = "x-opencode-session", gv = "kimi-k3", _v = [
20244
- gv,
20329
+ var hv = "https://opencode.ai/zen/go/v1/models", gv = "https://opencode.ai/zen/go/v1/chat/completions", _v = "x-opencode-session", vv = "kimi-k3", yv = [
20330
+ vv,
20245
20331
  "kimi-k3.1-pro",
20246
20332
  "glm-5.3",
20247
20333
  "glm-5.3-flash",
@@ -20252,13 +20338,13 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20252
20338
  "minimax-m3",
20253
20339
  "claude-haiku-5-5",
20254
20340
  "gemini-4-argon"
20255
- ], vv = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `s-${Date.now()}-${Math.random().toString(36).slice(2)}`, yv = {
20341
+ ], bv = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `s-${Date.now()}-${Math.random().toString(36).slice(2)}`, xv = {
20256
20342
  id: "opencode-go",
20257
20343
  label: "OpenCode Go",
20258
20344
  description: "OpenCode Go — a monthly subscription to open and frontier coding models, with an API key.",
20259
20345
  configKey: "openCodeGoApiKey",
20260
- defaultModel: gv,
20261
- fallbackModels: _v,
20346
+ defaultModel: vv,
20347
+ fallbackModels: yv,
20262
20348
  dashboardUrl: "https://opencode.ai/go",
20263
20349
  credentialsHint: "OpenCode Console → subscribe to Go → API key.",
20264
20350
  credentialFields: [{
@@ -20272,11 +20358,11 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20272
20358
  supportsDocuments: !0
20273
20359
  },
20274
20360
  discoverModels: async (e) => {
20275
- let t = await nn(pv, { headers: { Authorization: `Bearer ${e}` } }, Fu);
20276
- return (Array.isArray(t?.data) ? t.data : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !uv(e));
20361
+ let t = await nn(hv, { headers: { Authorization: `Bearer ${e}` } }, Fu);
20362
+ return (Array.isArray(t?.data) ? t.data : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !fv(e));
20277
20363
  },
20278
- complete: (e, t) => fv(mv, "OpenCode Go", e, t, { [hv]: t.logId || vv() })
20279
- }, bv = (e) => {
20364
+ complete: (e, t) => mv(gv, "OpenCode Go", e, t, { [_v]: t.logId || bv() })
20365
+ }, Sv = (e) => {
20280
20366
  if (!e || typeof e != "object") return;
20281
20367
  let { prompt: t, completion: n } = e, r = Number(t), i = Number(n);
20282
20368
  if (t === void 0 || n === void 0 || !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || i < 0) return;
@@ -20287,7 +20373,7 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20287
20373
  currency: "USD",
20288
20374
  source: "provider"
20289
20375
  };
20290
- }, xv = M_({
20376
+ }, Cv = P_({
20291
20377
  id: "openrouter",
20292
20378
  label: "OpenRouter",
20293
20379
  description: "Unified access to many model providers through one API.",
@@ -20303,7 +20389,7 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20303
20389
  credentialsHint: "OpenRouter → Settings → API Keys → Create Key.",
20304
20390
  mapModelEntry: (e) => typeof e.id == "string" ? {
20305
20391
  model: e.id,
20306
- pricing: bv(e.pricing)
20392
+ pricing: Sv(e.pricing)
20307
20393
  } : void 0,
20308
20394
  validateApiKey: async (e) => {
20309
20395
  try {
@@ -20325,10 +20411,10 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20325
20411
  };
20326
20412
  }
20327
20413
  }
20328
- }), Sv = {
20414
+ }), wv = {
20329
20415
  dbRealtime: {
20330
20416
  service: "data",
20331
- create: () => new t_()
20417
+ create: () => new r_()
20332
20418
  },
20333
20419
  firestoreDb: {
20334
20420
  service: "data",
@@ -20340,30 +20426,30 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20340
20426
  },
20341
20427
  firebaseAuth: {
20342
20428
  service: "auth",
20343
- create: () => new a_()
20429
+ create: () => new s_()
20344
20430
  }
20345
- }, Cv = {
20431
+ }, Tv = {
20346
20432
  googleAuth: {
20347
20433
  service: "auth",
20348
- create: () => new Ig()
20434
+ create: () => new Rg()
20349
20435
  },
20350
20436
  gmail: {
20351
20437
  service: "email",
20352
- create: () => new __()
20438
+ create: () => new y_()
20353
20439
  },
20354
20440
  googleServiceAccount: {
20355
20441
  service: "credentials",
20356
- create: (e) => new u_(e.serviceAccount),
20442
+ create: (e) => new f_(e.serviceAccount),
20357
20443
  when: (e) => !!e.serviceAccount
20358
20444
  }
20359
- }, wv = { dropboxAuth: {
20445
+ }, Ev = { dropboxAuth: {
20360
20446
  service: "auth",
20361
- create: (e) => new f_(e)
20362
- } }, Tv = { githubAuth: {
20447
+ create: (e) => new m_(e)
20448
+ } }, Dv = { githubAuth: {
20363
20449
  service: "auth",
20364
- create: (e) => new m_(e),
20450
+ create: (e) => new g_(e),
20365
20451
  when: (e) => !!e?.sessionUrl?.trim()
20366
- } }, Ev = {
20452
+ } }, Ov = {
20367
20453
  supabaseDb: {
20368
20454
  service: "data",
20369
20455
  create: (e) => new Fo(e)
@@ -20374,35 +20460,35 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20374
20460
  },
20375
20461
  supabaseAuth: {
20376
20462
  service: "auth",
20377
- create: (e) => new y_(e)
20463
+ create: (e) => new x_(e)
20378
20464
  }
20379
- }, Dv = { mock: {
20465
+ }, kv = { mock: {
20380
20466
  service: "data",
20381
20467
  create: (e) => new Ho(e?.data)
20382
- } }, Ov = (e, t) => ({
20468
+ } }, Av = (e, t) => ({
20383
20469
  service: "ai",
20384
20470
  create: (n) => new qu(e, n?.[t] || ""),
20385
20471
  when: (e) => !!e?.[t]
20386
- }), kv = {
20387
- firebase: Sv,
20388
- google: Cv,
20389
- dropbox: wv,
20390
- github: Tv,
20391
- supabase: Ev,
20392
- mock: Dv,
20472
+ }), jv = {
20473
+ firebase: wv,
20474
+ google: Tv,
20475
+ dropbox: Ev,
20476
+ github: Dv,
20477
+ supabase: Ov,
20478
+ mock: kv,
20393
20479
  ai: {
20394
- openai: Ov(rv, "openaiApiKey"),
20395
- openrouter: Ov(xv, "openRouterApiKey"),
20396
- opencode: Ov(dv, "openCodeApiKey"),
20397
- "opencode-go": Ov(yv, "openCodeGoApiKey"),
20398
- deepseek: Ov(q_, "deepSeekApiKey"),
20399
- gemini: Ov($_, "geminiApiKey"),
20400
- anthropic: Ov(T_, "anthropicApiKey"),
20401
- mistral: Ov(ev, "mistralApiKey"),
20402
- groq: Ov(nv, "groqApiKey"),
20480
+ openai: Av(av, "openaiApiKey"),
20481
+ openrouter: Av(Cv, "openRouterApiKey"),
20482
+ opencode: Av(pv, "openCodeApiKey"),
20483
+ "opencode-go": Av(xv, "openCodeGoApiKey"),
20484
+ deepseek: Av(Y_, "deepSeekApiKey"),
20485
+ gemini: Av(tv, "geminiApiKey"),
20486
+ anthropic: Av(D_, "anthropicApiKey"),
20487
+ mistral: Av(nv, "mistralApiKey"),
20488
+ groq: Av(iv, "groqApiKey"),
20403
20489
  cloudflare: {
20404
20490
  service: "ai",
20405
- create: (e) => new qu(G_({
20491
+ create: (e) => new qu(q_({
20406
20492
  accountId: e?.cloudflare?.accountId?.trim() || "",
20407
20493
  defaultModel: e?.cloudflare?.defaultModel?.trim() || void 0,
20408
20494
  includePaidModels: e?.cloudflare?.includePaidModels
@@ -20410,8 +20496,8 @@ var pv = "https://opencode.ai/zen/go/v1/models", mv = "https://opencode.ai/zen/g
20410
20496
  when: (e) => !!e?.cloudflare?.apiToken?.trim() && !!e?.cloudflare?.accountId?.trim()
20411
20497
  }
20412
20498
  }
20413
- }, Av = () => /* @__PURE__ */ f.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ f.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
20414
- function jv(e, t) {
20499
+ }, Mv = () => /* @__PURE__ */ f.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ f.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
20500
+ function Nv(e, t) {
20415
20501
  if (!t) return;
20416
20502
  let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
20417
20503
  if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
@@ -20420,10 +20506,10 @@ function jv(e, t) {
20420
20506
  }
20421
20507
  e.custom = t;
20422
20508
  }
20423
- function Mv(e, t, n = "default") {
20509
+ function Pv(e, t, n = "default") {
20424
20510
  return t && e[t] ? t : Object.keys(e)[0] ?? n;
20425
20511
  }
20426
- function Nv(e = {}) {
20512
+ function Fv(e = {}) {
20427
20513
  let t = {
20428
20514
  data: {},
20429
20515
  storage: {},
@@ -20432,24 +20518,24 @@ function Nv(e = {}) {
20432
20518
  ai: {},
20433
20519
  credentials: {}
20434
20520
  }, n = (e) => t[e] ??= {};
20435
- for (let [t, r] of Object.entries(kv)) {
20521
+ for (let [t, r] of Object.entries(jv)) {
20436
20522
  let i = e[t];
20437
20523
  if (i !== void 0) for (let [e, t] of Object.entries(r)) (!t.when || t.when(i)) && (n(t.service)[e] = t.create(i));
20438
20524
  }
20439
- for (let [t, r] of Object.entries(e.custom ?? {})) jv(n(t), r);
20440
- Object.keys(t.data).length === 0 && (t.data.mock = new Ho()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Ig());
20525
+ for (let [t, r] of Object.entries(e.custom ?? {})) Nv(n(t), r);
20526
+ Object.keys(t.data).length === 0 && (t.data.mock = new Ho()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Rg());
20441
20527
  let r = e.services ?? {}, i = {};
20442
20528
  for (let [e, n] of Object.entries(t)) i[e] = {
20443
20529
  registry: n,
20444
- defaultKey: Mv(n, r[e])
20530
+ defaultKey: Pv(n, r[e])
20445
20531
  };
20446
20532
  return i;
20447
20533
  }
20448
- var Pv = {}, Fv = (e) => {
20449
- Pv = e;
20450
- }, Iv = (e) => Pv[e] || [];
20451
- function Lv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native", scrapeConfig: r, iconProvider: i, googleMaps: a, themeProvider: o, i18n: s, children: c, errorReportUrl: l, debug: u, basename: d }) {
20452
- let [p, m] = E(() => Nv(t)), h = T(p);
20534
+ var Iv = {}, Lv = (e) => {
20535
+ Iv = e;
20536
+ }, Rv = (e) => Iv[e] || [];
20537
+ function zv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native", scrapeConfig: r, iconProvider: i, googleMaps: a, themeProvider: o, i18n: s, children: c, errorReportUrl: l, debug: u, basename: d }) {
20538
+ let [p, m] = E(() => Fv(t)), h = T(p);
20453
20539
  h.current = p;
20454
20540
  let g = T(void 0);
20455
20541
  g.current ||= (async (e, t, n) => {
@@ -20466,7 +20552,7 @@ function Lv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native",
20466
20552
  })));
20467
20553
  });
20468
20554
  let _ = g.current, v = e ?? f.Fragment;
20469
- return /* @__PURE__ */ f.createElement(Pg, {
20555
+ return /* @__PURE__ */ f.createElement(Ig, {
20470
20556
  fullPage: !0,
20471
20557
  reportUrl: l,
20472
20558
  debug: u
@@ -20488,10 +20574,10 @@ function Lv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native",
20488
20574
  } }, /* @__PURE__ */ f.createElement(Ha, {
20489
20575
  registries: p,
20490
20576
  setProvider: _
20491
- }, /* @__PURE__ */ f.createElement(gi, p.auth, /* @__PURE__ */ f.createElement(Vg, p.credentials, /* @__PURE__ */ f.createElement(zi, p.data, /* @__PURE__ */ f.createElement(Fl, p.storage, /* @__PURE__ */ f.createElement(Rg, p.email, /* @__PURE__ */ f.createElement(Eu, p.ai, /* @__PURE__ */ f.createElement(Lr, { config: i }, /* @__PURE__ */ f.createElement($p, { config: a }, /* @__PURE__ */ f.createElement(lh, { appName: n }, /* @__PURE__ */ f.createElement(Jn, { config: s }, /* @__PURE__ */ f.createElement(Fn, { config: o }, /* @__PURE__ */ f.createElement(v, null, c))))))))))))))));
20577
+ }, /* @__PURE__ */ f.createElement(gi, p.auth, /* @__PURE__ */ f.createElement(Ug, p.credentials, /* @__PURE__ */ f.createElement(zi, p.data, /* @__PURE__ */ f.createElement(Fl, p.storage, /* @__PURE__ */ f.createElement(Bg, p.email, /* @__PURE__ */ f.createElement(Eu, p.ai, /* @__PURE__ */ f.createElement(Lr, { config: i }, /* @__PURE__ */ f.createElement($p, { config: a }, /* @__PURE__ */ f.createElement(dh, { appName: n }, /* @__PURE__ */ f.createElement(Jn, { config: s }, /* @__PURE__ */ f.createElement(Fn, { config: o }, /* @__PURE__ */ f.createElement(v, null, c))))))))))))))));
20492
20578
  }
20493
- function Rv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, children: r, ...i }) {
20494
- Fv(n);
20579
+ function Bv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, children: r, ...i }) {
20580
+ Lv(n);
20495
20581
  let a = ({ children: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, e), o = ({ pageSource: e, message: t }) => /* @__PURE__ */ f.createElement(cs, { variant: "warning" }, "Missing Page: ", e, t && /* @__PURE__ */ f.createElement("code", { className: "ml-2" }, t));
20496
20582
  function s(n, r, s) {
20497
20583
  let c = `./pages${r.component ? "/" + r.component : r.path === "/" ? "/Home" : ft.toCamel(r.path.split("*")[0])}.js`, l = r.page || f.lazy(() => e(c).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${c}`), { default: () => /* @__PURE__ */ f.createElement(o, { pageSource: c }) })).catch((e) => (console.error(`❌ Failed to load ${c}:`, e), { default: () => /* @__PURE__ */ f.createElement(o, {
@@ -20501,32 +20587,32 @@ function Rv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, chil
20501
20587
  return /* @__PURE__ */ f.createElement(A, {
20502
20588
  key: `${n}-${s}`,
20503
20589
  path: r.path,
20504
- element: /* @__PURE__ */ f.createElement(u, null, /* @__PURE__ */ f.createElement(Pg, {
20590
+ element: /* @__PURE__ */ f.createElement(u, null, /* @__PURE__ */ f.createElement(Ig, {
20505
20591
  key: r.path,
20506
20592
  reportUrl: i.errorReportUrl,
20507
20593
  debug: i.debug
20508
- }, /* @__PURE__ */ f.createElement(h, { fallback: /* @__PURE__ */ f.createElement(Av, null) }, /* @__PURE__ */ f.createElement(l, null))))
20594
+ }, /* @__PURE__ */ f.createElement(h, { fallback: /* @__PURE__ */ f.createElement(Mv, null) }, /* @__PURE__ */ f.createElement(l, null))))
20509
20595
  });
20510
20596
  }
20511
- let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(Pv).some((e) => l(e, "/")) ? {} : { default: [{ path: "/" }] };
20512
- return /* @__PURE__ */ f.createElement(Lv, i, r, /* @__PURE__ */ f.createElement(j, null, /* @__PURE__ */ f.createElement(A, {
20597
+ let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(Iv).some((e) => l(e, "/")) ? {} : { default: [{ path: "/" }] };
20598
+ return /* @__PURE__ */ f.createElement(zv, i, r, /* @__PURE__ */ f.createElement(j, null, /* @__PURE__ */ f.createElement(A, {
20513
20599
  path: Ci,
20514
20600
  element: /* @__PURE__ */ f.createElement(Ai, null)
20515
20601
  }), /* @__PURE__ */ f.createElement(f.Fragment, null, c({
20516
20602
  ...u,
20517
- ...Pv,
20603
+ ...Iv,
20518
20604
  _auth: [{
20519
20605
  path: "/users",
20520
- page: wg,
20606
+ page: Eg,
20521
20607
  layout: t
20522
20608
  }]
20523
20609
  })), /* @__PURE__ */ f.createElement(A, {
20524
20610
  path: "*",
20525
- element: /* @__PURE__ */ f.createElement(Tg, null)
20611
+ element: /* @__PURE__ */ f.createElement(Dg, null)
20526
20612
  })));
20527
20613
  }
20528
- var zv = (e) => {
20529
- let t = Iv(e), n = M(), r = (e) => e.map((e) => {
20614
+ var Vv = (e) => {
20615
+ let t = Rv(e), n = M(), r = (e) => e.map((e) => {
20530
20616
  let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
20531
20617
  return {
20532
20618
  ...e,
@@ -20535,7 +20621,7 @@ var zv = (e) => {
20535
20621
  };
20536
20622
  });
20537
20623
  return w(() => r(t), [n.pathname]);
20538
- }, Bv = {
20624
+ }, Hv = {
20539
20625
  common: {
20540
20626
  save: "Salva",
20541
20627
  cancel: "Annulla",
@@ -20639,6 +20725,10 @@ var zv = (e) => {
20639
20725
  reorderRow: "Riordina riga {key}"
20640
20726
  },
20641
20727
  gallery: { selectItem: "Seleziona elemento {key}" },
20728
+ sortableList: {
20729
+ handle: "Sposta l'elemento {position} di {total}: trascinalo, o usa le frecce su e giù",
20730
+ moved: "Spostato in posizione {position} di {total}"
20731
+ },
20642
20732
  crop: {
20643
20733
  enableCrop: "Abilita ritaglio a scala {scale}",
20644
20734
  variants: "Varianti",
@@ -20879,7 +20969,7 @@ var zv = (e) => {
20879
20969
  dataTable: "Dati del grafico",
20880
20970
  sequence: "Sequenza"
20881
20971
  }
20882
- }, Vv = {
20972
+ }, Uv = {
20883
20973
  common: {
20884
20974
  save: "Speichern",
20885
20975
  cancel: "Abbrechen",
@@ -20983,6 +21073,10 @@ var zv = (e) => {
20983
21073
  reorderRow: "Zeile {key} neu anordnen"
20984
21074
  },
20985
21075
  gallery: { selectItem: "Element {key} auswählen" },
21076
+ sortableList: {
21077
+ handle: "Element {position} von {total} verschieben: ziehen oder Pfeiltasten nach oben und unten",
21078
+ moved: "Auf Position {position} von {total} verschoben"
21079
+ },
20986
21080
  crop: {
20987
21081
  enableCrop: "Zuschnitt mit Skalierung {scale} aktivieren",
20988
21082
  variants: "Varianten",
@@ -21223,7 +21317,7 @@ var zv = (e) => {
21223
21317
  dataTable: "Diagrammdaten",
21224
21318
  sequence: "Abfolge"
21225
21319
  }
21226
- }, Hv = {
21320
+ }, Wv = {
21227
21321
  common: {
21228
21322
  save: "Сохранить",
21229
21323
  cancel: "Отменить",
@@ -21327,6 +21421,10 @@ var zv = (e) => {
21327
21421
  reorderRow: "Переместить строку {key}"
21328
21422
  },
21329
21423
  gallery: { selectItem: "Выбрать элемент {key}" },
21424
+ sortableList: {
21425
+ handle: "Переместить элемент {position} из {total}: перетащите его или используйте стрелки вверх и вниз",
21426
+ moved: "Перемещено на позицию {position} из {total}"
21427
+ },
21330
21428
  crop: {
21331
21429
  enableCrop: "Включить обрезку в масштабе {scale}",
21332
21430
  variants: "Варианты",
@@ -21567,7 +21665,7 @@ var zv = (e) => {
21567
21665
  dataTable: "Данные диаграммы",
21568
21666
  sequence: "Последовательность"
21569
21667
  }
21570
- }, Uv = {
21668
+ }, Gv = {
21571
21669
  common: {
21572
21670
  save: "保存",
21573
21671
  cancel: "取消",
@@ -21671,6 +21769,10 @@ var zv = (e) => {
21671
21769
  reorderRow: "重排行{key}"
21672
21770
  },
21673
21771
  gallery: { selectItem: "选择项目{key}" },
21772
+ sortableList: {
21773
+ handle: "移动第 {position} 项(共 {total} 项):拖动它,或使用上下方向键",
21774
+ moved: "已移到第 {position} 位(共 {total} 位)"
21775
+ },
21674
21776
  crop: {
21675
21777
  enableCrop: "启用{scale}比例裁剪",
21676
21778
  variants: "变体",
@@ -21911,7 +22013,7 @@ var zv = (e) => {
21911
22013
  dataTable: "图表数据",
21912
22014
  sequence: "顺序"
21913
22015
  }
21914
- }, Wv = {
22016
+ }, Kv = {
21915
22017
  common: {
21916
22018
  save: "حفظ",
21917
22019
  cancel: "إلغاء",
@@ -22015,6 +22117,10 @@ var zv = (e) => {
22015
22117
  reorderRow: "إعادة ترتيب الصف {key}"
22016
22118
  },
22017
22119
  gallery: { selectItem: "تحديد العنصر {key}" },
22120
+ sortableList: {
22121
+ handle: "نقل العنصر {position} من {total}: اسحبه أو استخدم السهمين لأعلى ولأسفل",
22122
+ moved: "نُقل إلى الموضع {position} من {total}"
22123
+ },
22018
22124
  crop: {
22019
22125
  enableCrop: "تفعيل الاقتصاص بمقياس {scale}",
22020
22126
  variants: "المتغيرات",
@@ -22255,22 +22361,22 @@ var zv = (e) => {
22255
22361
  dataTable: "بيانات المخطط",
22256
22362
  sequence: "التسلسل"
22257
22363
  }
22258
- }, Gv = /* @__PURE__ */ ot({
22259
- ar: () => Wv,
22260
- de: () => Vv,
22364
+ }, qv = /* @__PURE__ */ ot({
22365
+ ar: () => Kv,
22366
+ de: () => Uv,
22261
22367
  en: () => Rn,
22262
- it: () => Bv,
22263
- ru: () => Hv,
22264
- zh: () => Uv
22265
- }), Kv = (e) => Ga("api", e);
22368
+ it: () => Hv,
22369
+ ru: () => Wv,
22370
+ zh: () => Gv
22371
+ }), Jv = (e) => Ga("api", e);
22266
22372
  //#endregion
22267
22373
  //#region src/providers/api/direct.ts
22268
- async function qv(e) {
22374
+ async function Yv(e) {
22269
22375
  if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
22270
22376
  let t = await e.text();
22271
22377
  return t ? JSON.parse(t) : void 0;
22272
22378
  }
22273
- var Jv = class {
22379
+ var Xv = class {
22274
22380
  config;
22275
22381
  constructor(e) {
22276
22382
  this.config = e;
@@ -22285,7 +22391,7 @@ var Jv = class {
22285
22391
  ...e.body,
22286
22392
  ...this.config.body
22287
22393
  };
22288
- return qv(await Fu(n.toString(), {
22394
+ return Yv(await Fu(n.toString(), {
22289
22395
  method: t,
22290
22396
  headers: {
22291
22397
  "Content-Type": "application/json",
@@ -22294,7 +22400,7 @@ var Jv = class {
22294
22400
  body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
22295
22401
  }));
22296
22402
  }
22297
- }, Yv = class {
22403
+ }, Zv = class {
22298
22404
  resolver;
22299
22405
  constructor(e) {
22300
22406
  this.resolver = e;
@@ -22302,7 +22408,7 @@ var Jv = class {
22302
22408
  async fetch(e) {
22303
22409
  return this.resolver(e);
22304
22410
  }
22305
- }, Xv = class {
22411
+ }, Qv = class {
22306
22412
  config;
22307
22413
  constructor(e) {
22308
22414
  this.config = e;
@@ -22313,7 +22419,7 @@ var Jv = class {
22313
22419
  request: e
22314
22420
  }, void 0, this.config.region);
22315
22421
  }
22316
- }, Zv = class {
22422
+ }, $v = class {
22317
22423
  config;
22318
22424
  constructor(e) {
22319
22425
  this.config = e;
@@ -22326,7 +22432,7 @@ var Jv = class {
22326
22432
  if (n) throw n;
22327
22433
  return t;
22328
22434
  }
22329
- }, Qv = [
22435
+ }, ey = [
22330
22436
  {
22331
22437
  id: "resend",
22332
22438
  label: "Resend",
@@ -22437,7 +22543,7 @@ var Jv = class {
22437
22543
  ],
22438
22544
  credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
22439
22545
  }
22440
- ], $v = [
22546
+ ], ty = [
22441
22547
  {
22442
22548
  id: "cloudflare_pages",
22443
22549
  label: "Cloudflare Pages",
@@ -22667,16 +22773,16 @@ var Jv = class {
22667
22773
  description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
22668
22774
  credentialFields: []
22669
22775
  }
22670
- ], ey = [
22671
- rv,
22776
+ ], ny = [
22777
+ av,
22778
+ Cv,
22779
+ pv,
22672
22780
  xv,
22673
- dv,
22674
- yv,
22675
- q_,
22676
- $_,
22677
- T_,
22678
- ev,
22679
- M_({
22781
+ Y_,
22782
+ tv,
22783
+ D_,
22784
+ nv,
22785
+ P_({
22680
22786
  id: "glm",
22681
22787
  label: "ZhipuAI (GLM)",
22682
22788
  description: "Zhipu AI's GLM model family.",
@@ -22693,8 +22799,8 @@ var Jv = class {
22693
22799
  dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
22694
22800
  credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
22695
22801
  }),
22696
- nv
22697
- ], ty = (e) => ({
22802
+ iv
22803
+ ], ry = (e) => ({
22698
22804
  id: e.id,
22699
22805
  label: e.label,
22700
22806
  description: e.description ?? "",
@@ -22705,7 +22811,7 @@ var Jv = class {
22705
22811
  }],
22706
22812
  credentialsUrl: e.dashboardUrl,
22707
22813
  credentialsHint: e.credentialsHint
22708
- }), ny = [...ey.map(ty), K_], ry = {
22814
+ }), iy = [...ny.map(ry), J_], ay = {
22709
22815
  id: "openai-compatible",
22710
22816
  label: "OpenAI-compatible",
22711
22817
  description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
@@ -22719,15 +22825,15 @@ var Jv = class {
22719
22825
  type: "text",
22720
22826
  placeholder: "https://api.example.com/v1"
22721
22827
  }]
22722
- }, iy = (e) => {
22828
+ }, oy = (e) => {
22723
22829
  let t = [], n = e?.cloudflare?.accountId?.trim();
22724
- n && t.push(G_({
22830
+ n && t.push(q_({
22725
22831
  accountId: n,
22726
22832
  defaultModel: e?.cloudflare?.defaultModel?.trim() || void 0,
22727
22833
  includePaidModels: e?.cloudflare?.includePaidModels
22728
22834
  }));
22729
22835
  let r = e?.openAICompatible?.baseUrl?.trim();
22730
- return r ? [...t, M_({
22836
+ return r ? [...t, P_({
22731
22837
  id: "openai-compatible",
22732
22838
  label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
22733
22839
  description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
@@ -22739,10 +22845,10 @@ var Jv = class {
22739
22845
  modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
22740
22846
  chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
22741
22847
  })] : t;
22742
- }, ay = (e) => e ? [...ey, ...iy(e)].reduce((t, n) => {
22848
+ }, sy = (e) => e ? [...ny, ...oy(e)].reduce((t, n) => {
22743
22849
  let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : n.id === "cloudflare" ? e.cloudflare?.apiToken?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
22744
22850
  return r && (t[n.id] = new qu(n, r)), t;
22745
- }, {}) : {}, oy = (e, { scope: t }) => ay(e.reduce((e, n) => {
22851
+ }, {}) : {}, cy = (e, { scope: t }) => sy(e.reduce((e, n) => {
22746
22852
  let i = r(t, n.id);
22747
22853
  if (n.id === "openai-compatible") return n.baseUrl ? {
22748
22854
  ...e,
@@ -22760,37 +22866,37 @@ var Jv = class {
22760
22866
  accountId: n.accountId
22761
22867
  }
22762
22868
  } : e;
22763
- let a = ey.find((e) => e.id === n.id)?.configKey;
22869
+ let a = ny.find((e) => e.id === n.id)?.configKey;
22764
22870
  return a ? {
22765
22871
  ...e,
22766
22872
  [a]: i
22767
22873
  } : e;
22768
- }, {})), sy = void 0;
22874
+ }, {})), ly = void 0;
22769
22875
  typeof Xa == "function" && Xa((e) => {
22770
- sy = e.google;
22876
+ ly = e.google;
22771
22877
  });
22772
- var cy = {
22878
+ var uy = {
22773
22879
  ita: "geoTargetConstants/2380",
22774
22880
  rome: "geoTargetConstants/1033236",
22775
22881
  mil: "geoTargetConstants/1033239",
22776
22882
  nap: "geoTargetConstants/1033245",
22777
22883
  tor: "geoTargetConstants/1033247"
22778
- }, ly = {
22884
+ }, dy = {
22779
22885
  it: "languageConstants/1000",
22780
22886
  en: "languageConstants/1001",
22781
22887
  fr: "languageConstants/1002",
22782
22888
  es: "languageConstants/1003",
22783
22889
  de: "languageConstants/1005"
22784
22890
  };
22785
- function uy(e) {
22786
- return cy[e.toLowerCase()] || "geoTargetConstants/2380";
22891
+ function fy(e) {
22892
+ return uy[e.toLowerCase()] || "geoTargetConstants/2380";
22787
22893
  }
22788
- function dy(e) {
22789
- return ly[e.toLowerCase()] || "languageConstants/1000";
22894
+ function py(e) {
22895
+ return dy[e.toLowerCase()] || "languageConstants/1000";
22790
22896
  }
22791
- async function fy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
22792
- if (!sy?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
22793
- let i = await h_(["https://www.googleapis.com/auth/adwords"]), a = uy(n), o = dy(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
22897
+ async function my({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
22898
+ if (!ly?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
22899
+ let i = await __(["https://www.googleapis.com/auth/adwords"]), a = fy(n), o = py(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
22794
22900
  keywordSeed: { keywords: [e] },
22795
22901
  geoTargetConstants: [a],
22796
22902
  language: o
@@ -22798,7 +22904,7 @@ async function fy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
22798
22904
  method: "POST",
22799
22905
  headers: {
22800
22906
  Authorization: `Bearer ${i}`,
22801
- "developer-token": sy.developerToken,
22907
+ "developer-token": ly.developerToken,
22802
22908
  "Content-Type": "application/json"
22803
22909
  },
22804
22910
  body: JSON.stringify(c)
@@ -22816,7 +22922,7 @@ async function fy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
22816
22922
  }
22817
22923
  //#endregion
22818
22924
  //#region src/providers/seo/google/trend.ts
22819
- async function py(e, t = "IT", n = "today 12-m") {
22925
+ async function hy(e, t = "IT", n = "today 12-m") {
22820
22926
  let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
22821
22927
  comparisonItem: [{
22822
22928
  keyword: e,
@@ -22836,7 +22942,7 @@ async function py(e, t = "IT", n = "today 12-m") {
22836
22942
  }))
22837
22943
  };
22838
22944
  }
22839
- async function my(e, t = "IT", n = "today 12-m") {
22945
+ async function gy(e, t = "IT", n = "today 12-m") {
22840
22946
  let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
22841
22947
  comparisonItem: [{
22842
22948
  keyword: e,
@@ -22862,13 +22968,13 @@ async function my(e, t = "IT", n = "today 12-m") {
22862
22968
  }
22863
22969
  //#endregion
22864
22970
  //#region src/providers/storage/dropbox.tsx
22865
- var hy = 5e3, gy = "https://www.dropbox.com/home", _y = void 0;
22971
+ var _y = 5e3, vy = "https://www.dropbox.com/home", yy = void 0;
22866
22972
  typeof Xa == "function" && Xa((e) => {
22867
- _y = e.dropbox;
22973
+ yy = e.dropbox;
22868
22974
  });
22869
- var vy = async (e, t, n = {}) => {
22870
- if (!_y) return console.error("DropBox: Config not found"), null;
22871
- let r = await Fi(_y.clientId);
22975
+ var by = async (e, t, n = {}) => {
22976
+ if (!yy) return console.error("DropBox: Config not found"), null;
22977
+ let r = await Fi(yy.clientId);
22872
22978
  if (!r) throw Error("DropBox: Access token not found");
22873
22979
  return await fetch(e, {
22874
22980
  method: "POST",
@@ -22881,12 +22987,12 @@ var vy = async (e, t, n = {}) => {
22881
22987
  }).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
22882
22988
  console.log("DropBox: Fetch operation completed");
22883
22989
  });
22884
- }, yy = async (e, t, n = {}) => {
22885
- if (!_y) {
22990
+ }, xy = async (e, t, n = {}) => {
22991
+ if (!yy) {
22886
22992
  console.error("DropBox: Config not found");
22887
22993
  return;
22888
22994
  }
22889
- let r = await Fi(_y.clientId);
22995
+ let r = await Fi(yy.clientId);
22890
22996
  if (!r) {
22891
22997
  console.error("DropBox: Access token not found");
22892
22998
  return;
@@ -22911,47 +23017,47 @@ var vy = async (e, t, n = {}) => {
22911
23017
  }).finally(() => {
22912
23018
  console.log("DropBox: Fetch operation completed", e, t);
22913
23019
  });
22914
- }, by = (e, t = !1) => {
22915
- let n = _y?.rootPath || "";
22916
- return (t ? gy : "") + (e.startsWith(n) ? e : n + e);
22917
- }, xy = async (e, t = "", n = !1) => {
23020
+ }, Sy = (e, t = !1) => {
23021
+ let n = yy?.rootPath || "";
23022
+ return (t ? vy : "") + (e.startsWith(n) ? e : n + e);
23023
+ }, Cy = async (e, t = "", n = !1) => {
22918
23024
  let r = {};
22919
- return (await Fy.listFolders({
23025
+ return (await Ly.listFolders({
22920
23026
  path: `${e + t}`,
22921
23027
  recursive: !0
22922
23028
  })).forEach((e) => {
22923
23029
  e[".tag"] !== "folder" && (r[n ? vi.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
22924
23030
  }), r;
22925
- }, Sy = async (e, t) => {
23031
+ }, wy = async (e, t) => {
22926
23032
  if (!e.async_job_id) return Promise.reject(e);
22927
23033
  let n, r = !0;
22928
- for (; r;) await St(100), n = await yy(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
23034
+ for (; r;) await St(100), n = await xy(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
22929
23035
  return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
22930
- }, Cy = async (e, t = "") => {
22931
- let n = "files/create_folder_batch", r = await yy(`https://api.dropboxapi.com/2/${n}`, {
23036
+ }, Ty = async (e, t = "") => {
23037
+ let n = "files/create_folder_batch", r = await xy(`https://api.dropboxapi.com/2/${n}`, {
22932
23038
  autorename: !1,
22933
23039
  force_async: !0,
22934
- paths: e.map((e) => by(t + e))
23040
+ paths: e.map((e) => Sy(t + e))
22935
23041
  });
22936
- return r ? Sy(r, n) : void 0;
22937
- }, wy = async (e, t = "") => {
22938
- let n = "files/create_folder_batch", r = await yy(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: by(t + e) })) });
22939
- return r ? Sy(r, n) : void 0;
22940
- }, Ty = async (e, t) => yy("https://api.dropboxapi.com/2/files/tags/add", {
23042
+ return r ? wy(r, n) : void 0;
23043
+ }, Ey = async (e, t = "") => {
23044
+ let n = "files/create_folder_batch", r = await xy(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: Sy(t + e) })) });
23045
+ return r ? wy(r, n) : void 0;
23046
+ }, Dy = async (e, t) => xy("https://api.dropboxapi.com/2/files/tags/add", {
22941
23047
  path: e,
22942
23048
  tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
22943
- }), Ey = async (e, t = "") => {
22944
- for (let n in e) for (let r of e[n]) await Ty(by(t + n), r);
22945
- }, Dy = async ({ path: e = "", recursive: t = !1 } = {}) => {
22946
- let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await yy("https://api.dropboxapi.com/2/files/list_folder", {
23049
+ }), Oy = async (e, t = "") => {
23050
+ for (let n in e) for (let r of e[n]) await Dy(Sy(t + n), r);
23051
+ }, ky = async ({ path: e = "", recursive: t = !1 } = {}) => {
23052
+ let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await xy("https://api.dropboxapi.com/2/files/list_folder", {
22947
23053
  include_deleted: !1,
22948
23054
  include_has_explicit_shared_members: !1,
22949
23055
  include_media_info: !1,
22950
23056
  include_mounted_folders: !0,
22951
23057
  include_non_downloadable_files: !0,
22952
- path: by(e),
23058
+ path: Sy(e),
22953
23059
  recursive: n
22954
- }) : await yy("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
23060
+ }) : await xy("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
22955
23061
  has_more: !0,
22956
23062
  cursor: "",
22957
23063
  entries: []
@@ -22964,44 +23070,44 @@ var vy = async (e, t, n = {}) => {
22964
23070
  recursive: t
22965
23071
  }), i && n.push(...i.entries);
22966
23072
  return n;
22967
- }, Oy = async (e) => {
22968
- let t = async (e) => await yy("https://api.dropboxapi.com/2/files/copy_batch_v2", {
23073
+ }, Ay = async (e) => {
23074
+ let t = async (e) => await xy("https://api.dropboxapi.com/2/files/copy_batch_v2", {
22969
23075
  entries: e,
22970
23076
  autorename: !1
22971
- }), n = async (e) => await yy("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
23077
+ }), n = async (e) => await xy("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
22972
23078
  for (let a = 0; a < e.length; a += 900) {
22973
23079
  i = e.slice(a, a + 900).map((e) => ({
22974
- from_path: by(e.from),
22975
- to_path: by(e.to)
23080
+ from_path: Sy(e.from),
23081
+ to_path: Sy(e.to)
22976
23082
  }));
22977
23083
  let o = await t(i);
22978
23084
  if (!o) continue;
22979
23085
  if (o.error) throw Error(`Error starting copy: ${o.error}`);
22980
23086
  let s = o;
22981
- for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await St(hy), s = await n(o.async_job_id ?? "");
23087
+ for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await St(_y), s = await n(o.async_job_id ?? "");
22982
23088
  if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
22983
23089
  s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
22984
23090
  }
22985
23091
  return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
22986
- }, ky = async (e) => {
22987
- let t = async (e) => await yy("https://api.dropboxapi.com/2/files/move_v2", {
23092
+ }, jy = async (e) => {
23093
+ let t = async (e) => await xy("https://api.dropboxapi.com/2/files/move_v2", {
22988
23094
  ...e,
22989
23095
  autorename: !0
22990
23096
  });
22991
23097
  for (let n of e) await t({
22992
- from_path: by(n.from),
22993
- to_path: by(n.to)
23098
+ from_path: Sy(n.from),
23099
+ to_path: Sy(n.to)
22994
23100
  });
22995
- }, Ay = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
23101
+ }, My = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
22996
23102
  let a = {}, o = [];
22997
23103
  for (let s = 0; s < e.length; s += 25) {
22998
23104
  let c = e.slice(s, s + 25), l = c.map((e) => ({
22999
- path: by(e.path),
23105
+ path: Sy(e.path),
23000
23106
  format: n,
23001
23107
  size: t,
23002
23108
  mode: r
23003
23109
  }));
23004
- await St(100), o.push(yy("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
23110
+ await St(100), o.push(xy("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
23005
23111
  if (!e) return;
23006
23112
  let n = e.entries.reduce((e, n, r) => {
23007
23113
  let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
@@ -23020,7 +23126,7 @@ var vy = async (e, t, n = {}) => {
23020
23126
  }));
23021
23127
  }
23022
23128
  return Promise.all(o).then(() => a);
23023
- }, jy = (e, t = "application/octet-stream", n = 512) => {
23129
+ }, Ny = (e, t = "application/octet-stream", n = 512) => {
23024
23130
  let r = atob(e), i = [];
23025
23131
  for (let e = 0; e < r.length; e += n) {
23026
23132
  let t = r.slice(e, e + n), a = Array(t.length);
@@ -23029,11 +23135,11 @@ var vy = async (e, t, n = {}) => {
23029
23135
  i.push(o);
23030
23136
  }
23031
23137
  return new Blob(i, { type: t });
23032
- }, My = async (e, t) => {
23138
+ }, Py = async (e, t) => {
23033
23139
  try {
23034
23140
  let n = t.split(",")[1];
23035
- vy("https://content.dropboxapi.com/2/files/upload", jy(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
23036
- path: by(e),
23141
+ by("https://content.dropboxapi.com/2/files/upload", Ny(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
23142
+ path: Sy(e),
23037
23143
  mode: "overwrite",
23038
23144
  autorename: !0,
23039
23145
  mute: !1
@@ -23043,12 +23149,12 @@ var vy = async (e, t, n = {}) => {
23043
23149
  } catch (e) {
23044
23150
  console.error("Errore durante il caricamento su Dropbox:", e);
23045
23151
  }
23046
- }, Ny = (e = !1) => _y ? Mi(_y.clientId, e) : !1, Py = (e = {}) => {
23047
- if (!_y) return /* @__PURE__ */ f.createElement("div", {
23152
+ }, Fy = (e = !1) => yy ? Mi(yy.clientId, e) : !1, Iy = (e = {}) => {
23153
+ if (!yy) return /* @__PURE__ */ f.createElement("div", {
23048
23154
  title: "DropBox: configurazione mancante. Recupera il \"Client ID\" accedendo a https://www.dropbox.com/developers, vai su \"App Console\", seleziona un'app esistente o chiedi il Client ID a chi ha configurato il sistema.",
23049
23155
  className: "text-danger flex items-center gap-2"
23050
23156
  }, /* @__PURE__ */ f.createElement(Q, { name: "warning" }), /* @__PURE__ */ f.createElement("span", null, "Dropbox non configurato"));
23051
- let t = Ny(!0);
23157
+ let t = Fy(!0);
23052
23158
  return /* @__PURE__ */ f.createElement(Li, {
23053
23159
  provider: "dropboxAuth",
23054
23160
  intent: "connect",
@@ -23060,33 +23166,33 @@ var vy = async (e, t, n = {}) => {
23060
23166
  title: t ? "DropBox Connected" : "DropBox Disconnected"
23061
23167
  }
23062
23168
  });
23063
- }, Fy = {
23169
+ }, Ly = {
23064
23170
  setRootPath: (e) => {
23065
- _y && (_y.rootPath = e);
23066
- },
23067
- resolvePath: by,
23068
- createFolders: Cy,
23069
- deleteBulk: wy,
23070
- addTags: Ey,
23071
- listFolders: Dy,
23072
- getThumbnails: Ay,
23073
- search: xy,
23074
- upload: My,
23075
- copy: Oy,
23076
- move: ky
23077
- }, Iy = "https://api.serpapi.com/search", Ly = "google", Ry = "google_images", zy = "google_autocomplete", By = "google_trends", Vy = "google_maps", Hy = "google_maps_photos", Uy = "google_maps_reviews", Wy = {
23171
+ yy && (yy.rootPath = e);
23172
+ },
23173
+ resolvePath: Sy,
23174
+ createFolders: Ty,
23175
+ deleteBulk: Ey,
23176
+ addTags: Oy,
23177
+ listFolders: ky,
23178
+ getThumbnails: My,
23179
+ search: Cy,
23180
+ upload: Py,
23181
+ copy: Ay,
23182
+ move: jy
23183
+ }, Ry = "https://api.serpapi.com/search", zy = "google", By = "google_images", Vy = "google_autocomplete", Hy = "google_trends", Uy = "google_maps", Wy = "google_maps_photos", Gy = "google_maps_reviews", Ky = {
23078
23184
  engine: null,
23079
23185
  device: null,
23080
23186
  no_cache: !1,
23081
23187
  async: !1,
23082
23188
  output: "json"
23083
- }, Gy = { q: null }, Ky = {
23189
+ }, qy = { q: null }, Jy = {
23084
23190
  tbs: null,
23085
23191
  safe: "active",
23086
23192
  nfpr: 0,
23087
23193
  filter: 1
23088
23194
  };
23089
- function qy(e) {
23195
+ function Yy(e) {
23090
23196
  let t = du(), n = du(!0), r = fu(!0), i = {
23091
23197
  location: t,
23092
23198
  uule: null
@@ -23104,13 +23210,13 @@ function qy(e) {
23104
23210
  hl: r
23105
23211
  };
23106
23212
  return {
23107
- [Ly]: {
23108
- ...Wy,
23213
+ [zy]: {
23214
+ ...Ky,
23109
23215
  ...i,
23110
23216
  ...o,
23111
- ...Ky,
23112
- ...Gy,
23113
- engine: Ly,
23217
+ ...Jy,
23218
+ ...qy,
23219
+ engine: zy,
23114
23220
  ludocid: null,
23115
23221
  lsig: null,
23116
23222
  kgmid: null,
@@ -23119,29 +23225,29 @@ function qy(e) {
23119
23225
  start: null,
23120
23226
  num: null
23121
23227
  },
23122
- [Ry]: {
23123
- ...Wy,
23228
+ [By]: {
23229
+ ...Ky,
23124
23230
  ...i,
23125
23231
  ...o,
23126
- ...Ky,
23127
- ...Gy,
23128
- engine: Ry,
23232
+ ...Jy,
23233
+ ...qy,
23234
+ engine: By,
23129
23235
  chips: null,
23130
23236
  ijn: null
23131
23237
  },
23132
- [zy]: {
23133
- ...Wy,
23238
+ [Vy]: {
23239
+ ...Ky,
23134
23240
  ...o,
23135
- ...Gy,
23136
- engine: zy,
23241
+ ...qy,
23242
+ engine: Vy,
23137
23243
  cp: null,
23138
23244
  client: null
23139
23245
  },
23140
- [By]: {
23141
- ...Wy,
23246
+ [Hy]: {
23247
+ ...Ky,
23142
23248
  ...a,
23143
- ...Gy,
23144
- engine: By,
23249
+ ...qy,
23250
+ engine: Hy,
23145
23251
  data_type: null,
23146
23252
  tz: null,
23147
23253
  cat: null,
@@ -23149,73 +23255,73 @@ function qy(e) {
23149
23255
  date: null,
23150
23256
  csv: null
23151
23257
  },
23152
- [Vy]: {
23153
- ...Wy,
23258
+ [Uy]: {
23259
+ ...Ky,
23154
23260
  ...i,
23155
23261
  ...o,
23156
- ...Ky,
23157
- ...Gy,
23158
- engine: Vy
23262
+ ...Jy,
23263
+ ...qy,
23264
+ engine: Uy
23159
23265
  },
23160
- [Hy]: {
23161
- ...Wy,
23266
+ [Wy]: {
23267
+ ...Ky,
23162
23268
  ...s,
23163
- engine: Hy
23269
+ engine: Wy
23164
23270
  },
23165
- [Uy]: {
23166
- ...Wy,
23271
+ [Gy]: {
23272
+ ...Ky,
23167
23273
  ...s,
23168
- engine: Uy
23274
+ engine: Gy
23169
23275
  }
23170
23276
  }[e] ?? {};
23171
23277
  }
23172
- var Jy = void 0;
23278
+ var Xy = void 0;
23173
23279
  typeof Xa == "function" && Xa((e) => {
23174
- Jy = e.scrape;
23280
+ Xy = e.scrape;
23175
23281
  });
23176
- function Yy(e) {
23282
+ function Zy(e) {
23177
23283
  let t = {};
23178
23284
  for (let n in e) e[n] !== null && (t[n] = e[n]);
23179
23285
  return t;
23180
23286
  }
23181
- var Xy = 0;
23182
- function Zy(e = !1) {
23183
- let t = Jy?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
23184
- return t.length === 0 ? null : (e && Xy++, Xy < t.length ? t[Xy] : null);
23287
+ var Qy = 0;
23288
+ function $y(e = !1) {
23289
+ let t = Xy?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
23290
+ return t.length === 0 ? null : (e && Qy++, Qy < t.length ? t[Qy] : null);
23185
23291
  }
23186
- var Qy = async (e, t) => {
23292
+ var eb = async (e, t) => {
23187
23293
  let n = (n) => {
23188
- let r = Yy({
23189
- ...qy(t),
23294
+ let r = Zy({
23295
+ ...Yy(t),
23190
23296
  api_key: n,
23191
23297
  q: e
23192
23298
  });
23193
- return console.log(Iy, r), `${Iy}?${new URLSearchParams(r)}`;
23194
- }, r = Zy();
23299
+ return console.log(Ry, r), `${Ry}?${new URLSearchParams(r)}`;
23300
+ }, r = $y();
23195
23301
  for (; r;) try {
23196
23302
  return await nn(n(r));
23197
23303
  } catch (e) {
23198
23304
  if (e?.error === "quota_exceeded") {
23199
- console.warn(`SerpApi: invalid api key: ${r}`, e), r = Zy(!0);
23305
+ console.warn(`SerpApi: invalid api key: ${r}`, e), r = $y(!0);
23200
23306
  continue;
23201
23307
  }
23202
23308
  throw console.error(`SerpApi: ${r}`, e), e;
23203
23309
  }
23204
23310
  return null;
23205
- }, $y = async (e, t, n) => {
23311
+ }, tb = async (e, t, n) => {
23206
23312
  let r = `${to}/${bt(t)}/${bt(e)}`, i = await n.read(r);
23207
23313
  if (i) return i;
23208
- let a = await Qy(e, t);
23314
+ let a = await eb(e, t);
23209
23315
  return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
23210
- }, eb = (e) => ({
23211
- googleSearch: async (t) => $y(t, Ly, e),
23212
- googleImages: async (t) => $y(t, Ry, e),
23213
- googleAutocomplete: async (t) => $y(t, zy, e),
23214
- googleTrends: async (t) => $y(t, By, e),
23215
- googleMaps: async (t) => $y(t, Vy, e),
23216
- googleMapsPhotos: async (t) => $y(t, Hy, e),
23217
- googleMapsReviews: async (t) => $y(t, Uy, e)
23218
- }), tb = {
23316
+ }, nb = (e) => ({
23317
+ googleSearch: async (t) => tb(t, zy, e),
23318
+ googleImages: async (t) => tb(t, By, e),
23319
+ googleAutocomplete: async (t) => tb(t, Vy, e),
23320
+ googleTrends: async (t) => tb(t, Hy, e),
23321
+ googleMaps: async (t) => tb(t, Uy, e),
23322
+ googleMapsPhotos: async (t) => tb(t, Wy, e),
23323
+ googleMapsReviews: async (t) => tb(t, Gy, e)
23324
+ }), rb = {
23219
23325
  "+": "+",
23220
23326
  "﹢": "+",
23221
23327
  "-": "-",
@@ -23290,7 +23396,7 @@ var Qy = async (e, t) => {
23290
23396
  x: "x",
23291
23397
  y: "y",
23292
23398
  z: "z"
23293
- }, nb = {
23399
+ }, ib = {
23294
23400
  email: {
23295
23401
  description: "Email: no spaces -> Lower/Trim",
23296
23402
  transformations: [{
@@ -23336,7 +23442,7 @@ var Qy = async (e, t) => {
23336
23442
  transformations: [],
23337
23443
  mask: ["toSlug"]
23338
23444
  }
23339
- }, rb = [
23445
+ }, ab = [
23340
23446
  {
23341
23447
  pattern: "email*",
23342
23448
  use: "email"
@@ -23353,24 +23459,24 @@ var Qy = async (e, t) => {
23353
23459
  pattern: "date*",
23354
23460
  use: "date"
23355
23461
  }
23356
- ], ib = new RegExp(Object.keys(tb).join("|"), "g");
23357
- function ab(e) {
23358
- return e ? e.normalize("NFKC").replace(ib, (e) => tb[e] ?? e) : "";
23462
+ ], ob = new RegExp(Object.keys(rb).join("|"), "g");
23463
+ function sb(e) {
23464
+ return e ? e.normalize("NFKC").replace(ob, (e) => rb[e] ?? e) : "";
23359
23465
  }
23360
- var ob = class {
23466
+ var cb = class {
23361
23467
  config;
23362
23468
  matches;
23363
23469
  constructor(e = {}, t = []) {
23364
23470
  this.config = {
23365
- ...nb,
23471
+ ...ib,
23366
23472
  ...e
23367
- }, this.matches = [...rb, ...t];
23473
+ }, this.matches = [...ab, ...t];
23368
23474
  }
23369
23475
  apply(e, t, n = !1) {
23370
23476
  let r = this.config[e];
23371
23477
  if (!r) return n ? Jt(t) : t;
23372
23478
  let i = t;
23373
- i = ab(String(i ?? ""));
23479
+ i = sb(String(i ?? ""));
23374
23480
  let a = r.exclusions;
23375
23481
  if (Array.isArray(a) && a.length) {
23376
23482
  let e = String(i).toLowerCase();
@@ -23429,7 +23535,7 @@ var ob = class {
23429
23535
  };
23430
23536
  //#endregion
23431
23537
  //#region src/libs/csv.ts
23432
- function sb(e, t) {
23538
+ function lb(e, t) {
23433
23539
  let n = ze.parse(e, {
23434
23540
  header: !0,
23435
23541
  skipEmptyLines: !0,
@@ -23442,6 +23548,6 @@ function sb(e, t) {
23442
23548
  };
23443
23549
  }
23444
23550
  //#endregion
23445
- export { Eu as AIProvider, ey as AI_PROVIDER_DEFINITIONS, ny as AI_PROVIDER_DESCRIPTORS, l as AI_PROVIDER_HOSTS, ri as ActionButton, fm as AddressAutocomplete, cs as Alert, gc as AnimatedNumber, Rv as App, Lv as AppProvider, oc as AreaChart, ua as AsyncDropdown, Li as AuthButton, gi as AuthProvider, xl as Autocomplete, xn as BUILT_IN_THEMES, _n as BUILT_IN_THEME_IDS, ii as BackLink, pr as Badge, fr as BadgeOverlay, uc as BarList, _a as Brand, Ta as Breadcrumbs, K_ as CLOUDFLARE_PROVIDER_DESCRIPTOR, ed as CONTEXT_MENU_SEARCH_THRESHOLD, mc as CalendarHeatmap, Ki as Card, Ea as Carousel, Ys as ChartDataTable, qs as ChartLegend, Kh as ChatMarkdown, ag as ChatQuestions, Jh as ChatReasoning, Ad as Chatbot, nl as Checkbox, Sl as Checklist, ks as Code, vf as CodeEditor, Qd as CodeSyntaxError, lr as Col, qc as Color, Qs as ColumnChart, Uf as Component, Wf as ComponentBlock, sr as Container, _d as ContextMenu, Kl as CropImage, Gm as DEFAULT_DOCUMENT_HEAD, Wm as DEFAULT_HEAD_APP_NAME, Km as DEFAULT_LANGUAGE_HEAD, sl as DEFAULT_ORDER, zi as DataProvider, Jc as Date, Xc as DateTime, ds as DescriptionList, Jv as DirectApiProviderAdapter, tc as DivergingBarChart, Py as DropBoxConnectButton, f_ as DropboxAuthProvider, la as Dropdown, da as DropdownButton, ma as DropdownDivider, pa as DropdownHeader, fa as DropdownItem, ha as DropdownMenu, Qv as EMAIL_PROVIDER_DEFINITIONS, Gc as Email, Rg as EmailProvider, Bc as FieldError, $l as FileNameEditor, Xv as FirebaseApiProviderAdapter, a_ as FirebaseAuthProvider, t_ as FirebaseDataProvider, Jo as FirebaseStorageProvider, So as FirestoreDataProvider, vp as Form, rp as FormControllerContext, cg as Gallery, m_ as GitHubAuthProvider, __ as GmailEmailProvider, ai as GoSite, Ig as GoogleAuthProvider, $p as GoogleMapsProvider, u_ as GoogleServiceAccountProvider, Cg as Grid, Sg as GridArray, xg as GridCore, Om as GridDB, lg as GridGalleryView, Vm as GridTableView, xh as Head, lh as HeadProvider, fc as Heatmap, tl as Hidden, Jn as I18nProvider, Q as Icon, Lr as IconProvider, Ns as Identicon, ga as Image, yi as ImageAvatar, Rl as ImageEditor, Bl as ImageField, Hc as Input, il as Label, Zp as LayoutBuilder, ac as LineChart, hm as ListCard, ol as ListGroup, Vi as Loader, ni as LoadingButton, vc as LocaleSwitcher, Er as LucideIconProvider, kh as MarkdownReader, dc as MeasureBarList, sa as Menu, Yv as MockApiProviderAdapter, Ho as MockDataProvider, ra as Modal, oa as ModalOk, aa as ModalYesNo, Qc as Month, tb as NORMALIZE_MAP, Oa as Notifications, Wc as Number, ry as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, ul as Order, $v as PUBLISH_PROVIDER_DEFINITIONS, wg as PageUsers, sg as Pagination, Kc as Password, wc as Percentage, kr as PhosphorIconProvider, Hd as Prompt, jd as PromptMode, $u as PromptUtils, as as ProviderSwitcher, $c as Range, oi as ReferSite, kp as Repeat, Bf as RichText, cr as Row, t as SERVER_CREDENTIAL_PREFIX, ob as Sanitizer, cc as ScatterChart, Aa as Search, yl as Select, ec as SequenceColumnChart, Tm as SideNav, sc as Sparkline, $s as StackedColumnChart, Fl as StorageProvider, Uc as String, Zv as SupabaseApiProviderAdapter, y_ as SupabaseAuthProvider, Fo as SupabaseDataProvider, Yo as SupabaseStorageProvider, rl as Switch, Lp as Tab, og as TabDynamic, Fp as TabItem, Pp as TabLayouts, Bp as Table, al as TextArea, Ba as ThemeSwitcher, Yc as Time, Na as Toolbar, hs as Tree, pm as UploadCSV, su as UploadDocument, cu as UploadImage, el as Url, Zc as Week, Z as Wrapper, Nt as arrayUnique, Rt as arraysEqual, Lt as base64Encode, Ht as base64ToBlob, Ut as base64ToUrl, va as buildBreadcrumbSchema, u as buildModelIdentityIndex, pd as buildTextCommandContext, Vr as buttonBaseClass, Wr as buttonDangerClass, Yr as buttonDarkClass, qr as buttonInfoClass, Jr as buttonLightClass, ei as buttonLinkClass, Qr as buttonOutlineDangerClass, Xr as buttonOutlinePrimaryClass, Zr as buttonOutlineSecondaryClass, $r as buttonOutlineSuccessClass, Hr as buttonPrimaryClass, Ur as buttonSecondaryClass, Gr as buttonSuccessClass, Kr as buttonWarningClass, uo as callFirebaseFunction, o as canonicalModelName, Fs as chartFill, Ps as chartToken, Dt as checkConditions, Gt as cleanRecord, X as cn, Mu as configureProxy, ft as converter, gt as copyToClipboard, Ot as crc32, ay as createAIProviderRegistry, G_ as createCloudflareProviderDefinition, vr as createMotionTransition, oy as createServerCredentialAIRegistry, Bn as createTranslations, ht as decodeJWT, zn as defineLocaleMessages, xt as dirname, Fy as dropBox, wt as eventClosest, nn as fetchJson, tn as fetchRest, rn as fetchWithRetry, Mc as fieldAddonClass, kc as fieldControlBaseClass, Oc as fieldFeedbackClass, jc as fieldGroupClass, Dc as fieldLabelClass, Ac as fieldTextAreaBaseClass, Cu as formatAIModelRef, Ct as generateUniqueId, Ku as getAIModelCatalog, Fi as getAccessToken, ud as getAutoClosedSuffixLength, lf as getCodeValidationResult, ou as getFileUrl, fi as getGlobalVars, py as getGoogleTrendsData, my as getGoogleTrendsRelated, fy as getKeywordIdeas, Si as getProviderConfigurationState, Wt as getRecordValue, jp as getTabLayoutConfig, Np as getTabPaneClassName, Mp as getTabTriggerClassName, h_ as googleGetAccessToken, vd as groupModelOptions, ld as hasAutoClosedSuffix, Ms as identiconPattern, Vn as interpolate, jt as intersectObjects, n as isAIProviderTarget, ur as isBadgeDescriptor, Pt as isEmpty, Su as isFreeAIModel, bd as isFreeModelOption, Bt as isInteractiveElement, Lu as isProxyEnabled, dl as labelText, rm as loadGoogleMaps, c as loadModelIdentityIndex, At as loadScripts, Gv as locales, dd as matchCommandTrigger, i as modelOffers, Rs as niceMax, dr as normalizeBadgeProps, bt as normalizeKey, vt as normalizePath, ab as normalizeVisualChars, wu as parseAIModelRef, sb as parseCsvText, vi as path, Fu as proxyFetch, qt as recordsEqual, Zo as registerProviderSessionFactory, mi as removeGlobalVars, Vt as render2Base64, Rh as repairStreamingMarkdown, Et as replacePlaceholders, Mt as replaceVariables, e as resolveModel, yr as resolveMotionEffect, Zd as runPrompt, It as safeClone, zt as sanitizeKey, eb as scrape, g_ as sendEmail, r as serverCredential, pi as setGlobalVars, St as sleep, Jt as smartTypeCast, Tt as substrCount, zs as ticks, ty as toProviderDescriptor, gs as treeFromPaths, _t as trimPath, yt as trimSlash, kt as ucfirst, Du as useAIProvider, Ou as useAIProviderRegistry, Mi as useAccessToken, Us as useAnimatedValues, Kv as useApiProvider, vh as useAssetsHead, _i as useAuthProvider, Bs as useChartFormat, Js as useChartTooltip, Ks as useChartWidth, Hg as useCredentialsProvider, Bi as useDataProvider, _h as useDocumentHead, Ny as useDropBoxConnect, Ec as useEditorHeight, zg as useEmailProvider, Cr as useEnterMotion, eu as useFileUploadCore, ap as useFormActions, mp as useFormContext, ip as useFormController, di as useGlobalVars, em as useGoogleMapsConfig, fh as useHead, mh as useHeadLinks, Y as useI18n, zr as useIconController, Rr as useIconProvider, Dl as useImage, gh as useLanguageHead, zv as useMenu, br as useMotionEffect, xr as useMotionState, hh as usePaginationHead, Sr as usePressMotion, Ga as useProvider, rs as useProviderSession, Iu as useProxy, yh as usePwaHead, Ws as useReveal, bh as useSchemaOrgHead, Wa as useSetProvider, ph as useSocialHead, Il as useStorageProvider, J as useTheme, Ln as useThemeController, cf as validateCodeSyntax };
23551
+ export { Eu as AIProvider, ny as AI_PROVIDER_DEFINITIONS, iy as AI_PROVIDER_DESCRIPTORS, l as AI_PROVIDER_HOSTS, ri as ActionButton, fm as AddressAutocomplete, cs as Alert, gc as AnimatedNumber, Bv as App, zv as AppProvider, oc as AreaChart, ua as AsyncDropdown, Li as AuthButton, gi as AuthProvider, xl as Autocomplete, xn as BUILT_IN_THEMES, _n as BUILT_IN_THEME_IDS, ii as BackLink, pr as Badge, fr as BadgeOverlay, uc as BarList, _a as Brand, Ta as Breadcrumbs, J_ as CLOUDFLARE_PROVIDER_DESCRIPTOR, ed as CONTEXT_MENU_SEARCH_THRESHOLD, mc as CalendarHeatmap, Ki as Card, Ea as Carousel, Ys as ChartDataTable, qs as ChartLegend, Jh as ChatMarkdown, sg as ChatQuestions, Xh as ChatReasoning, Ad as Chatbot, nl as Checkbox, Sl as Checklist, ks as Code, vf as CodeEditor, Qd as CodeSyntaxError, lr as Col, qc as Color, Qs as ColumnChart, Uf as Component, Wf as ComponentBlock, sr as Container, _d as ContextMenu, Kl as CropImage, qm as DEFAULT_DOCUMENT_HEAD, Km as DEFAULT_HEAD_APP_NAME, Jm as DEFAULT_LANGUAGE_HEAD, sl as DEFAULT_ORDER, zi as DataProvider, Jc as Date, Xc as DateTime, ds as DescriptionList, Xv as DirectApiProviderAdapter, tc as DivergingBarChart, Iy as DropBoxConnectButton, m_ as DropboxAuthProvider, la as Dropdown, da as DropdownButton, ma as DropdownDivider, pa as DropdownHeader, fa as DropdownItem, ha as DropdownMenu, ey as EMAIL_PROVIDER_DEFINITIONS, Gc as Email, Bg as EmailProvider, Bc as FieldError, $l as FileNameEditor, Qv as FirebaseApiProviderAdapter, s_ as FirebaseAuthProvider, r_ as FirebaseDataProvider, Jo as FirebaseStorageProvider, So as FirestoreDataProvider, vp as Form, rp as FormControllerContext, ug as Gallery, g_ as GitHubAuthProvider, y_ as GmailEmailProvider, ai as GoSite, Rg as GoogleAuthProvider, $p as GoogleMapsProvider, f_ as GoogleServiceAccountProvider, Tg as Grid, wg as GridArray, Cg as GridCore, Am as GridDB, dg as GridGalleryView, Um as GridTableView, Ch as Head, dh as HeadProvider, fc as Heatmap, tl as Hidden, Jn as I18nProvider, Q as Icon, Lr as IconProvider, Ns as Identicon, ga as Image, yi as ImageAvatar, Rl as ImageEditor, Bl as ImageField, Hc as Input, il as Label, Zp as LayoutBuilder, ac as LineChart, hm as ListCard, ol as ListGroup, Vi as Loader, ni as LoadingButton, vc as LocaleSwitcher, Er as LucideIconProvider, jh as MarkdownReader, dc as MeasureBarList, sa as Menu, Zv as MockApiProviderAdapter, Ho as MockDataProvider, ra as Modal, oa as ModalOk, aa as ModalYesNo, Qc as Month, rb as NORMALIZE_MAP, Oa as Notifications, Wc as Number, ay as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, ul as Order, ty as PUBLISH_PROVIDER_DEFINITIONS, Eg as PageUsers, lg as Pagination, Kc as Password, wc as Percentage, kr as PhosphorIconProvider, Hd as Prompt, jd as PromptMode, $u as PromptUtils, as as ProviderSwitcher, $c as Range, oi as ReferSite, kp as Repeat, Bf as RichText, cr as Row, t as SERVER_CREDENTIAL_PREFIX, cb as Sanitizer, cc as ScatterChart, Aa as Search, yl as Select, ec as SequenceColumnChart, Dm as SideNav, _m as SortableList, sc as Sparkline, $s as StackedColumnChart, Fl as StorageProvider, Uc as String, $v as SupabaseApiProviderAdapter, x_ as SupabaseAuthProvider, Fo as SupabaseDataProvider, Yo as SupabaseStorageProvider, rl as Switch, Lp as Tab, cg as TabDynamic, Fp as TabItem, Pp as TabLayouts, Bp as Table, al as TextArea, Ba as ThemeSwitcher, Yc as Time, Na as Toolbar, hs as Tree, pm as UploadCSV, su as UploadDocument, cu as UploadImage, el as Url, Zc as Week, Z as Wrapper, Nt as arrayUnique, Rt as arraysEqual, Lt as base64Encode, Ht as base64ToBlob, Ut as base64ToUrl, va as buildBreadcrumbSchema, u as buildModelIdentityIndex, pd as buildTextCommandContext, Vr as buttonBaseClass, Wr as buttonDangerClass, Yr as buttonDarkClass, qr as buttonInfoClass, Jr as buttonLightClass, ei as buttonLinkClass, Qr as buttonOutlineDangerClass, Xr as buttonOutlinePrimaryClass, Zr as buttonOutlineSecondaryClass, $r as buttonOutlineSuccessClass, Hr as buttonPrimaryClass, Ur as buttonSecondaryClass, Gr as buttonSuccessClass, Kr as buttonWarningClass, uo as callFirebaseFunction, o as canonicalModelName, Fs as chartFill, Ps as chartToken, Dt as checkConditions, Gt as cleanRecord, X as cn, Mu as configureProxy, ft as converter, gt as copyToClipboard, Ot as crc32, sy as createAIProviderRegistry, q_ as createCloudflareProviderDefinition, vr as createMotionTransition, cy as createServerCredentialAIRegistry, Bn as createTranslations, ht as decodeJWT, zn as defineLocaleMessages, xt as dirname, Ly as dropBox, wt as eventClosest, nn as fetchJson, tn as fetchRest, rn as fetchWithRetry, Mc as fieldAddonClass, kc as fieldControlBaseClass, Oc as fieldFeedbackClass, jc as fieldGroupClass, Dc as fieldLabelClass, Ac as fieldTextAreaBaseClass, Cu as formatAIModelRef, Ct as generateUniqueId, Ku as getAIModelCatalog, Fi as getAccessToken, ud as getAutoClosedSuffixLength, lf as getCodeValidationResult, ou as getFileUrl, fi as getGlobalVars, hy as getGoogleTrendsData, gy as getGoogleTrendsRelated, my as getKeywordIdeas, Si as getProviderConfigurationState, Wt as getRecordValue, jp as getTabLayoutConfig, Np as getTabPaneClassName, Mp as getTabTriggerClassName, __ as googleGetAccessToken, vd as groupModelOptions, ld as hasAutoClosedSuffix, Ms as identiconPattern, Vn as interpolate, jt as intersectObjects, n as isAIProviderTarget, ur as isBadgeDescriptor, Pt as isEmpty, Su as isFreeAIModel, bd as isFreeModelOption, Bt as isInteractiveElement, Lu as isProxyEnabled, dl as labelText, rm as loadGoogleMaps, c as loadModelIdentityIndex, At as loadScripts, qv as locales, dd as matchCommandTrigger, i as modelOffers, gm as moveItem, Rs as niceMax, dr as normalizeBadgeProps, bt as normalizeKey, vt as normalizePath, sb as normalizeVisualChars, wu as parseAIModelRef, lb as parseCsvText, vi as path, Fu as proxyFetch, qt as recordsEqual, Zo as registerProviderSessionFactory, mi as removeGlobalVars, Vt as render2Base64, Bh as repairStreamingMarkdown, Et as replacePlaceholders, Mt as replaceVariables, e as resolveModel, yr as resolveMotionEffect, Zd as runPrompt, It as safeClone, zt as sanitizeKey, nb as scrape, v_ as sendEmail, r as serverCredential, pi as setGlobalVars, St as sleep, Jt as smartTypeCast, Tt as substrCount, zs as ticks, ry as toProviderDescriptor, gs as treeFromPaths, _t as trimPath, yt as trimSlash, kt as ucfirst, Du as useAIProvider, Ou as useAIProviderRegistry, Mi as useAccessToken, Us as useAnimatedValues, Jv as useApiProvider, bh as useAssetsHead, _i as useAuthProvider, Bs as useChartFormat, Js as useChartTooltip, Ks as useChartWidth, Wg as useCredentialsProvider, Bi as useDataProvider, yh as useDocumentHead, Fy as useDropBoxConnect, Ec as useEditorHeight, Vg as useEmailProvider, Cr as useEnterMotion, eu as useFileUploadCore, ap as useFormActions, mp as useFormContext, ip as useFormController, di as useGlobalVars, em as useGoogleMapsConfig, mh as useHead, gh as useHeadLinks, Y as useI18n, zr as useIconController, Rr as useIconProvider, Dl as useImage, vh as useLanguageHead, Vv as useMenu, br as useMotionEffect, xr as useMotionState, _h as usePaginationHead, Sr as usePressMotion, Ga as useProvider, rs as useProviderSession, Iu as useProxy, xh as usePwaHead, Ws as useReveal, Sh as useSchemaOrgHead, Wa as useSetProvider, hh as useSocialHead, Il as useStorageProvider, J as useTheme, Ln as useThemeController, cf as validateCodeSyntax };
23446
23552
 
23447
23553
  //# sourceMappingURL=index.mjs.map