@declarion/react 0.1.84 → 0.1.85

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.
@@ -2330,7 +2330,7 @@ function Gt(e) {
2330
2330
  function Kt(e, t) {
2331
2331
  let n = new URL(`/api/data/${e}`, window.location.origin);
2332
2332
  if (t.page && n.searchParams.set("page", String(t.page)), t.per_page && n.searchParams.set("per_page", String(t.per_page)), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.expand) for (let e of t.expand) n.searchParams.append("expand", e);
2333
- return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), n.pathname + n.search;
2333
+ return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), t.count && n.searchParams.set("count", t.count), n.pathname + n.search;
2334
2334
  }
2335
2335
  async function qt(e, t = {}, r = {}) {
2336
2336
  return n(Kt(e, t), { signal: r.signal });
@@ -2910,27 +2910,54 @@ function On({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
2910
2910
  //#endregion
2911
2911
  //#region src/hooks/useEntityData.ts
2912
2912
  function kn(e, t) {
2913
+ let n = {
2914
+ ...t,
2915
+ count: "window"
2916
+ };
2913
2917
  return P({
2914
2918
  queryKey: [
2915
2919
  "entity-data",
2916
2920
  e,
2917
- t
2921
+ n
2922
+ ],
2923
+ queryFn: ({ signal: t }) => qt(e, n, { signal: t }),
2924
+ enabled: !!e,
2925
+ placeholderData: (t, n) => n?.queryKey?.[1] === e ? t : void 0
2926
+ });
2927
+ }
2928
+ function An(e, t) {
2929
+ let n = {
2930
+ ...t,
2931
+ count: "only",
2932
+ page: void 0,
2933
+ per_page: void 0,
2934
+ sort: void 0,
2935
+ select: void 0,
2936
+ expand: void 0
2937
+ };
2938
+ return P({
2939
+ queryKey: [
2940
+ "entity-count",
2941
+ e,
2942
+ n
2918
2943
  ],
2919
- queryFn: ({ signal: n }) => qt(e, t, { signal: n }),
2944
+ queryFn: ({ signal: t }) => qt(e, n, { signal: t }),
2920
2945
  enabled: !!e,
2946
+ retry: 1,
2947
+ staleTime: 3e4,
2921
2948
  placeholderData: (t, n) => n?.queryKey?.[1] === e ? t : void 0
2922
2949
  });
2923
2950
  }
2924
2951
  //#endregion
2925
2952
  //#region src/hooks/useEntity.ts
2926
- function An(e) {
2953
+ function jn(e) {
2927
2954
  let { data: t } = xt();
2928
2955
  if (!(!t || !e)) return t.entities[e];
2929
2956
  }
2930
2957
  //#endregion
2931
2958
  //#region src/components/fields/RefField.tsx
2932
- function jn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, labelId: o }) {
2933
- let s = e.ref?.entity, c = An(s), l = e.display?.ref_display_field ?? e.ref?.display?.field ?? c?.display?.display_field, u = j(() => c ? [...c.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [c]), { data: d, isLoading: f } = kn(n === "edit" ? s : void 0, {
2959
+ function Mn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, labelId: o }) {
2960
+ let s = e.ref?.entity, c = jn(s), l = e.display?.ref_display_field ?? e.ref?.display?.field ?? c?.display?.display_field, u = j(() => c ? [...c.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [c]), { data: d, isLoading: f } = kn(n === "edit" ? s : void 0, {
2934
2961
  per_page: 200,
2935
2962
  sort: l ? `${l}:asc` : void 0
2936
2963
  }), p = j(() => d?.data ?? [], [d?.data]), m = j(() => {
@@ -2993,23 +3020,23 @@ function jn({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, lab
2993
3020
  }
2994
3021
  //#endregion
2995
3022
  //#region src/components/fields/JsonField.tsx
2996
- var Mn = D(() => import("./JsonEditor-CexL5HXN.js").then((e) => ({ default: e.JsonEditor })));
2997
- function Nn() {
3023
+ var Nn = D(() => import("./JsonEditor-CexL5HXN.js").then((e) => ({ default: e.JsonEditor })));
3024
+ function Pn() {
2998
3025
  return /* @__PURE__ */ I("div", { className: "h-20 rounded-md border border-border bg-muted animate-pulse" });
2999
3026
  }
3000
- function Pn({ value: e, mode: t, onChange: n, fieldId: r }) {
3027
+ function Fn({ value: e, mode: t, onChange: n, fieldId: r }) {
3001
3028
  return t === "display" ? e == null || typeof e == "string" && !e ? /* @__PURE__ */ I("span", {
3002
3029
  className: "text-sm text-muted-foreground",
3003
3030
  children: "-"
3004
3031
  }) : /* @__PURE__ */ I(T, {
3005
- fallback: /* @__PURE__ */ I(Nn, {}),
3006
- children: /* @__PURE__ */ I(Mn, {
3032
+ fallback: /* @__PURE__ */ I(Pn, {}),
3033
+ children: /* @__PURE__ */ I(Nn, {
3007
3034
  value: e,
3008
3035
  readOnly: !0
3009
3036
  })
3010
3037
  }) : /* @__PURE__ */ I(T, {
3011
- fallback: /* @__PURE__ */ I(Nn, {}),
3012
- children: /* @__PURE__ */ I(Mn, {
3038
+ fallback: /* @__PURE__ */ I(Pn, {}),
3039
+ children: /* @__PURE__ */ I(Nn, {
3013
3040
  value: e,
3014
3041
  onChange: n,
3015
3042
  id: r
@@ -3018,14 +3045,14 @@ function Pn({ value: e, mode: t, onChange: n, fieldId: r }) {
3018
3045
  }
3019
3046
  //#endregion
3020
3047
  //#region src/components/fields/MultilangField.tsx
3021
- function Fn(e) {
3048
+ function In(e) {
3022
3049
  return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
3023
3050
  }
3024
- function In({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3051
+ function Ln({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3025
3052
  let { data: o } = xt(), s = o?.languages?.length ? o.languages : [{
3026
3053
  code: "en",
3027
3054
  name: { en: "English" }
3028
- }], c = Fn(n);
3055
+ }], c = In(n);
3029
3056
  if (r === "display") return /* @__PURE__ */ I("span", {
3030
3057
  style: { fontSize: 12.5 },
3031
3058
  children: Object.values(c)[0] ?? "—"
@@ -3081,14 +3108,14 @@ function In({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
3081
3108
  }
3082
3109
  //#endregion
3083
3110
  //#region src/components/fields/MultilangTextField.tsx
3084
- function Ln(e) {
3111
+ function Rn(e) {
3085
3112
  return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
3086
3113
  }
3087
- function Rn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3114
+ function zn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3088
3115
  let { data: o } = xt(), s = o?.languages?.length ? o.languages : [{
3089
3116
  code: "en",
3090
3117
  name: { en: "English" }
3091
- }], c = Ln(n);
3118
+ }], c = Rn(n);
3092
3119
  if (r === "display") return /* @__PURE__ */ I("p", {
3093
3120
  style: {
3094
3121
  fontSize: 12.5,
@@ -3144,25 +3171,25 @@ function Rn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
3144
3171
  }
3145
3172
  //#endregion
3146
3173
  //#region src/components/fields/StructureField.tsx
3147
- function zn(e) {
3174
+ function Bn(e) {
3148
3175
  let { field: t, value: n, mode: r, onChange: i, locale: a, fieldId: o } = e, { data: s } = xt(), c = t.structure ? s?.structures?.[t.structure] : void 0;
3149
- return c ? t.array ? /* @__PURE__ */ I(Vn, {
3176
+ return c ? t.array ? /* @__PURE__ */ I(Hn, {
3150
3177
  structDef: c,
3151
3178
  value: n,
3152
3179
  mode: r,
3153
3180
  onChange: i,
3154
3181
  locale: a,
3155
3182
  fieldId: o
3156
- }) : /* @__PURE__ */ I(Bn, {
3183
+ }) : /* @__PURE__ */ I(Vn, {
3157
3184
  structDef: c,
3158
3185
  value: n,
3159
3186
  mode: r,
3160
3187
  onChange: i,
3161
3188
  locale: a,
3162
3189
  fieldId: o
3163
- }) : /* @__PURE__ */ I(Pn, { ...e });
3190
+ }) : /* @__PURE__ */ I(Fn, { ...e });
3164
3191
  }
3165
- function Bn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
3192
+ function Vn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
3166
3193
  let o = typeof t == "object" && t && !Array.isArray(t) ? t : {}, s = e.fields.names(), c = {
3167
3194
  display: "flex",
3168
3195
  flexDirection: "column",
@@ -3198,13 +3225,13 @@ function Bn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3198
3225
  minWidth: 0,
3199
3226
  flex: 1
3200
3227
  },
3201
- children: n.type === "structure" && n.structure ? /* @__PURE__ */ I(zn, {
3228
+ children: n.type === "structure" && n.structure ? /* @__PURE__ */ I(Bn, {
3202
3229
  field: n,
3203
3230
  fieldName: t,
3204
3231
  value: r,
3205
3232
  mode: "display",
3206
3233
  locale: i
3207
- }) : La({
3234
+ }) : Ra({
3208
3235
  field: n,
3209
3236
  fieldName: t,
3210
3237
  value: r,
@@ -3242,14 +3269,14 @@ function Bn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3242
3269
  children: [/* @__PURE__ */ I(xe, {
3243
3270
  required: n.required,
3244
3271
  children: n.display ? $(n.display.name) : t
3245
- }), n.type === "structure" && n.structure ? /* @__PURE__ */ I(zn, {
3272
+ }), n.type === "structure" && n.structure ? /* @__PURE__ */ I(Bn, {
3246
3273
  field: n,
3247
3274
  fieldName: t,
3248
3275
  value: o[t],
3249
3276
  mode: "edit",
3250
3277
  onChange: l(t),
3251
3278
  locale: i
3252
- }) : La({
3279
+ }) : Ra({
3253
3280
  field: n,
3254
3281
  fieldName: t,
3255
3282
  value: o[t],
@@ -3261,7 +3288,7 @@ function Bn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3261
3288
  })
3262
3289
  });
3263
3290
  }
3264
- function Vn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
3291
+ function Hn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
3265
3292
  let o = Array.isArray(t) ? t : [];
3266
3293
  if (n === "display") return o.length === 0 ? /* @__PURE__ */ I("span", {
3267
3294
  style: {
@@ -3275,7 +3302,7 @@ function Vn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3275
3302
  flexDirection: "column",
3276
3303
  gap: 8
3277
3304
  },
3278
- children: o.map((t, n) => /* @__PURE__ */ I(Bn, {
3305
+ children: o.map((t, n) => /* @__PURE__ */ I(Vn, {
3279
3306
  structDef: e,
3280
3307
  value: t,
3281
3308
  mode: "display",
@@ -3301,7 +3328,7 @@ function Vn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3301
3328
  role: "group",
3302
3329
  children: [o.map((t, n) => /* @__PURE__ */ L("div", {
3303
3330
  style: { position: "relative" },
3304
- children: [/* @__PURE__ */ I(Bn, {
3331
+ children: [/* @__PURE__ */ I(Vn, {
3305
3332
  structDef: e,
3306
3333
  value: t,
3307
3334
  mode: "edit",
@@ -3329,16 +3356,16 @@ function Vn({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3329
3356
  }
3330
3357
  //#endregion
3331
3358
  //#region src/components/fields/SecretField.tsx
3332
- var Hn = "[SET]";
3333
- function Un({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
3334
- let [s, c] = N(""), l = a !== void 0, u = n === Hn || typeof n == "string" && n !== "";
3359
+ var Un = "[SET]";
3360
+ function Wn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
3361
+ let [s, c] = N(""), l = a !== void 0, u = n === Un || typeof n == "string" && n !== "";
3335
3362
  return r === "display" ? u ? /* @__PURE__ */ I("span", {
3336
3363
  className: "mono",
3337
3364
  style: {
3338
3365
  fontSize: 12.5,
3339
3366
  color: "var(--text-3)"
3340
3367
  },
3341
- children: Hn
3368
+ children: Un
3342
3369
  }) : /* @__PURE__ */ I("span", {
3343
3370
  style: {
3344
3371
  fontSize: 12.5,
@@ -3352,23 +3379,23 @@ function Un({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
3352
3379
  ariaRequired: e.required,
3353
3380
  value: s,
3354
3381
  onChange: (e) => {
3355
- c(e), l && e === "" ? i?.(u ? Hn : "") : i?.(e);
3382
+ c(e), l && e === "" ? i?.(u ? Un : "") : i?.(e);
3356
3383
  },
3357
3384
  placeholder: l ? "Leave blank to keep existing value" : "Enter value"
3358
3385
  });
3359
3386
  }
3360
3387
  //#endregion
3361
3388
  //#region src/components/fields/PasswordField.tsx
3362
- var Wn = "[SET]";
3363
- function Gn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
3364
- let [s, c] = N(""), l = a !== void 0, u = n === Wn || typeof n == "string" && n !== "";
3389
+ var Gn = "[SET]";
3390
+ function Kn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
3391
+ let [s, c] = N(""), l = a !== void 0, u = n === Gn || typeof n == "string" && n !== "";
3365
3392
  return r === "display" ? u ? /* @__PURE__ */ I("span", {
3366
3393
  className: "mono",
3367
3394
  style: {
3368
3395
  fontSize: 12.5,
3369
3396
  color: "var(--text-3)"
3370
3397
  },
3371
- children: Wn
3398
+ children: Gn
3372
3399
  }) : /* @__PURE__ */ I("span", {
3373
3400
  style: {
3374
3401
  fontSize: 12.5,
@@ -3382,18 +3409,18 @@ function Gn({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
3382
3409
  ariaRequired: e.required,
3383
3410
  value: s,
3384
3411
  onChange: (e) => {
3385
- c(e), l && e === "" ? i?.(u ? Wn : "") : i?.(e);
3412
+ c(e), l && e === "" ? i?.(u ? Gn : "") : i?.(e);
3386
3413
  },
3387
3414
  placeholder: l ? "Leave blank to keep existing value" : "Enter password"
3388
3415
  });
3389
3416
  }
3390
3417
  //#endregion
3391
3418
  //#region src/components/fields/StringArrayField.tsx
3392
- function Kn(e) {
3419
+ function qn(e) {
3393
3420
  return Array.isArray(e) ? e.filter((e) => e != null).map(String) : [];
3394
3421
  }
3395
- function qn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3396
- let o = Kn(n), [s, c] = N("");
3422
+ function Jn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3423
+ let o = qn(n), [s, c] = N("");
3397
3424
  if (r === "display") return o.length === 0 ? /* @__PURE__ */ I("span", {
3398
3425
  style: {
3399
3426
  fontSize: 12.5,
@@ -3462,11 +3489,11 @@ function qn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
3462
3489
  }
3463
3490
  //#endregion
3464
3491
  //#region src/components/fields/IntArrayField.tsx
3465
- function Jn(e) {
3492
+ function Yn(e) {
3466
3493
  return Array.isArray(e) ? e.filter((e) => e != null).map(Number).filter((e) => !isNaN(e)) : [];
3467
3494
  }
3468
- function Yn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3469
- let o = Jn(n), [s, c] = N("");
3495
+ function Xn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
3496
+ let o = Yn(n), [s, c] = N("");
3470
3497
  if (r === "display") return o.length === 0 ? /* @__PURE__ */ I("span", {
3471
3498
  style: {
3472
3499
  fontSize: 12.5,
@@ -3538,38 +3565,38 @@ function Yn({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
3538
3565
  }
3539
3566
  //#endregion
3540
3567
  //#region src/components/file-widgets/registry.ts
3541
- var Xn = /* @__PURE__ */ new Map();
3542
- function Zn(e, t) {
3543
- Xn.set(e, t);
3544
- }
3545
- function Qn(e) {
3546
- return Xn.get(e);
3568
+ var Zn = /* @__PURE__ */ new Map();
3569
+ function Qn(e, t) {
3570
+ Zn.set(e, t);
3547
3571
  }
3548
3572
  function $n(e) {
3549
- return Xn.has(e);
3573
+ return Zn.get(e);
3574
+ }
3575
+ function er(e) {
3576
+ return Zn.has(e);
3550
3577
  }
3551
3578
  //#endregion
3552
3579
  //#region src/components/file-widgets/cropper.ts
3553
- var er = async ({ file: e }) => ({
3580
+ var tr = async ({ file: e }) => ({
3554
3581
  blob: e,
3555
3582
  filename: e.name
3556
- }), tr = er;
3557
- function nr(e) {
3558
- tr = e ?? er;
3583
+ }), nr = tr;
3584
+ function rr(e) {
3585
+ nr = e ?? tr;
3559
3586
  }
3560
- function rr() {
3561
- return tr;
3587
+ function ir() {
3588
+ return nr;
3562
3589
  }
3563
3590
  //#endregion
3564
3591
  //#region src/components/file-widgets/ImageWidget.tsx
3565
- function ir(e, t) {
3592
+ function ar(e, t) {
3566
3593
  return u(e, t);
3567
3594
  }
3568
- function ar(e) {
3595
+ function or(e) {
3569
3596
  let t = e.trim().split(/\s+/).filter(Boolean);
3570
3597
  return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
3571
3598
  }
3572
- function or(e) {
3599
+ function sr(e) {
3573
3600
  let { field: n, fieldName: o, value: l, onChange: u, mode: p, alt: h, disabled: g, visual: _, uploadFieldCode: v, uploadSlotCode: y } = e, b = f(l), [x, S] = N("idle"), [C, w] = N(null), [T, E] = N(null), [D, A] = N(null), [P, F] = N(!1), R = M(null), z = M(!1), B = M(null), { register: V, unregister: H, isDraft: te } = c();
3574
3601
  k(() => () => {
3575
3602
  R.current && R.current.abort();
@@ -3587,9 +3614,9 @@ function or(e) {
3587
3614
  }
3588
3615
  let a = r;
3589
3616
  if (n.display?.crop_on_upload) try {
3590
- let { blob: e, filename: t } = await rr()({
3617
+ let { blob: e, filename: t } = await ir()({
3591
3618
  file: r,
3592
- aspectRatio: ur(n.display.aspect_ratio)
3619
+ aspectRatio: dr(n.display.aspect_ratio)
3593
3620
  });
3594
3621
  a = new File([e], t, { type: e.type || r.type });
3595
3622
  } catch (e) {
@@ -3687,10 +3714,10 @@ function or(e) {
3687
3714
  }, [g, W]), ae = O((e) => {
3688
3715
  let t = e.target.files?.[0];
3689
3716
  e.target.value = "", t && W(t);
3690
- }, [W]), oe = _.aspectRatio ?? lr(_.shape, n.display?.aspect_ratio), se = i(b), ce = {
3717
+ }, [W]), oe = _.aspectRatio ?? ur(_.shape, n.display?.aspect_ratio), se = i(b), ce = {
3691
3718
  aspectRatio: oe,
3692
3719
  width: _.width ?? (_.shape === "wide" ? "100%" : "120px")
3693
- }, le = !!b, X = ir(b, n.display?.listable_thumbnail), ue = p === "display", de = O((e) => {
3720
+ }, le = !!b, X = ar(b, n.display?.listable_thumbnail), ue = p === "display", de = O((e) => {
3694
3721
  e.stopPropagation(), F((e) => !e);
3695
3722
  }, []), Z = O((e) => {
3696
3723
  if (!b || !P) return;
@@ -3706,22 +3733,22 @@ function or(e) {
3706
3733
  u
3707
3734
  ]);
3708
3735
  return ue ? /* @__PURE__ */ I("div", {
3709
- className: sr(_.shape, !1),
3736
+ className: cr(_.shape, !1),
3710
3737
  style: ce,
3711
3738
  "aria-label": U,
3712
3739
  children: le && X ? /* @__PURE__ */ I("img", {
3713
3740
  src: X,
3714
3741
  alt: U,
3715
- className: cr(_.shape),
3742
+ className: lr(_.shape),
3716
3743
  style: { objectPosition: r(se) },
3717
3744
  loading: "lazy"
3718
- }) : /* @__PURE__ */ I(dr, {
3745
+ }) : /* @__PURE__ */ I(fr, {
3719
3746
  shape: _.shape,
3720
3747
  label: U,
3721
3748
  placeholder: n.display?.placeholder
3722
3749
  })
3723
3750
  }) : /* @__PURE__ */ L("div", {
3724
- className: sr(_.shape, !g),
3751
+ className: cr(_.shape, !g),
3725
3752
  style: ce,
3726
3753
  tabIndex: g ? -1 : 0,
3727
3754
  role: "button",
@@ -3747,15 +3774,15 @@ function or(e) {
3747
3774
  le && X ? /* @__PURE__ */ I("img", {
3748
3775
  src: X,
3749
3776
  alt: U,
3750
- className: cr(_.shape),
3777
+ className: lr(_.shape),
3751
3778
  style: { objectPosition: r(se) },
3752
3779
  loading: "lazy"
3753
- }) : x === "uploading" ? null : /* @__PURE__ */ I(dr, {
3780
+ }) : x === "uploading" ? null : /* @__PURE__ */ I(fr, {
3754
3781
  shape: _.shape,
3755
3782
  label: U,
3756
3783
  placeholder: n.display?.placeholder
3757
3784
  }),
3758
- x === "uploading" && /* @__PURE__ */ I(fr, { pct: C?.pct ?? 0 }),
3785
+ x === "uploading" && /* @__PURE__ */ I(pr, { pct: C?.pct ?? 0 }),
3759
3786
  D && /* @__PURE__ */ I("span", {
3760
3787
  className: "absolute right-1 top-1 h-2 w-2 rounded-full bg-warning",
3761
3788
  "aria-hidden": "true",
@@ -3826,32 +3853,32 @@ function or(e) {
3826
3853
  ]
3827
3854
  });
3828
3855
  }
3829
- function sr(e, t) {
3856
+ function cr(e, t) {
3830
3857
  return [
3831
3858
  "relative overflow-hidden border border-border bg-surface-2",
3832
3859
  e === "circle" ? "rounded-full" : "rounded-md",
3833
3860
  t ? "cursor-pointer focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent" : ""
3834
3861
  ].filter(Boolean).join(" ");
3835
3862
  }
3836
- function cr(e) {
3863
+ function lr(e) {
3837
3864
  return "h-full w-full object-cover";
3838
3865
  }
3839
- function lr(e, t) {
3866
+ function ur(e, t) {
3840
3867
  return t ? t.replace(":", " / ") : e === "wide" ? "16 / 9" : "1 / 1";
3841
3868
  }
3842
- function ur(e) {
3869
+ function dr(e) {
3843
3870
  if (!e) return;
3844
3871
  let t = e.replace(/\s/g, "").match(/^(\d+(?:\.\d+)?)[:/](\d+(?:\.\d+)?)$/);
3845
3872
  if (!t) return;
3846
3873
  let n = Number(t[1]), r = Number(t[2]);
3847
3874
  if (!(!n || !r)) return n / r;
3848
3875
  }
3849
- function dr({ shape: e, label: t, placeholder: n }) {
3876
+ function fr({ shape: e, label: t, placeholder: n }) {
3850
3877
  return n === "initials" ? /* @__PURE__ */ I("div", {
3851
3878
  className: "flex h-full w-full items-center justify-center bg-surface-3 text-text-3",
3852
3879
  children: /* @__PURE__ */ I("span", {
3853
3880
  className: e === "circle" ? "text-lg font-medium" : "text-base font-medium",
3854
- children: ar(t)
3881
+ children: or(t)
3855
3882
  })
3856
3883
  }) : /* @__PURE__ */ I("div", {
3857
3884
  className: "flex h-full w-full items-center justify-center bg-surface-3 text-text-4",
@@ -3861,7 +3888,7 @@ function dr({ shape: e, label: t, placeholder: n }) {
3861
3888
  })
3862
3889
  });
3863
3890
  }
3864
- function fr({ pct: e }) {
3891
+ function pr({ pct: e }) {
3865
3892
  let t = 2 * Math.PI * 18, n = t - Math.max(0, Math.min(100, e)) / 100 * t;
3866
3893
  return /* @__PURE__ */ L("div", {
3867
3894
  className: "absolute inset-0 flex items-center justify-center bg-black/30",
@@ -3905,49 +3932,49 @@ function fr({ pct: e }) {
3905
3932
  }
3906
3933
  //#endregion
3907
3934
  //#region src/components/file-widgets/SquareImage.tsx
3908
- function pr(e) {
3909
- return /* @__PURE__ */ I(or, {
3935
+ function mr(e) {
3936
+ return /* @__PURE__ */ I(sr, {
3910
3937
  ...e,
3911
3938
  visual: { shape: "square" }
3912
3939
  });
3913
3940
  }
3914
3941
  //#endregion
3915
3942
  //#region src/components/file-widgets/CircleImage.tsx
3916
- function mr(e) {
3917
- return /* @__PURE__ */ I(or, {
3943
+ function hr(e) {
3944
+ return /* @__PURE__ */ I(sr, {
3918
3945
  ...e,
3919
3946
  visual: { shape: "circle" }
3920
3947
  });
3921
3948
  }
3922
3949
  //#endregion
3923
3950
  //#region src/components/file-widgets/WideBanner.tsx
3924
- function hr(e) {
3925
- return /* @__PURE__ */ I(or, {
3951
+ function gr(e) {
3952
+ return /* @__PURE__ */ I(sr, {
3926
3953
  ...e,
3927
3954
  visual: { shape: "wide" }
3928
3955
  });
3929
3956
  }
3930
3957
  //#endregion
3931
3958
  //#region src/components/file-widgets/GridLazy.tsx
3932
- var gr = D(() => import("./Grid-By_Ere-W.js").then((e) => ({ default: e.Grid })));
3933
- function _r() {
3959
+ var _r = D(() => import("./Grid-By_Ere-W.js").then((e) => ({ default: e.Grid })));
3960
+ function vr() {
3934
3961
  return /* @__PURE__ */ I("div", { className: "h-24 w-full rounded-md bg-muted animate-pulse" });
3935
3962
  }
3936
- function vr(e) {
3963
+ function yr(e) {
3937
3964
  return /* @__PURE__ */ I(T, {
3938
- fallback: /* @__PURE__ */ I(_r, {}),
3939
- children: /* @__PURE__ */ I(gr, { ...e })
3965
+ fallback: /* @__PURE__ */ I(vr, {}),
3966
+ children: /* @__PURE__ */ I(_r, { ...e })
3940
3967
  });
3941
3968
  }
3942
3969
  //#endregion
3943
3970
  //#region src/components/file-widgets/DocumentCard.tsx
3944
- function yr({ contentType: e }) {
3971
+ function br({ contentType: e }) {
3945
3972
  return /* @__PURE__ */ I("div", {
3946
3973
  className: "flex h-16 w-16 flex-none items-center justify-center rounded-md border border-border bg-surface-3 text-xs font-medium text-muted-foreground",
3947
3974
  children: e ? e.includes("pdf") ? "PDF" : e.includes("word") ? "DOC" : e.includes("sheet") || e.includes("excel") ? "XLS" : e.startsWith("image/") ? "IMG" : e.split("/")[1]?.slice(0, 4).toUpperCase() ?? "FILE" : "FILE"
3948
3975
  });
3949
3976
  }
3950
- function br(e) {
3977
+ function xr(e) {
3951
3978
  let { field: n, fieldName: r, value: i, onChange: a, mode: l, disabled: u, uploadFieldCode: m, uploadSlotCode: g } = e, v = f(i), [y, b] = N("idle"), [x, S] = N(null), [C, w] = N(null), [T, E] = N(!1), [D, A] = N(v?.filename ?? ""), j = M(null), P = M(!1), R = M(null), { register: z, unregister: B, isDraft: V } = c();
3952
3979
  k(() => () => {
3953
3980
  j.current && j.current.abort();
@@ -4064,7 +4091,7 @@ function br(e) {
4064
4091
  "data-testid": `file-widget-${r}`,
4065
4092
  className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
4066
4093
  children: [
4067
- /* @__PURE__ */ I(yr, {}),
4094
+ /* @__PURE__ */ I(br, {}),
4068
4095
  /* @__PURE__ */ L("div", {
4069
4096
  className: "flex flex-col gap-1",
4070
4097
  children: [/* @__PURE__ */ I("span", {
@@ -4099,7 +4126,7 @@ function br(e) {
4099
4126
  "aria-busy": y === "uploading" || void 0,
4100
4127
  "aria-invalid": y === "error" || void 0,
4101
4128
  children: [
4102
- /* @__PURE__ */ I(yr, { contentType: v?.content_type }),
4129
+ /* @__PURE__ */ I(br, { contentType: v?.content_type }),
4103
4130
  /* @__PURE__ */ L("div", {
4104
4131
  className: "flex min-w-0 flex-1 flex-col gap-1",
4105
4132
  children: [
@@ -4128,7 +4155,7 @@ function br(e) {
4128
4155
  children: [
4129
4156
  v && /* @__PURE__ */ I("span", { children: o(v.size_bytes) }),
4130
4157
  v?.page_count != null && /* @__PURE__ */ L("span", { children: [v.page_count, " pages"] }),
4131
- v?.uploaded_at && /* @__PURE__ */ I("span", { children: xr(v.uploaded_at) }),
4158
+ v?.uploaded_at && /* @__PURE__ */ I("span", { children: Sr(v.uploaded_at) }),
4132
4159
  v?.uploaded_by && /* @__PURE__ */ L("span", { children: ["by ", v.uploaded_by] }),
4133
4160
  v?.version?.number != null && /* @__PURE__ */ L("span", {
4134
4161
  "data-testid": "version-badge",
@@ -4209,16 +4236,16 @@ function br(e) {
4209
4236
  ]
4210
4237
  });
4211
4238
  }
4212
- function xr(e) {
4239
+ function Sr(e) {
4213
4240
  let t = new Date(e);
4214
4241
  return isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
4215
4242
  }
4216
4243
  //#endregion
4217
4244
  //#region src/components/file-widgets/FileList.tsx
4218
- function Sr(e) {
4245
+ function Cr(e) {
4219
4246
  return e ? (e.split("/")[1] ?? e).toUpperCase().slice(0, 6) : "";
4220
4247
  }
4221
- function Cr(e) {
4248
+ function wr(e) {
4222
4249
  let { field: n, fieldName: r, value: i, onChange: a, mode: l, disabled: u } = e, f = g(i), [p, m] = N([]), { register: _, unregister: v, isDraft: y } = c(), b = M(f);
4223
4250
  b.current = f;
4224
4251
  let x = M(null), S = M(/* @__PURE__ */ new Set()), C = M([]);
@@ -4337,7 +4364,7 @@ function Cr(e) {
4337
4364
  children: [
4338
4365
  /* @__PURE__ */ I("span", {
4339
4366
  className: "flex-none rounded-sm border border-border bg-surface-3 px-1.5 py-0.5 text-[10px] text-muted-foreground",
4340
- children: Sr(e.content_type)
4367
+ children: Cr(e.content_type)
4341
4368
  }),
4342
4369
  /* @__PURE__ */ I("button", {
4343
4370
  type: "button",
@@ -4422,16 +4449,16 @@ function Cr(e) {
4422
4449
  }
4423
4450
  //#endregion
4424
4451
  //#region src/components/file-widgets/LabeledSlots.tsx
4425
- function wr(e) {
4452
+ function Tr(e) {
4426
4453
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
4427
4454
  }
4428
- function Tr(e) {
4455
+ function Er(e) {
4429
4456
  return e.split("_").filter(Boolean).map((e) => e.slice(0, 1).toUpperCase() + e.slice(1)).join(" ");
4430
4457
  }
4431
- function Er(e, t) {
4458
+ function Dr(e, t) {
4432
4459
  return t?.content_type?.startsWith("image/") ? !0 : (e?.accepts ?? []).some((e) => e === "image/*" || e.startsWith("image/"));
4433
4460
  }
4434
- function Dr(e, t, n, r) {
4461
+ function Or(e, t, n, r) {
4435
4462
  return {
4436
4463
  ...e,
4437
4464
  name: `${e.name}.${t}`,
@@ -4441,14 +4468,14 @@ function Dr(e, t, n, r) {
4441
4468
  slots: void 0,
4442
4469
  display: {
4443
4470
  ...e.display ?? { widget: "document_card" },
4444
- widget: Er(n, r) ? "square_image" : "document_card",
4471
+ widget: Dr(n, r) ? "square_image" : "document_card",
4445
4472
  aspect_ratio: n?.aspect_ratio ?? e.display?.aspect_ratio,
4446
- placeholder: e.display?.placeholder ?? Tr(t)
4473
+ placeholder: e.display?.placeholder ?? Er(t)
4447
4474
  }
4448
4475
  };
4449
4476
  }
4450
- function Or(e) {
4451
- let { field: t, fieldName: n, entityCode: r, value: i, onChange: a, mode: o, disabled: s } = e, c = Object.entries(t.slots ?? {}), l = wr(i);
4477
+ function kr(e) {
4478
+ let { field: t, fieldName: n, entityCode: r, value: i, onChange: a, mode: o, disabled: s } = e, c = Object.entries(t.slots ?? {}), l = Tr(i);
4452
4479
  return c.length === 0 ? /* @__PURE__ */ I("span", {
4453
4480
  className: "text-sm text-muted-foreground",
4454
4481
  children: "No slots configured"
@@ -4458,7 +4485,7 @@ function Or(e) {
4458
4485
  gap: 12
4459
4486
  },
4460
4487
  children: c.map(([e, i]) => {
4461
- let c = l[e] ?? null, u = Dr(t, e, i, c), d = u.display?.widget ?? "document_card", f = Qn(d);
4488
+ let c = l[e] ?? null, u = Or(t, e, i, c), d = u.display?.widget ?? "document_card", f = $n(d);
4462
4489
  return f ? /* @__PURE__ */ L("div", {
4463
4490
  style: {
4464
4491
  display: "grid",
@@ -4470,7 +4497,7 @@ function Or(e) {
4470
4497
  fontWeight: 600,
4471
4498
  color: "var(--text-2)"
4472
4499
  },
4473
- children: Tr(e)
4500
+ children: Er(e)
4474
4501
  }), /* @__PURE__ */ I(f, {
4475
4502
  field: u,
4476
4503
  fieldName: e,
@@ -4498,7 +4525,7 @@ function Or(e) {
4498
4525
  fontWeight: 600,
4499
4526
  color: "var(--text-2)"
4500
4527
  },
4501
- children: Tr(e)
4528
+ children: Er(e)
4502
4529
  }), /* @__PURE__ */ I("span", {
4503
4530
  className: "text-sm text-muted-foreground",
4504
4531
  children: `Unknown file widget: ${d}`
@@ -4509,43 +4536,43 @@ function Or(e) {
4509
4536
  }
4510
4537
  //#endregion
4511
4538
  //#region src/components/file-widgets/builtins.ts
4512
- var kr = !1;
4513
- function Ar() {
4514
- kr ||= (Zn("square_image", pr), Zn("circle_image", mr), Zn("wide_banner", hr), Zn("grid", vr), Zn("document_card", br), Zn("file_list", Cr), Zn("labeled_slots", Or), !0);
4539
+ var Ar = !1;
4540
+ function jr() {
4541
+ Ar ||= (Qn("square_image", mr), Qn("circle_image", hr), Qn("wide_banner", gr), Qn("grid", yr), Qn("document_card", xr), Qn("file_list", wr), Qn("labeled_slots", kr), !0);
4515
4542
  }
4516
4543
  //#endregion
4517
4544
  //#region src/components/file-widgets/host.tsx
4518
- Ar();
4519
- function jr(e, t) {
4545
+ jr();
4546
+ function Mr(e, t) {
4520
4547
  return e.files?.get(t);
4521
4548
  }
4522
- function Mr(e, t) {
4549
+ function Nr(e, t) {
4523
4550
  return Object.prototype.hasOwnProperty.call(e, t) ? e[t] ?? null : e.$files?.[t] ?? null;
4524
4551
  }
4525
- function Nr(e, t, n) {
4526
- if (jr(e, n)) return Mr(t, n);
4552
+ function Pr(e, t, n) {
4553
+ if (Mr(e, n)) return Nr(t, n);
4527
4554
  let r = e.fields.get(n);
4528
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? w(t[n], Mr(t, n)) : t[n];
4555
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? w(t[n], Nr(t, n)) : t[n];
4529
4556
  }
4530
- function Pr(e, t, n) {
4557
+ function Fr(e, t, n) {
4531
4558
  let r = e.fields.get(t);
4532
4559
  return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? b(n) : n;
4533
4560
  }
4534
- function Fr(e, t, n) {
4535
- let r = jr(e, t);
4561
+ function Ir(e, t, n) {
4562
+ let r = Mr(e, t);
4536
4563
  if (r) return r.name || t;
4537
4564
  let i = e.fields.get(t);
4538
4565
  return i ? He(i, t, n) : t;
4539
4566
  }
4540
- function Ir(e) {
4541
- let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, navigate: f, locale: p, fieldId: m, labelId: h } = e, g = jr(t, r);
4567
+ function Lr(e) {
4568
+ let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, navigate: f, locale: p, fieldId: m, labelId: h } = e, g = Mr(t, r);
4542
4569
  if (g) {
4543
- let e = g.display?.widget ?? "", t = Qn(e);
4570
+ let e = g.display?.widget ?? "", t = $n(e);
4544
4571
  return t ? /* @__PURE__ */ I(t, {
4545
4572
  field: g,
4546
4573
  fieldName: r,
4547
4574
  entityCode: n,
4548
- value: Mr(i, r),
4575
+ value: Nr(i, r),
4549
4576
  mode: a,
4550
4577
  onChange: o,
4551
4578
  disabled: c,
@@ -4556,11 +4583,11 @@ function Ir(e) {
4556
4583
  });
4557
4584
  }
4558
4585
  let _ = t.fields.get(r);
4559
- return _ ? La({
4586
+ return _ ? Ra({
4560
4587
  field: _,
4561
4588
  entityCode: n,
4562
4589
  fieldName: r,
4563
- value: Nr(t, i, r),
4590
+ value: Pr(t, i, r),
4564
4591
  mode: a,
4565
4592
  onChange: o,
4566
4593
  record: i,
@@ -4577,80 +4604,80 @@ function Ir(e) {
4577
4604
  }
4578
4605
  //#endregion
4579
4606
  //#region src/components/file-widgets/payload.ts
4580
- function Lr(e) {
4607
+ function Rr(e) {
4581
4608
  return !e || Array.isArray(e) ? null : e;
4582
4609
  }
4583
- function Rr(e) {
4610
+ function zr(e) {
4584
4611
  return Array.isArray(e) ? e : [];
4585
4612
  }
4586
- function zr(e) {
4613
+ function Br(e) {
4587
4614
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
4588
4615
  }
4589
- function Br(e, t) {
4590
- return e.mode === "array" ? Rr(t) : e.mode === "named_map" ? zr(t) : Lr(t);
4616
+ function Vr(e, t) {
4617
+ return e.mode === "array" ? zr(t) : e.mode === "named_map" ? Br(t) : Rr(t);
4591
4618
  }
4592
- function Vr(e, t, n, r) {
4619
+ function Hr(e, t, n, r) {
4593
4620
  let i = {
4594
4621
  file_id: e.id,
4595
4622
  filename: e.filename
4596
4623
  };
4597
4624
  return r && (i.slot = r), n && (i.position = t), e.metadata !== void 0 && (i.metadata = e.metadata), i;
4598
4625
  }
4599
- function Hr(e, t) {
4626
+ function Ur(e, t) {
4600
4627
  if (e.mode === "array") {
4601
- let e = Rr(t);
4602
- return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => Vr(e, t, !0)) };
4628
+ let e = zr(t);
4629
+ return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => Hr(e, t, !0)) };
4603
4630
  }
4604
4631
  if (e.mode === "named_map") {
4605
- let e = zr(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => Vr(t, 0, !1, e));
4632
+ let e = Br(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => Hr(t, 0, !1, e));
4606
4633
  return n.length === 0 ? { clear: !0 } : { set: n };
4607
4634
  }
4608
- let n = Lr(t);
4609
- return n ? { set: [Vr(n, 0, !0)] } : { clear: !0 };
4635
+ let n = Rr(t);
4636
+ return n ? { set: [Hr(n, 0, !0)] } : { clear: !0 };
4610
4637
  }
4611
- function Ur(e) {
4638
+ function Wr(e) {
4612
4639
  return JSON.stringify(e);
4613
4640
  }
4614
- function Wr(e) {
4641
+ function Gr(e) {
4615
4642
  let { entity: t, formData: n, record: r, isNew: i } = e, a = {};
4616
4643
  for (let e of t.files?.names() ?? []) {
4617
4644
  if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
4618
- let o = jr(t, e);
4645
+ let o = Mr(t, e);
4619
4646
  if (!o) continue;
4620
- let s = Br(o, n[e]);
4647
+ let s = Vr(o, n[e]);
4621
4648
  if (i) {
4622
- if (o.mode === "array" ? Rr(s).length === 0 : o.mode === "named_map" ? Object.values(zr(s)).every((e) => e == null) : Lr(s) == null) continue;
4623
- a[e] = Hr(o, s);
4649
+ if (o.mode === "array" ? zr(s).length === 0 : o.mode === "named_map" ? Object.values(Br(s)).every((e) => e == null) : Rr(s) == null) continue;
4650
+ a[e] = Ur(o, s);
4624
4651
  continue;
4625
4652
  }
4626
- let c = Br(o, r ? Mr(r, e) : null), l = Hr(o, s), u = Hr(o, c);
4627
- Ur(l) !== Ur(u) && (a[e] = l);
4653
+ let c = Vr(o, r ? Nr(r, e) : null), l = Ur(o, s), u = Ur(o, c);
4654
+ Wr(l) !== Wr(u) && (a[e] = l);
4628
4655
  }
4629
4656
  let o = t.fields;
4630
4657
  if (!o) return a;
4631
4658
  for (let e of o.names()) {
4632
4659
  let s = o.get(e)?.files;
4633
4660
  if (!s || s.mode !== "rich_text_inline" || !Object.prototype.hasOwnProperty.call(n, e)) continue;
4634
- let c = Kr(s, n[e]);
4661
+ let c = qr(s, n[e]);
4635
4662
  if (i) {
4636
4663
  if (c.clear) continue;
4637
4664
  a[e] = c;
4638
4665
  continue;
4639
4666
  }
4640
- let l = Kr(s, r ? Nr({
4667
+ let l = qr(s, r ? Pr({
4641
4668
  ...t,
4642
4669
  fields: o
4643
4670
  }, r, e) : null);
4644
- Ur(c) !== Ur(l) && (a[e] = c);
4671
+ Wr(c) !== Wr(l) && (a[e] = c);
4645
4672
  }
4646
4673
  return a;
4647
4674
  }
4648
- function Gr(e) {
4675
+ function Kr(e) {
4649
4676
  let t = [];
4650
4677
  for (let n of Object.values(e)) for (let e of n.set ?? []) t.push(e.file_id);
4651
4678
  return t;
4652
4679
  }
4653
- function Kr(e, t) {
4680
+ function qr(e, t) {
4654
4681
  if (e.mode !== "rich_text_inline") return { clear: !0 };
4655
4682
  let n = S(b(t));
4656
4683
  return n.length === 0 ? { clear: !0 } : { set: n.map((e, t) => ({
@@ -4660,10 +4687,10 @@ function Kr(e, t) {
4660
4687
  }
4661
4688
  //#endregion
4662
4689
  //#region src/components/file-widgets/index.ts
4663
- Ar();
4690
+ jr();
4664
4691
  //#endregion
4665
4692
  //#region src/components/fields/RichTextField.tsx
4666
- function qr(e) {
4693
+ function Jr(e) {
4667
4694
  let { field: n, entityCode: r, fieldName: i, value: a, mode: o, onChange: l, record: u, compact: f, fieldId: p } = e, m = M(null), h = M(null), g = M(/* @__PURE__ */ new Map()), _ = M(/* @__PURE__ */ new Set()), [v, b] = N(0), [T, E] = N(null), { register: D, unregister: O } = c(), k = u?.$files?.[i], A = j(() => w(a, k), [k, a]), P = A.markdown, F = n.files?.accepts, R = n.files?.max_size_bytes, z = (e, t = A.files) => {
4668
4695
  let n = new Set(S(e)), r = [];
4669
4696
  for (let e of _.current) n.has(e) || r.push(e);
@@ -4712,15 +4739,15 @@ function qr(e) {
4712
4739
  fieldCode: i
4713
4740
  }), c = e.type.startsWith("image/") ? URL.createObjectURL(e) : void 0;
4714
4741
  c && g.current.set(n.id, c);
4715
- let l = Yr(n, c);
4742
+ let l = Xr(n, c);
4716
4743
  if (D(n.id, () => s(n.id)), _.current.add(n.id), a.length === 1) {
4717
- let e = Jr(o.markdown, y(l));
4744
+ let e = Yr(o.markdown, y(l));
4718
4745
  B(o, e, l), o = x({
4719
4746
  markdown: `${o.markdown}${e}`,
4720
4747
  files: o.files
4721
4748
  }, l);
4722
4749
  } else {
4723
- let e = Jr(o.markdown, y(l));
4750
+ let e = Yr(o.markdown, y(l));
4724
4751
  o = x({
4725
4752
  markdown: `${o.markdown}${e}`,
4726
4753
  files: o.files
@@ -4862,10 +4889,10 @@ function qr(e) {
4862
4889
  ]
4863
4890
  });
4864
4891
  }
4865
- function Jr(e, t) {
4892
+ function Yr(e, t) {
4866
4893
  return e ? e.endsWith("\n\n") ? t : e.endsWith("\n") ? `\n${t}` : `\n\n${t}` : `${t}\n`;
4867
4894
  }
4868
- function Yr(e, t) {
4895
+ function Xr(e, t) {
4869
4896
  return {
4870
4897
  id: e.id,
4871
4898
  filename: e.filename,
@@ -4880,7 +4907,7 @@ function Yr(e, t) {
4880
4907
  }
4881
4908
  //#endregion
4882
4909
  //#region src/components/fields/cells/factories/text.ts
4883
- var Xr = () => (e) => {
4910
+ var Zr = () => (e) => {
4884
4911
  if (e == null || e === "") return "—";
4885
4912
  if (typeof e == "object") try {
4886
4913
  return JSON.stringify(e);
@@ -4888,8 +4915,8 @@ var Xr = () => (e) => {
4888
4915
  return String(e);
4889
4916
  }
4890
4917
  return String(e);
4891
- }, Zr = (e) => {
4892
- let { field: t, fieldName: n, locale: r = "en" } = e, i = Qr(t, n, r);
4918
+ }, Qr = (e) => {
4919
+ let { field: t, fieldName: n, locale: r = "en" } = e, i = $r(t, n, r);
4893
4920
  return (e) => {
4894
4921
  if (e == null) return "—";
4895
4922
  let t = !!e;
@@ -4900,7 +4927,7 @@ var Xr = () => (e) => {
4900
4927
  });
4901
4928
  };
4902
4929
  };
4903
- function Qr(e, t, n) {
4930
+ function $r(e, t, n) {
4904
4931
  if (e.display?.bool_labels) return {
4905
4932
  trueLabel: $(e.display.bool_labels.true, n) || "Yes",
4906
4933
  falseLabel: $(e.display.bool_labels.false, n) || "No"
@@ -4921,14 +4948,14 @@ function Qr(e, t, n) {
4921
4948
  };
4922
4949
  }
4923
4950
  if (t.startsWith("is_")) {
4924
- let e = $r(t.slice(3));
4951
+ let e = ei(t.slice(3));
4925
4952
  return {
4926
4953
  trueLabel: e,
4927
4954
  falseLabel: `Not ${e}`
4928
4955
  };
4929
4956
  }
4930
4957
  if (t.startsWith("has_")) {
4931
- let e = $r(t.slice(4));
4958
+ let e = ei(t.slice(4));
4932
4959
  return {
4933
4960
  trueLabel: e,
4934
4961
  falseLabel: `No ${e}`
@@ -4939,12 +4966,12 @@ function Qr(e, t, n) {
4939
4966
  falseLabel: "No"
4940
4967
  };
4941
4968
  }
4942
- function $r(e) {
4969
+ function ei(e) {
4943
4970
  return e.split("_").map((e) => e && e[0].toUpperCase() + e.slice(1)).join(" ");
4944
4971
  }
4945
4972
  //#endregion
4946
4973
  //#region src/components/fields/cells/factories/badge.tsx
4947
- var ei = new Set([
4974
+ var ti = new Set([
4948
4975
  "indigo",
4949
4976
  "emerald",
4950
4977
  "amber",
@@ -4954,17 +4981,17 @@ var ei = new Set([
4954
4981
  "slate",
4955
4982
  "teal"
4956
4983
  ]);
4957
- function ti(e) {
4958
- return e && ei.has(e) ? e : "slate";
4984
+ function ni(e) {
4985
+ return e && ti.has(e) ? e : "slate";
4959
4986
  }
4960
- var ni = (e) => {
4987
+ var ri = (e) => {
4961
4988
  let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
4962
4989
  if (t.values) for (let e of t.values) r.set(e.code, {
4963
- tone: ti(e.color),
4990
+ tone: ni(e.color),
4964
4991
  label: $(e.name, n) || e.code
4965
4992
  });
4966
4993
  if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) {
4967
- let t = r.get(e), a = i.color ? ti(i.color) : t?.tone ?? "slate", o = (i.label ? $(i.label, n) : "") || t?.label || e;
4994
+ let t = r.get(e), a = i.color ? ni(i.color) : t?.tone ?? "slate", o = (i.label ? $(i.label, n) : "") || t?.label || e;
4968
4995
  r.set(e, {
4969
4996
  tone: a,
4970
4997
  label: o
@@ -4979,7 +5006,7 @@ var ni = (e) => {
4979
5006
  children: n?.label ?? t
4980
5007
  });
4981
5008
  };
4982
- }, ri = new Set([
5009
+ }, ii = new Set([
4983
5010
  "indigo",
4984
5011
  "emerald",
4985
5012
  "amber",
@@ -4989,13 +5016,13 @@ var ni = (e) => {
4989
5016
  "slate",
4990
5017
  "teal"
4991
5018
  ]);
4992
- function ii(e) {
4993
- return e && ri.has(e) ? e : "slate";
5019
+ function ai(e) {
5020
+ return e && ii.has(e) ? e : "slate";
4994
5021
  }
4995
- var ai = (e) => {
5022
+ var oi = (e) => {
4996
5023
  let { entity: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
4997
5024
  if (t?.status_groups) for (let e of Object.values(t.status_groups)) for (let t of e.statuses) r.set(t.code, {
4998
- tone: ii(t.color),
5025
+ tone: ai(t.color),
4999
5026
  label: $(t.name, n) || t.code
5000
5027
  });
5001
5028
  return (e) => {
@@ -5007,7 +5034,7 @@ var ai = (e) => {
5007
5034
  children: n?.label ?? t
5008
5035
  });
5009
5036
  };
5010
- }, oi = new Set([
5037
+ }, si = new Set([
5011
5038
  "indigo",
5012
5039
  "emerald",
5013
5040
  "amber",
@@ -5017,14 +5044,14 @@ var ai = (e) => {
5017
5044
  "slate",
5018
5045
  "teal"
5019
5046
  ]);
5020
- function si(e) {
5021
- return e && oi.has(e) ? e : null;
5047
+ function ci(e) {
5048
+ return e && si.has(e) ? e : null;
5022
5049
  }
5023
- var ci = (e) => {
5050
+ var li = (e) => {
5024
5051
  let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
5025
5052
  if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) r.set(e, {
5026
5053
  label: i.label && $(i.label, n) || e,
5027
- tone: si(i.color)
5054
+ tone: ci(i.color)
5028
5055
  });
5029
5056
  return (e) => !Array.isArray(e) || e.length === 0 ? "—" : /* @__PURE__ */ I("span", {
5030
5057
  style: {
@@ -5041,14 +5068,14 @@ var ci = (e) => {
5041
5068
  }, `${n}-${t}`) : /* @__PURE__ */ I(Z, { children: i?.label ?? n }, `${n}-${t}`);
5042
5069
  })
5043
5070
  });
5044
- }, li = () => (e) => {
5071
+ }, ui = () => (e) => {
5045
5072
  if (e == null || e === "") return "—";
5046
5073
  let { text: t, absolute: n } = vn(typeof e == "string" ? e : String(e));
5047
5074
  return /* @__PURE__ */ I("span", {
5048
5075
  title: n,
5049
5076
  children: t
5050
5077
  });
5051
- }, ui = () => (e) => e == null || e === "" ? "—" : _n(typeof e == "string" ? e : String(e)), di = 60 * 1e3, fi = 300 * 1e3, pi = () => (e) => {
5078
+ }, di = () => (e) => e == null || e === "" ? "—" : _n(typeof e == "string" ? e : String(e)), fi = 60 * 1e3, pi = 300 * 1e3, mi = () => (e) => {
5052
5079
  if (e == null || e === "") return "—";
5053
5080
  let t = typeof e == "string" ? e : String(e), n = new Date(t);
5054
5081
  if (isNaN(n.getTime())) return t;
@@ -5057,7 +5084,7 @@ var ci = (e) => {
5057
5084
  title: r,
5058
5085
  children: ["in ", H(n, /* @__PURE__ */ new Date(), { addSuffix: !1 })]
5059
5086
  });
5060
- if (i <= di) return /* @__PURE__ */ I("span", {
5087
+ if (i <= fi) return /* @__PURE__ */ I("span", {
5061
5088
  title: r,
5062
5089
  children: /* @__PURE__ */ I(J, {
5063
5090
  tone: "slate",
@@ -5069,13 +5096,13 @@ var ci = (e) => {
5069
5096
  return /* @__PURE__ */ I("span", {
5070
5097
  title: r,
5071
5098
  children: /* @__PURE__ */ L(J, {
5072
- tone: i <= fi ? "amber" : "rose",
5099
+ tone: i <= pi ? "amber" : "rose",
5073
5100
  size: "xs",
5074
5101
  children: ["overdue ", a]
5075
5102
  })
5076
5103
  });
5077
- }, mi = (e) => {
5078
- let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = hi(typeof t.scale == "number" ? t.scale : 2, 0, 6), a = new Intl.NumberFormat(n, {
5104
+ }, hi = (e) => {
5105
+ let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = gi(typeof t.scale == "number" ? t.scale : 2, 0, 6), a = new Intl.NumberFormat(n, {
5079
5106
  style: "currency",
5080
5107
  currency: r,
5081
5108
  minimumFractionDigits: i,
@@ -5087,16 +5114,16 @@ var ci = (e) => {
5087
5114
  return Number.isFinite(t) ? a.format(t) : String(e);
5088
5115
  };
5089
5116
  };
5090
- function hi(e, t, n) {
5117
+ function gi(e, t, n) {
5091
5118
  return e < t ? t : e > n ? n : e;
5092
5119
  }
5093
5120
  //#endregion
5094
5121
  //#region src/components/fields/cells/factories/refLink.tsx
5095
- var gi = (e) => {
5122
+ var _i = (e) => {
5096
5123
  let { field: t, entities: n, screens: r, refs: i, navigate: a } = e, o = t.ref?.entity, s = o ? n?.[o] : void 0, c = typeof i == "function" ? i : () => i, l = t.display?.ref_display_field ?? t.ref?.display?.field ?? s?.display?.display_field, u = s?.detail_screen, d = (u ? r?.[u] : void 0)?.route;
5097
5124
  return (e, t) => {
5098
5125
  if (e == null || e === "") return "—";
5099
- let n = String(e), r = _i(n, o, c(), l);
5126
+ let n = String(e), r = vi(n, o, c(), l);
5100
5127
  if (!d) return r;
5101
5128
  let i = d.replace(":id", encodeURIComponent(n));
5102
5129
  return a ? /* @__PURE__ */ I("a", {
@@ -5123,29 +5150,29 @@ var gi = (e) => {
5123
5150
  });
5124
5151
  };
5125
5152
  };
5126
- function _i(e, t, n, r) {
5153
+ function vi(e, t, n, r) {
5127
5154
  let i = t && n ? n[t]?.[e] : void 0;
5128
5155
  return i ? Re(i, r, e) : e;
5129
5156
  }
5130
5157
  //#endregion
5131
5158
  //#region src/components/fields/cells/factories/url-helpers.ts
5132
- var vi = /^(https?|ftps?|ssh|mailto|tel):/i, yi = /^(info|name|tech|site|cloud|online|store|shop|blog|space|world|link|live|page|zone|life|team|work|host|land|news|wiki|mobi|coop|aero|asia)$/i;
5133
- function bi(e) {
5134
- return /^[a-z]{2,3}$/i.test(e) || yi.test(e);
5135
- }
5159
+ var yi = /^(https?|ftps?|ssh|mailto|tel):/i, bi = /^(info|name|tech|site|cloud|online|store|shop|blog|space|world|link|live|page|zone|life|team|work|host|land|news|wiki|mobi|coop|aero|asia)$/i;
5136
5160
  function xi(e) {
5161
+ return /^[a-z]{2,3}$/i.test(e) || bi.test(e);
5162
+ }
5163
+ function Si(e) {
5137
5164
  if (!e.includes(".")) return !1;
5138
5165
  let t = e.split(".");
5139
5166
  if (t.length < 3) return !0;
5140
5167
  let n = t[0].toLowerCase();
5141
- return /^(com|org|net|edu|gov)$/.test(n) ? !1 : /^(io|app|dev)$/.test(n) ? bi(t[t.length - 1]) : !0;
5168
+ return /^(com|org|net|edu|gov)$/.test(n) ? !1 : /^(io|app|dev)$/.test(n) ? xi(t[t.length - 1]) : !0;
5142
5169
  }
5143
- function Si(e) {
5144
- if (vi.test(e)) return e;
5170
+ function Ci(e) {
5171
+ if (yi.test(e)) return e;
5145
5172
  let t = e.match(/^([a-z][a-z0-9+.-]*):/i);
5146
5173
  if (t) {
5147
5174
  let n = t[1], r = e.slice(t[0].length);
5148
- if (/^\d+([/?#]|$)/.test(r) && xi(n)) {
5175
+ if (/^\d+([/?#]|$)/.test(r) && Si(n)) {
5149
5176
  let t = parseInt(r, 10);
5150
5177
  if (t >= 1 && t <= 65535) return `https://${e}`;
5151
5178
  }
@@ -5153,14 +5180,14 @@ function Si(e) {
5153
5180
  }
5154
5181
  return `https://${e}`;
5155
5182
  }
5156
- function Ci(e) {
5183
+ function wi(e) {
5157
5184
  try {
5158
5185
  return new URL(e).hostname.replace(/^www\./i, "") || null;
5159
5186
  } catch {
5160
5187
  return null;
5161
5188
  }
5162
5189
  }
5163
- function wi(e, t) {
5190
+ function Ti(e, t) {
5164
5191
  if (t !== "linkedin.com") return null;
5165
5192
  try {
5166
5193
  let t = new URL(e).pathname.match(/^\/(in|company|school)\/([^/]+)/i);
@@ -5168,7 +5195,7 @@ function wi(e, t) {
5168
5195
  } catch {}
5169
5196
  return null;
5170
5197
  }
5171
- function Ti(e) {
5198
+ function Ei(e) {
5172
5199
  try {
5173
5200
  return new URL(e), !0;
5174
5201
  } catch {
@@ -5177,7 +5204,7 @@ function Ti(e) {
5177
5204
  }
5178
5205
  //#endregion
5179
5206
  //#region src/components/fields/cells/factories/host-icons.tsx
5180
- function Ei(e, t = "0 0 24 24") {
5207
+ function Di(e, t = "0 0 24 24") {
5181
5208
  return (n) => /* @__PURE__ */ I("svg", {
5182
5209
  width: 16,
5183
5210
  height: 16,
@@ -5193,11 +5220,11 @@ function Ei(e, t = "0 0 24 24") {
5193
5220
  children: e
5194
5221
  });
5195
5222
  }
5196
- var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5223
+ var Oi = Di(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5197
5224
  cx: "12",
5198
5225
  cy: "12",
5199
5226
  r: "9"
5200
- }), /* @__PURE__ */ I("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })), Oi = (e) => /* @__PURE__ */ I("svg", {
5227
+ }), /* @__PURE__ */ I("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })), ki = (e) => /* @__PURE__ */ I("svg", {
5201
5228
  width: 16,
5202
5229
  height: 16,
5203
5230
  viewBox: "0 0 24 24",
@@ -5206,7 +5233,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5206
5233
  style: { flexShrink: 0 },
5207
5234
  ...e,
5208
5235
  children: /* @__PURE__ */ I("path", { d: "M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.13 1.45-2.13 2.94v5.67H9.36V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.72V1.72C24 .77 23.2 0 22.22 0z" })
5209
- }), ki = (e) => /* @__PURE__ */ I("svg", {
5236
+ }), Ai = (e) => /* @__PURE__ */ I("svg", {
5210
5237
  width: 16,
5211
5238
  height: 16,
5212
5239
  viewBox: "0 0 24 24",
@@ -5215,7 +5242,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5215
5242
  style: { flexShrink: 0 },
5216
5243
  ...e,
5217
5244
  children: /* @__PURE__ */ I("path", { d: "M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56 0-.27-.01-1-.02-1.96-3.21.7-3.89-1.55-3.89-1.55-.52-1.34-1.28-1.7-1.28-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.2 1.77 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.3 1.19-3.11-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.19a11.05 11.05 0 0 1 5.79 0c2.21-1.5 3.18-1.19 3.18-1.19.63 1.59.23 2.76.11 3.05.74.81 1.19 1.85 1.19 3.11 0 4.44-2.71 5.42-5.29 5.7.41.36.78 1.07.78 2.16 0 1.56-.01 2.81-.01 3.19 0 .31.21.68.8.56A11.5 11.5 0 0 0 12 .5z" })
5218
- }), Ai = (e) => /* @__PURE__ */ I("svg", {
5245
+ }), ji = (e) => /* @__PURE__ */ I("svg", {
5219
5246
  width: 16,
5220
5247
  height: 16,
5221
5248
  viewBox: "0 0 24 24",
@@ -5224,7 +5251,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5224
5251
  style: { flexShrink: 0 },
5225
5252
  ...e,
5226
5253
  children: /* @__PURE__ */ I("path", { d: "M18.244 2H21.5l-7.62 8.71L23 22h-7.05l-5.52-7.21L4.07 22H.81l8.18-9.34L1 2h7.22l5 6.59L18.244 2zm-2.47 18h1.95L7.32 4h-2.1l10.55 16z" })
5227
- }), ji = (e) => /* @__PURE__ */ I("svg", {
5254
+ }), Mi = (e) => /* @__PURE__ */ I("svg", {
5228
5255
  width: 16,
5229
5256
  height: 16,
5230
5257
  viewBox: "0 0 24 24",
@@ -5233,7 +5260,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5233
5260
  style: { flexShrink: 0 },
5234
5261
  ...e,
5235
5262
  children: /* @__PURE__ */ I("path", { d: "M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2C0 8.1 0 12 0 12s0 3.9.5 5.8a3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1c.5-1.9.5-5.8.5-5.8s0-3.9-.5-5.8zM9.6 15.6V8.4l6.2 3.6-6.2 3.6z" })
5236
- }), Mi = (e) => /* @__PURE__ */ I("svg", {
5263
+ }), Ni = (e) => /* @__PURE__ */ I("svg", {
5237
5264
  width: 16,
5238
5265
  height: 16,
5239
5266
  viewBox: "0 0 24 24",
@@ -5242,7 +5269,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5242
5269
  style: { flexShrink: 0 },
5243
5270
  ...e,
5244
5271
  children: /* @__PURE__ */ I("path", { d: "M24 5.45v13.1A1.45 1.45 0 0 1 22.55 20H19.5V9.27L12 14.7 4.5 9.27V20H1.45A1.45 1.45 0 0 1 0 18.55V5.45A1.45 1.45 0 0 1 1.45 4h.5l10.05 7.27L22.05 4h.5A1.45 1.45 0 0 1 24 5.45z" })
5245
- }), Ni = (e) => /* @__PURE__ */ L("svg", {
5272
+ }), Pi = (e) => /* @__PURE__ */ L("svg", {
5246
5273
  width: 16,
5247
5274
  height: 16,
5248
5275
  viewBox: "0 0 24 24",
@@ -5267,7 +5294,7 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5267
5294
  d: "M15.17 18.96a2.52 2.52 0 1 1-2.52 2.52v-2.52h2.52zm0-1.27a2.52 2.52 0 1 1 0-5.04h6.31a2.52 2.52 0 1 1 0 5.04h-6.31z"
5268
5295
  })
5269
5296
  ]
5270
- }), Pi = (e) => /* @__PURE__ */ I("svg", {
5297
+ }), Fi = (e) => /* @__PURE__ */ I("svg", {
5271
5298
  width: 16,
5272
5299
  height: 16,
5273
5300
  viewBox: "0 0 24 24",
@@ -5276,39 +5303,39 @@ var Di = Ei(/* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("circle", {
5276
5303
  style: { flexShrink: 0 },
5277
5304
  ...e,
5278
5305
  children: /* @__PURE__ */ I("path", { d: "M4.46 3.83 14.94 3a3.7 3.7 0 0 1 2.5.62l3 2.16a1.4 1.4 0 0 1 .56 1.31v13.06a1.7 1.7 0 0 1-1.66 1.7l-12.5.78a2.4 2.4 0 0 1-1.85-.62L2.5 19.7a1.7 1.7 0 0 1-.5-1.2V5.16c0-.74.6-1.27 1.46-1.33l1-.01zm.46 1.86c-.31 0-.46.16-.46.47v12.25c0 .31.16.47.46.47l11.62-.7c.31 0 .46-.16.46-.47V6c0-.32-.16-.47-.46-.47L4.92 5.7zm5.57 2.32c.16 0 .31.16.31.31v.46l3.7.23c.31 0 .46.16.46.47v8.32c0 .31-.16.47-.46.47l-3.7.23c-.31 0-.46-.16-.46-.47V8.78c0-.16.15-.32.15-.46l-.04-.31z" })
5279
- }), Fi = {
5280
- "linkedin.com": Oi,
5281
- "github.com": ki,
5282
- "x.com": Ai,
5283
- "twitter.com": Ai,
5284
- "youtube.com": ji,
5285
- "youtu.be": ji,
5286
- "gmail.com": Mi,
5287
- "mail.google.com": Mi,
5288
- "slack.com": Ni,
5289
- "notion.so": Pi,
5290
- "notion.com": Pi
5306
+ }), Ii = {
5307
+ "linkedin.com": ki,
5308
+ "github.com": Ai,
5309
+ "x.com": ji,
5310
+ "twitter.com": ji,
5311
+ "youtube.com": Mi,
5312
+ "youtu.be": Mi,
5313
+ "gmail.com": Ni,
5314
+ "mail.google.com": Ni,
5315
+ "slack.com": Pi,
5316
+ "notion.so": Fi,
5317
+ "notion.com": Fi
5291
5318
  };
5292
- function Ii(e, t) {
5319
+ function Li(e, t) {
5293
5320
  return !e || t === "none" ? null : t === "google" ? `https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=32` : `https://${e}/favicon.ico`;
5294
5321
  }
5295
- var Li = {
5322
+ var Ri = {
5296
5323
  width: 16,
5297
5324
  height: 16,
5298
5325
  flexShrink: 0,
5299
5326
  objectFit: "contain"
5300
5327
  };
5301
- function Ri({ domain: e }) {
5302
- let t = Bt((e) => e.faviconSource), n = e ? e.toLowerCase() : "", r = n ? Fi[n] : void 0;
5328
+ function zi({ domain: e }) {
5329
+ let t = Bt((e) => e.faviconSource), n = e ? e.toLowerCase() : "", r = n ? Ii[n] : void 0;
5303
5330
  if (r) return /* @__PURE__ */ I(r, {});
5304
- let i = Ii(n, t);
5305
- return i ? /* @__PURE__ */ I(zi, { src: i }) : /* @__PURE__ */ I(Di, {});
5331
+ let i = Li(n, t);
5332
+ return i ? /* @__PURE__ */ I(Bi, { src: i }) : /* @__PURE__ */ I(Oi, {});
5306
5333
  }
5307
- function zi({ src: e }) {
5334
+ function Bi({ src: e }) {
5308
5335
  let [t, n] = N(!1);
5309
5336
  return k(() => {
5310
5337
  n(!1);
5311
- }, [e]), t ? /* @__PURE__ */ I(Di, {}) : /* @__PURE__ */ I("img", {
5338
+ }, [e]), t ? /* @__PURE__ */ I(Oi, {}) : /* @__PURE__ */ I("img", {
5312
5339
  src: e,
5313
5340
  alt: "",
5314
5341
  width: 16,
@@ -5316,99 +5343,99 @@ function zi({ src: e }) {
5316
5343
  loading: "lazy",
5317
5344
  decoding: "async",
5318
5345
  referrerPolicy: "no-referrer",
5319
- style: Li,
5346
+ style: Ri,
5320
5347
  onError: () => n(!0)
5321
5348
  });
5322
5349
  }
5323
5350
  //#endregion
5324
5351
  //#region src/components/fields/cells/factories/url.tsx
5325
- var Bi = {
5352
+ var Vi = {
5326
5353
  display: "inline-flex",
5327
5354
  alignItems: "center",
5328
5355
  gap: 4,
5329
5356
  fontSize: 12.5,
5330
5357
  color: "var(--accent)",
5331
5358
  textDecoration: "none"
5332
- }, Vi = {
5359
+ }, Hi = {
5333
5360
  fontSize: 12.5,
5334
5361
  color: "var(--text-4)"
5335
- }, Hi = { fontSize: 12.5 }, Ui = () => (e) => {
5362
+ }, Ui = { fontSize: 12.5 }, Wi = () => (e) => {
5336
5363
  let t = e == null ? "" : String(e);
5337
5364
  if (!t) return /* @__PURE__ */ I("span", {
5338
- style: Vi,
5365
+ style: Hi,
5339
5366
  children: "—"
5340
5367
  });
5341
- let n = Si(t);
5342
- if (n == null || !Ti(n)) return /* @__PURE__ */ I("span", {
5343
- style: Hi,
5368
+ let n = Ci(t);
5369
+ if (n == null || !Ei(n)) return /* @__PURE__ */ I("span", {
5370
+ style: Ui,
5344
5371
  children: t
5345
5372
  });
5346
- let r = Ci(n), i = wi(n, r ?? "") ?? r ?? t;
5373
+ let r = wi(n), i = Ti(n, r ?? "") ?? r ?? t;
5347
5374
  return /* @__PURE__ */ L("a", {
5348
5375
  href: n,
5349
5376
  target: "_blank",
5350
5377
  rel: "noopener noreferrer",
5351
5378
  title: t,
5352
5379
  className: "mono",
5353
- style: Bi,
5380
+ style: Vi,
5354
5381
  children: [
5355
- /* @__PURE__ */ I(Ri, { domain: r }),
5382
+ /* @__PURE__ */ I(zi, { domain: r }),
5356
5383
  i,
5357
5384
  /* @__PURE__ */ I(G.external, { size: 11 })
5358
5385
  ]
5359
5386
  });
5360
- }, Wi = {
5387
+ }, Gi = {
5361
5388
  fontSize: 12.5,
5362
5389
  color: "var(--accent)",
5363
5390
  textDecoration: "none"
5364
- }, Gi = {
5391
+ }, Ki = {
5365
5392
  fontSize: 12.5,
5366
5393
  color: "var(--text-4)"
5367
- }, Ki = () => (e) => {
5394
+ }, qi = () => (e) => {
5368
5395
  let t = e == null ? "" : String(e);
5369
5396
  return t ? /* @__PURE__ */ I("a", {
5370
5397
  href: `mailto:${t}`,
5371
5398
  className: "mono",
5372
- style: Wi,
5399
+ style: Gi,
5373
5400
  children: t
5374
5401
  }) : /* @__PURE__ */ I("span", {
5375
- style: Gi,
5402
+ style: Ki,
5376
5403
  children: "—"
5377
5404
  });
5378
- }, qi = {
5405
+ }, Ji = {
5379
5406
  fontSize: 12.5,
5380
5407
  color: "var(--accent)",
5381
5408
  textDecoration: "none"
5382
- }, Ji = {
5409
+ }, Yi = {
5383
5410
  fontSize: 12.5,
5384
5411
  color: "var(--text-4)"
5385
- }, Yi = { fontSize: 12.5 }, Xi = /^[+()\-.\s\d]+$/, Zi = () => (e) => {
5412
+ }, Xi = { fontSize: 12.5 }, Zi = /^[+()\-.\s\d]+$/, Qi = () => (e) => {
5386
5413
  let t = e == null ? "" : String(e);
5387
5414
  if (!t) return /* @__PURE__ */ I("span", {
5388
- style: Ji,
5415
+ style: Yi,
5389
5416
  children: "—"
5390
5417
  });
5391
5418
  let n = t.trim();
5392
- return Xi.test(n) ? /* @__PURE__ */ I("a", {
5419
+ return Zi.test(n) ? /* @__PURE__ */ I("a", {
5393
5420
  href: `tel:${n.replace(/\s+/g, "")}`,
5394
5421
  className: "mono",
5395
- style: qi,
5422
+ style: Ji,
5396
5423
  children: t
5397
5424
  }) : /* @__PURE__ */ I("span", {
5398
- style: Yi,
5425
+ style: Xi,
5399
5426
  children: t
5400
5427
  });
5401
- }, Qi = {
5428
+ }, $i = {
5402
5429
  fontSize: 12.5,
5403
5430
  fontVariantNumeric: "tabular-nums"
5404
- }, $i = {
5431
+ }, ea = {
5405
5432
  color: "var(--text-3)",
5406
5433
  marginLeft: 4
5407
- }, ea = {
5434
+ }, ta = {
5408
5435
  fontSize: 12.5,
5409
5436
  color: "var(--text-4)"
5410
- }, ta = { fontSize: 12.5 };
5411
- function na(e, t) {
5437
+ }, na = { fontSize: 12.5 };
5438
+ function ra(e, t) {
5412
5439
  let n = e.trim();
5413
5440
  if (n === "" || n === "-") return n;
5414
5441
  let r = n.startsWith("-"), [i, a] = (r ? n.slice(1) : n).split("."), o;
@@ -5420,60 +5447,60 @@ function na(e, t) {
5420
5447
  let s = r ? `-${o}` : o;
5421
5448
  return a !== void 0 && (s += `.${a}`), s;
5422
5449
  }
5423
- var ra = (e) => {
5450
+ var ia = (e) => {
5424
5451
  let { field: t, fieldName: n, locale: r = "en" } = e, i = new Intl.NumberFormat(r), a = t.type === "decimal", o = t.unit ? t.unit.display || t.unit.storage : void 0;
5425
5452
  return (e, t) => {
5426
5453
  if (e == null) return /* @__PURE__ */ I("span", {
5427
- style: ea,
5454
+ style: ta,
5428
5455
  children: "—"
5429
5456
  });
5430
5457
  let r = t.$units?.[n] || (o && !o.startsWith("$") ? o : void 0), s;
5431
- if (a && typeof e == "string") s = na(e, i);
5458
+ if (a && typeof e == "string") s = ra(e, i);
5432
5459
  else {
5433
5460
  let t = typeof e == "number" ? e : Number(e);
5434
5461
  s = Number.isFinite(t) ? i.format(t) : null;
5435
5462
  }
5436
5463
  return s == null ? /* @__PURE__ */ I("span", {
5437
- style: ta,
5464
+ style: na,
5438
5465
  children: "—"
5439
5466
  }) : /* @__PURE__ */ L("span", {
5440
5467
  className: "num",
5441
- style: Qi,
5468
+ style: $i,
5442
5469
  children: [s, r && /* @__PURE__ */ I("span", {
5443
- style: $i,
5470
+ style: ea,
5444
5471
  children: r
5445
5472
  })]
5446
5473
  });
5447
5474
  };
5448
- }, ia = {
5475
+ }, aa = {
5449
5476
  fontSize: 12.5,
5450
5477
  color: "var(--text-4)"
5451
- }, aa = { fontSize: 12.5 }, oa = () => (e) => e == null || e === "" ? /* @__PURE__ */ I("span", {
5452
- style: ia,
5478
+ }, oa = { fontSize: 12.5 }, sa = () => (e) => e == null || e === "" ? /* @__PURE__ */ I("span", {
5479
+ style: aa,
5453
5480
  children: "—"
5454
5481
  }) : /* @__PURE__ */ I("code", {
5455
5482
  className: "mono",
5456
- style: aa,
5483
+ style: oa,
5457
5484
  children: String(e)
5458
- }), sa = {
5485
+ }), ca = {
5459
5486
  display: "inline-flex",
5460
5487
  alignItems: "center",
5461
5488
  gap: 4,
5462
5489
  fontSize: 12.5,
5463
5490
  color: "var(--accent)",
5464
5491
  textDecoration: "none"
5465
- }, ca = {
5492
+ }, la = {
5466
5493
  fontSize: 12.5,
5467
5494
  color: "var(--text-4)"
5468
- }, la = { fontSize: 12.5 }, ua = () => (e) => {
5495
+ }, ua = { fontSize: 12.5 }, da = () => (e) => {
5469
5496
  let t = e == null ? "" : String(e);
5470
5497
  if (!t) return /* @__PURE__ */ I("span", {
5471
- style: ca,
5498
+ style: la,
5472
5499
  children: "—"
5473
5500
  });
5474
- let n = Si(t);
5475
- return n == null || !Ti(n) ? /* @__PURE__ */ I("span", {
5476
- style: la,
5501
+ let n = Ci(t);
5502
+ return n == null || !Ei(n) ? /* @__PURE__ */ I("span", {
5503
+ style: ua,
5477
5504
  children: t
5478
5505
  }) : /* @__PURE__ */ L("a", {
5479
5506
  href: n,
@@ -5481,21 +5508,21 @@ var ra = (e) => {
5481
5508
  rel: "noopener noreferrer",
5482
5509
  title: t,
5483
5510
  className: "mono",
5484
- style: sa,
5511
+ style: ca,
5485
5512
  children: [t, /* @__PURE__ */ I(G.external, { size: 11 })]
5486
5513
  });
5487
- }, da = 400, fa = 2e3;
5488
- function pa(e) {
5489
- return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) : da, fa));
5514
+ }, fa = 400, pa = 2e3;
5515
+ function ma(e) {
5516
+ return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) : fa, pa));
5490
5517
  }
5491
- function ma(e, t) {
5518
+ function ha(e, t) {
5492
5519
  return e.length <= t ? e : `${e.slice(0, t)}...`;
5493
5520
  }
5494
- function ha(e, t, n, r = 0) {
5521
+ function ga(e, t, n, r = 0) {
5495
5522
  if (e == null || e === "") return "";
5496
- if (typeof e == "string") return ma(e, t);
5523
+ if (typeof e == "string") return ha(e, t);
5497
5524
  if (typeof e == "number" || typeof e == "boolean") return String(e);
5498
- if (typeof e != "object") return ma(String(e), t);
5525
+ if (typeof e != "object") return ha(String(e), t);
5499
5526
  if (n.has(e)) return "[Circular]";
5500
5527
  if (r >= 3) return Array.isArray(e) ? "[...]" : "{...}";
5501
5528
  n.add(e);
@@ -5506,30 +5533,30 @@ function ha(e, t, n, r = 0) {
5506
5533
  a.push(a.length > 1 ? ",..." : "...");
5507
5534
  break;
5508
5535
  }
5509
- let f = ha(c, d, n, r + 1);
5536
+ let f = ga(c, d, n, r + 1);
5510
5537
  if (a.push(u, f), a.join("").length >= t) {
5511
5538
  a.push(",...");
5512
5539
  break;
5513
5540
  }
5514
5541
  }
5515
- return a.push(i), n.delete(e), ma(a.join(""), t);
5542
+ return a.push(i), n.delete(e), ha(a.join(""), t);
5516
5543
  }
5517
- function ga(e, t) {
5518
- return ha(e, t, /* @__PURE__ */ new WeakSet());
5544
+ function _a(e, t) {
5545
+ return ga(e, t, /* @__PURE__ */ new WeakSet());
5519
5546
  }
5520
- var _a = (e) => {
5521
- let t = e.surface ?? "detail", n = pa(e.field.display?.list_preview?.max_chars);
5547
+ var va = (e) => {
5548
+ let t = e.surface ?? "detail", n = ma(e.field.display?.list_preview?.max_chars);
5522
5549
  return (r) => {
5523
5550
  if (r == null || r === "") return "-";
5524
5551
  if (t === "list") {
5525
- let e = ga(r, n);
5552
+ let e = _a(r, n);
5526
5553
  return /* @__PURE__ */ I("span", {
5527
5554
  className: "font-mono text-xs text-muted-foreground",
5528
5555
  title: e,
5529
5556
  children: e
5530
5557
  });
5531
5558
  }
5532
- return /* @__PURE__ */ I(Pn, {
5559
+ return /* @__PURE__ */ I(Fn, {
5533
5560
  field: e.field,
5534
5561
  fieldName: e.fieldName,
5535
5562
  value: r,
@@ -5537,7 +5564,7 @@ var _a = (e) => {
5537
5564
  locale: e.locale
5538
5565
  });
5539
5566
  };
5540
- }, va = [
5567
+ }, ya = [
5541
5568
  {
5542
5569
  pattern: /```[^\n]*\n?([\s\S]*?)```/g,
5543
5570
  replacement: "$1"
@@ -5600,13 +5627,13 @@ var _a = (e) => {
5600
5627
  replacement: ""
5601
5628
  }
5602
5629
  ];
5603
- function ya(e) {
5630
+ function ba(e) {
5604
5631
  if (!e) return {
5605
5632
  text: "",
5606
5633
  isPlain: !0
5607
5634
  };
5608
5635
  let t = e, n = !1;
5609
- for (let e of va) {
5636
+ for (let e of ya) {
5610
5637
  let r = t.replace(e.pattern, e.replacement);
5611
5638
  r !== t && e.structural !== !1 && (n = !0), t = r;
5612
5639
  }
@@ -5617,134 +5644,134 @@ function ya(e) {
5617
5644
  }
5618
5645
  //#endregion
5619
5646
  //#region src/components/fields/cells/factories/markdown.tsx
5620
- var ba = {
5647
+ var xa = {
5621
5648
  fontSize: 12.5,
5622
5649
  color: "var(--text-4)"
5623
5650
  };
5624
- function xa(e) {
5651
+ function Sa(e) {
5625
5652
  return /* @__PURE__ */ I(Gt, { content: e });
5626
5653
  }
5627
- var Sa = (e) => {
5654
+ var Ca = (e) => {
5628
5655
  let t = e.surface === "list";
5629
5656
  return (e) => {
5630
5657
  let n = e == null ? "" : String(e);
5631
5658
  if (!n) return /* @__PURE__ */ I("span", {
5632
- style: ba,
5659
+ style: xa,
5633
5660
  children: "—"
5634
5661
  });
5635
- if (!t) return xa(n);
5636
- let { text: r, isPlain: i } = ya(n);
5662
+ if (!t) return Sa(n);
5663
+ let { text: r, isPlain: i } = ba(n);
5637
5664
  return i ? /* @__PURE__ */ I("span", {
5638
5665
  title: r,
5639
5666
  children: r
5640
5667
  }) : /* @__PURE__ */ I(de, {
5641
- content: xa(n),
5668
+ content: Sa(n),
5642
5669
  children: /* @__PURE__ */ I("span", {
5643
5670
  title: r,
5644
5671
  children: r
5645
5672
  })
5646
5673
  });
5647
5674
  };
5648
- }, Ca = "[SET]", wa = {
5675
+ }, wa = "[SET]", Ta = {
5649
5676
  fontSize: 12.5,
5650
5677
  color: "var(--text-3)"
5651
- }, Ta = {
5678
+ }, Ea = {
5652
5679
  fontSize: 12.5,
5653
5680
  color: "var(--text-4)",
5654
5681
  fontStyle: "italic"
5655
- }, Ea = () => (e) => e === Ca || typeof e == "string" && e !== "" ? /* @__PURE__ */ I("span", {
5682
+ }, Da = () => (e) => e === wa || typeof e == "string" && e !== "" ? /* @__PURE__ */ I("span", {
5656
5683
  className: "mono",
5657
- style: wa,
5658
- children: Ca
5659
- }) : /* @__PURE__ */ I("span", {
5660
5684
  style: Ta,
5685
+ children: wa
5686
+ }) : /* @__PURE__ */ I("span", {
5687
+ style: Ea,
5661
5688
  children: "Not set"
5662
- }), Da = {
5689
+ }), Oa = {
5663
5690
  fontSize: 12.5,
5664
5691
  color: "var(--text-4)"
5665
5692
  };
5666
- function Oa(e, t) {
5693
+ function ka(e, t) {
5667
5694
  return /* @__PURE__ */ I(Gt, {
5668
5695
  content: e,
5669
5696
  files: t
5670
5697
  });
5671
5698
  }
5672
- var ka = (e) => {
5699
+ var Aa = (e) => {
5673
5700
  let { fieldName: t } = e, n = e.surface === "list";
5674
5701
  return (e, r) => {
5675
5702
  let i = r?.$files?.[t], a = w(e, i);
5676
5703
  if (!a.markdown) return /* @__PURE__ */ I("span", {
5677
- style: Da,
5704
+ style: Oa,
5678
5705
  children: "-"
5679
5706
  });
5680
- if (!n) return Oa(a.markdown, a.files);
5681
- let { text: o, isPlain: s } = ya(a.markdown);
5707
+ if (!n) return ka(a.markdown, a.files);
5708
+ let { text: o, isPlain: s } = ba(a.markdown);
5682
5709
  return s ? /* @__PURE__ */ I("span", {
5683
5710
  title: o,
5684
5711
  children: o
5685
5712
  }) : /* @__PURE__ */ I(de, {
5686
- content: Oa(a.markdown, a.files),
5713
+ content: ka(a.markdown, a.files),
5687
5714
  children: /* @__PURE__ */ I("span", {
5688
5715
  title: o,
5689
5716
  children: o
5690
5717
  })
5691
5718
  });
5692
5719
  };
5693
- }, Aa = { fontSize: 12.5 }, ja = {
5720
+ }, ja = { fontSize: 12.5 }, Ma = {
5694
5721
  fontSize: 12.5,
5695
5722
  whiteSpace: "pre-wrap",
5696
5723
  margin: 0
5697
5724
  };
5698
- function Ma(e) {
5725
+ function Na(e) {
5699
5726
  return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
5700
5727
  }
5701
- function Na(e, t) {
5728
+ function Pa(e, t) {
5702
5729
  if (t && typeof e[t] == "string" && e[t] !== "") return [t, e[t]];
5703
5730
  for (let [t, n] of Object.entries(e)) if (typeof n == "string" && n !== "") return [t, n];
5704
5731
  return null;
5705
5732
  }
5706
5733
  //#endregion
5707
5734
  //#region src/components/fields/cells/registry.ts
5708
- var Pa = {
5709
- text: Xr,
5710
- bool_pill: Zr,
5711
- badge: ni,
5712
- status_pill: ai,
5713
- tag_list: ci,
5714
- time_ago: li,
5715
- timestamp_full: ui,
5716
- next_run: pi,
5717
- money: mi,
5718
- ref_link: gi,
5719
- url: Ui,
5720
- email: Ki,
5721
- phone: Zi,
5722
- number: ra,
5723
- code: oa,
5724
- link: ua,
5725
- json: _a,
5726
- markdown: Sa,
5727
- password_mask: Ea,
5728
- rich_text_preview: ka,
5735
+ var Fa = {
5736
+ text: Zr,
5737
+ bool_pill: Qr,
5738
+ badge: ri,
5739
+ status_pill: oi,
5740
+ tag_list: li,
5741
+ time_ago: ui,
5742
+ timestamp_full: di,
5743
+ next_run: mi,
5744
+ money: hi,
5745
+ ref_link: _i,
5746
+ url: Wi,
5747
+ email: qi,
5748
+ phone: Qi,
5749
+ number: ia,
5750
+ code: sa,
5751
+ link: da,
5752
+ json: va,
5753
+ markdown: Ca,
5754
+ password_mask: Da,
5755
+ rich_text_preview: Aa,
5729
5756
  multilang_inline: (e) => {
5730
5757
  let { field: t, locale: n } = e, r = t.type === "multilang_text";
5731
5758
  return (e) => {
5732
- let t = Na(Ma(e), n);
5759
+ let t = Pa(Na(e), n);
5733
5760
  if (!t) return r ? /* @__PURE__ */ I("p", {
5734
- style: ja,
5761
+ style: Ma,
5735
5762
  children: "—"
5736
5763
  }) : /* @__PURE__ */ I("span", {
5737
- style: Aa,
5764
+ style: ja,
5738
5765
  children: "—"
5739
5766
  });
5740
5767
  let [i, a] = t;
5741
5768
  return r ? /* @__PURE__ */ I("p", {
5742
- style: ja,
5769
+ style: Ma,
5743
5770
  lang: i,
5744
5771
  dir: "auto",
5745
5772
  children: a
5746
5773
  }) : /* @__PURE__ */ I("span", {
5747
- style: Aa,
5774
+ style: ja,
5748
5775
  lang: i,
5749
5776
  dir: "auto",
5750
5777
  children: a
@@ -5752,18 +5779,18 @@ var Pa = {
5752
5779
  };
5753
5780
  }
5754
5781
  };
5755
- Object.keys(Pa).sort();
5756
- function Fa(e) {
5757
- let t = e.field.display?.widget ?? "text", n = Pa[t];
5782
+ Object.keys(Fa).sort();
5783
+ function Ia(e) {
5784
+ let t = e.field.display?.widget ?? "text", n = Fa[t];
5758
5785
  if (!n) throw Error(`resolveCellRenderer: no factory registered for widget "${t}" (field "${e.fieldName}"). The engine must stamp a smart default at YAML-load time; an unknown widget here indicates an out-of-sync allow-list.`);
5759
5786
  return n(e);
5760
5787
  }
5761
5788
  //#endregion
5762
5789
  //#region src/components/fields/index.tsx
5763
- var Ia = {
5790
+ var La = {
5764
5791
  string: ln,
5765
5792
  text: un,
5766
- rich_text: qr,
5793
+ rich_text: Jr,
5767
5794
  int: On,
5768
5795
  float: On,
5769
5796
  decimal: On,
@@ -5777,28 +5804,28 @@ var Ia = {
5777
5804
  phone: hn,
5778
5805
  uuid: ln,
5779
5806
  bytes: ln,
5780
- ref: jn,
5781
- json: Pn,
5807
+ ref: Mn,
5808
+ json: Fn,
5782
5809
  tags: ln,
5783
- string_array: qn,
5784
- int_array: Yn,
5785
- uuid_array: qn,
5786
- multilang: In,
5787
- multilang_text: Rn,
5788
- structure: zn,
5789
- secret: Un,
5790
- password: Gn
5810
+ string_array: Jn,
5811
+ int_array: Xn,
5812
+ uuid_array: Jn,
5813
+ multilang: Ln,
5814
+ multilang_text: zn,
5815
+ structure: Bn,
5816
+ secret: Wn,
5817
+ password: Kn
5791
5818
  };
5792
- for (let e of sn) if (!Ia[e]) throw Error(`editRegistry: missing entry for FieldType "${e}". The TS union (types/fieldType.ts) and editRegistry must stay in sync with golang/internal/engine/types.go.`);
5793
- function La(e) {
5794
- if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ I(zn, { ...e });
5819
+ for (let e of sn) if (!La[e]) throw Error(`editRegistry: missing entry for FieldType "${e}". The TS union (types/fieldType.ts) and editRegistry must stay in sync with golang/internal/engine/types.go.`);
5820
+ function Ra(e) {
5821
+ if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ I(Bn, { ...e });
5795
5822
  if (e.mode === "edit") {
5796
- let t = Ia[e.field.type];
5823
+ let t = La[e.field.type];
5797
5824
  if (!t) throw Error(`renderField: no edit-mode renderer for FieldType "${e.field.type}" (field "${e.fieldName}"). editRegistry must be total over FieldType; check types/fieldType.ts and components/fields/index.tsx.`);
5798
5825
  return /* @__PURE__ */ I(t, { ...e });
5799
5826
  }
5800
5827
  if (!e.field.display?.widget) throw Error(`renderField: display mode requires a non-empty field.display.widget (field "${e.fieldName}", type "${e.field.type}"). The engine must stamp a smart default; an empty widget here means the field bypassed ResolveDefaultWidgets.`);
5801
- return Fa({
5828
+ return Ia({
5802
5829
  field: e.field,
5803
5830
  fieldName: e.fieldName,
5804
5831
  surface: e.surface ?? "detail",
@@ -5812,19 +5839,19 @@ function La(e) {
5812
5839
  }
5813
5840
  //#endregion
5814
5841
  //#region src/hooks/useUserLocale.ts
5815
- var Ra = "en";
5816
- function za() {
5842
+ var za = "en";
5843
+ function Ba() {
5817
5844
  if (typeof navigator > "u") return;
5818
5845
  let e = navigator.language;
5819
5846
  if (e) return e.split("-")[0] || void 0;
5820
5847
  }
5821
- function Ba() {
5848
+ function Va() {
5822
5849
  let e = bt((e) => e.user), { data: t } = xt(), n = e?.language;
5823
5850
  if (n && n.trim()) return n;
5824
5851
  let r = t?.languages?.[0]?.code;
5825
- return r && r.trim() ? r : za() || Ra;
5852
+ return r && r.trim() ? r : Ba() || za;
5826
5853
  }
5827
5854
  //#endregion
5828
- export { Ie as $, Jt as A, ye as At, bt as B, Y as Bt, cn as C, Me as Ct, Zt as D, Q as Dt, Yt as E, Ce as Et, Gt as F, fe as Ft, gt as G, G as Gt, st as H, J as Ht, Vt as I, Z as It, dt as J, _t as K, ne as Kt, Ht as L, de as Lt, on as M, _e as Mt, $t as N, ge as Nt, an as O, Ne as Ot, Xt as P, he as Pt, ft as Q, Bt as R, ae as Rt, gn as S, Pe as St, rn as T, Ae as Tt, ut as U, q as Ut, yt as V, re as Vt, vt as W, K as Wt, lt as X, ct as Y, ht as Z, $n as _, Fe as _t, Gr as a, He as at, kn as b, je as bt, Ir as c, tt as ct, hr as d, Xe as dt, Qe as et, mr as f, Ye as ft, Qn as g, Ve as gt, nr as h, Ze as ht, Wr as i, Ke as it, qt as j, ve as jt, en as k, be as kt, Fr as l, $ as lt, rr as m, Ue as mt, La as n, et as nt, jr as o, Le as ot, pr as p, Je as pt, mt as q, Fa as r, We as rt, Nr as s, Ge as st, Ba as t, $e as tt, Pr as u, qe as ut, Zn as v, Te as vt, tn as w, we as wt, _n as x, ke as xt, An as y, xe as yt, xt as z, ie as zt };
5855
+ export { ft as $, en as A, be as At, xt as B, ie as Bt, gn as C, Pe as Ct, Yt as D, Ce as Dt, rn as E, Ae as Et, Xt as F, he as Ft, vt as G, K as Gt, yt as H, re as Ht, Gt as I, fe as It, mt as J, gt as K, G as Kt, Vt as L, Z as Lt, qt as M, ve as Mt, on as N, _e as Nt, Zt as O, Q as Ot, $t as P, ge as Pt, ht as Q, Ht as R, de as Rt, _n as S, ke as St, tn as T, we as Tt, st as U, J as Ut, bt as V, Y as Vt, ut as W, q as Wt, ct as X, dt as Y, lt as Z, er as _, Ve as _t, Kr as a, Ke as at, An as b, xe as bt, Lr as c, Ge as ct, gr as d, qe as dt, Ie as et, hr as f, Xe as ft, $n as g, Ze as gt, rr as h, Ue as ht, Gr as i, We as it, Jt as j, ye as jt, an as k, Ne as kt, Ir as l, tt as lt, ir as m, Je as mt, Ra as n, $e as nt, Mr as o, He as ot, mr as p, Ye as pt, _t as q, ne as qt, Ia as r, et as rt, Pr as s, Le as st, Va as t, Qe as tt, Fr as u, $ as ut, Qn as v, Fe as vt, cn as w, Me as wt, kn as x, je as xt, jn as y, Te as yt, Bt as z, ae as zt };
5829
5856
 
5830
- //# sourceMappingURL=useUserLocale-CSS6fwi8.js.map
5857
+ //# sourceMappingURL=useUserLocale-B3bnZHMZ.js.map