@declarion/react 0.40.3 → 0.41.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.
@@ -1,6 +1,6 @@
1
1
  import { c as e, s as t, t as n } from "./DynamicIcon-DeRpAaXm.js";
2
2
  import { Suspense as r, createContext as i, forwardRef as a, lazy as o, useCallback as s, useContext as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
3
- import { useLocation as m, useNavigate as h } from "react-router-dom";
3
+ import { useLocation as m, useNavigate as h } from "react-router";
4
4
  import { useQuery as g, useQueryClient as _ } from "@tanstack/react-query";
5
5
  import { toast as v } from "sonner";
6
6
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
@@ -2926,7 +2926,7 @@ var Z = {
2926
2926
  update: Kr,
2927
2927
  dismiss: (e) => v.dismiss(e),
2928
2928
  dismissAll: () => v.dismiss()
2929
- }, qr = o(() => import("./MarkdownRenderer-DeguFsZL.js").then((e) => ({ default: e.MarkdownRenderer })));
2929
+ }, qr = o(() => import("./MarkdownRenderer-BvWJ8pzN.js").then((e) => ({ default: e.MarkdownRenderer })));
2930
2930
  function Jr() {
2931
2931
  return /* @__PURE__ */ b("div", { className: "h-4 w-2/3 rounded bg-muted animate-pulse" });
2932
2932
  }
@@ -3863,7 +3863,7 @@ function Gi({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3863
3863
  value: r,
3864
3864
  mode: "display",
3865
3865
  locale: i
3866
- }) : fs({
3866
+ }) : ms({
3867
3867
  field: n,
3868
3868
  fieldName: t,
3869
3869
  value: r,
@@ -3908,7 +3908,7 @@ function Gi({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
3908
3908
  mode: "edit",
3909
3909
  onChange: l(t),
3910
3910
  locale: i
3911
- }) : fs({
3911
+ }) : ms({
3912
3912
  field: n,
3913
3913
  fieldName: t,
3914
3914
  value: o[t],
@@ -4051,9 +4051,92 @@ function Xi({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
4051
4051
  function Zi(e) {
4052
4052
  return Array.isArray(e) ? e.filter((e) => e != null).map(String) : [];
4053
4053
  }
4054
- function Qi({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o }) {
4055
- let s = Zi(r), [c, l] = p("");
4056
- if (i === "display") return s.length === 0 ? /* @__PURE__ */ b("span", {
4054
+ function Qi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
4055
+ let o = Zi(n), s = e.values ?? [];
4056
+ return s.length > 0 ? /* @__PURE__ */ b($i, {
4057
+ values: s,
4058
+ selected: o,
4059
+ mode: r,
4060
+ required: e.required,
4061
+ onChange: i
4062
+ }) : /* @__PURE__ */ b(ea, {
4063
+ items: o,
4064
+ fieldName: t,
4065
+ required: e.required,
4066
+ mode: r,
4067
+ onChange: i,
4068
+ fieldId: a
4069
+ });
4070
+ }
4071
+ function $i({ values: e, selected: n, mode: r, required: i, onChange: a }) {
4072
+ let o = new Set(n), s = (t) => {
4073
+ let n = e.find((e) => e.code === t);
4074
+ return n && L(n.name) || t;
4075
+ }, c = n.filter((t) => !e.some((e) => e.code === t));
4076
+ if (r === "display") return n.length === 0 ? /* @__PURE__ */ b("span", {
4077
+ style: {
4078
+ fontSize: 12.5,
4079
+ color: "var(--text-4)"
4080
+ },
4081
+ children: "—"
4082
+ }) : /* @__PURE__ */ x("div", {
4083
+ style: {
4084
+ display: "flex",
4085
+ flexWrap: "wrap",
4086
+ gap: 4
4087
+ },
4088
+ children: [e.filter((e) => o.has(e.code)).map((e) => /* @__PURE__ */ b(N, {
4089
+ tone: "slate",
4090
+ children: L(e.name) || e.code
4091
+ }, e.code)), c.map((e) => /* @__PURE__ */ b(N, {
4092
+ tone: "slate",
4093
+ children: s(e)
4094
+ }, e))]
4095
+ });
4096
+ let l = (e) => {
4097
+ o.has(e) ? a?.(n.filter((t) => t !== e)) : a?.([...n, e]);
4098
+ }, u = (e) => ({
4099
+ display: "inline-flex",
4100
+ alignItems: "center",
4101
+ gap: 4,
4102
+ padding: "3px 10px",
4103
+ borderRadius: 999,
4104
+ fontSize: 12.5,
4105
+ cursor: "pointer",
4106
+ border: e ? "1px solid var(--text-3)" : "1px solid var(--border)",
4107
+ background: e ? "var(--surface-2)" : "transparent",
4108
+ color: e ? "var(--text)" : "var(--text-4)",
4109
+ fontWeight: e ? 600 : 400
4110
+ });
4111
+ return /* @__PURE__ */ x("div", {
4112
+ role: "group",
4113
+ "aria-required": i || void 0,
4114
+ style: {
4115
+ display: "flex",
4116
+ flexWrap: "wrap",
4117
+ gap: 6
4118
+ },
4119
+ children: [e.map((e) => {
4120
+ let n = o.has(e.code);
4121
+ return /* @__PURE__ */ x("button", {
4122
+ type: "button",
4123
+ "aria-pressed": n,
4124
+ onClick: () => l(e.code),
4125
+ style: u(n),
4126
+ children: [n && /* @__PURE__ */ b(t.check, { size: 12 }), s(e.code)]
4127
+ }, e.code);
4128
+ }), c.map((e) => /* @__PURE__ */ x("button", {
4129
+ type: "button",
4130
+ "aria-pressed": !0,
4131
+ onClick: () => l(e),
4132
+ style: u(!0),
4133
+ children: [/* @__PURE__ */ b(t.check, { size: 12 }), s(e)]
4134
+ }, e))]
4135
+ });
4136
+ }
4137
+ function ea({ items: e, fieldName: n, required: r, mode: i, onChange: a, fieldId: o }) {
4138
+ let [s, c] = p("");
4139
+ if (i === "display") return e.length === 0 ? /* @__PURE__ */ b("span", {
4057
4140
  style: {
4058
4141
  fontSize: 12.5,
4059
4142
  color: "var(--text-4)"
@@ -4065,16 +4148,16 @@ function Qi({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
4065
4148
  flexWrap: "wrap",
4066
4149
  gap: 4
4067
4150
  },
4068
- children: s.map((e, t) => /* @__PURE__ */ b(N, {
4151
+ children: e.map((e, t) => /* @__PURE__ */ b(N, {
4069
4152
  tone: "slate",
4070
4153
  children: e
4071
4154
  }, t))
4072
4155
  });
4073
- let u = () => {
4074
- let e = c.trim();
4075
- e && (a?.([...s, e]), l(""));
4076
- }, d = (e) => {
4077
- a?.(s.filter((t, n) => n !== e));
4156
+ let l = () => {
4157
+ let t = s.trim();
4158
+ t && (a?.([...e, t]), c(""));
4159
+ }, u = (t) => {
4160
+ a?.(e.filter((e, n) => n !== t));
4078
4161
  };
4079
4162
  return /* @__PURE__ */ x("div", {
4080
4163
  style: {
@@ -4082,15 +4165,15 @@ function Qi({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
4082
4165
  flexDirection: "column",
4083
4166
  gap: 6
4084
4167
  },
4085
- children: [s.length > 0 && /* @__PURE__ */ b("div", {
4168
+ children: [e.length > 0 && /* @__PURE__ */ b("div", {
4086
4169
  style: {
4087
4170
  display: "flex",
4088
4171
  flexWrap: "wrap",
4089
4172
  gap: 4
4090
4173
  },
4091
- children: s.map((e, t) => /* @__PURE__ */ b(N, {
4174
+ children: e.map((e, t) => /* @__PURE__ */ b(N, {
4092
4175
  tone: "slate",
4093
- onRemove: () => d(t),
4176
+ onRemove: () => u(t),
4094
4177
  children: e
4095
4178
  }, t))
4096
4179
  }), /* @__PURE__ */ x("div", {
@@ -4103,17 +4186,17 @@ function Qi({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
4103
4186
  children: /* @__PURE__ */ b(P, {
4104
4187
  id: o,
4105
4188
  name: n,
4106
- "aria-required": e.required || void 0,
4107
- value: c,
4108
- onChange: l,
4189
+ "aria-required": r || void 0,
4190
+ value: s,
4191
+ onChange: c,
4109
4192
  onKeyDown: (e) => {
4110
- e.key === "Enter" && (e.preventDefault(), u());
4193
+ e.key === "Enter" && (e.preventDefault(), l());
4111
4194
  },
4112
4195
  placeholder: "Add item…"
4113
4196
  })
4114
4197
  }), /* @__PURE__ */ b(D, {
4115
4198
  icon: /* @__PURE__ */ b(t.plus, { size: 13 }),
4116
- onClick: u,
4199
+ onClick: l,
4117
4200
  children: "Add"
4118
4201
  })]
4119
4202
  })]
@@ -4121,11 +4204,11 @@ function Qi({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
4121
4204
  }
4122
4205
  //#endregion
4123
4206
  //#region src/components/fields/IntArrayField.tsx
4124
- function $i(e) {
4207
+ function ta(e) {
4125
4208
  return Array.isArray(e) ? e.filter((e) => e != null).map(Number).filter((e) => !isNaN(e)) : [];
4126
4209
  }
4127
- function ea({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o }) {
4128
- let s = $i(r), [c, l] = p("");
4210
+ function na({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o }) {
4211
+ let s = ta(r), [c, l] = p("");
4129
4212
  if (i === "display") return s.length === 0 ? /* @__PURE__ */ b("span", {
4130
4213
  style: {
4131
4214
  fontSize: 12.5,
@@ -4197,47 +4280,47 @@ function ea({ field: e, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
4197
4280
  }
4198
4281
  //#endregion
4199
4282
  //#region src/lib/rich-text.ts
4200
- var ta = /declarion:\/\/file\/([0-9a-fA-F-]{36})/g;
4201
- function na(e) {
4202
- return typeof e == "string" ? e : ua(e) && typeof e.markdown == "string" ? e.markdown : "";
4283
+ var ra = /declarion:\/\/file\/([0-9a-fA-F-]{36})/g;
4284
+ function ia(e) {
4285
+ return typeof e == "string" ? e : fa(e) && typeof e.markdown == "string" ? e.markdown : "";
4203
4286
  }
4204
- function ra(e, t) {
4287
+ function aa(e, t) {
4205
4288
  return {
4206
- markdown: na(e),
4207
- files: oa(t)
4289
+ markdown: ia(e),
4290
+ files: ca(t)
4208
4291
  };
4209
4292
  }
4210
- function ia(e, t) {
4211
- let n = ra(e, null);
4293
+ function oa(e, t) {
4294
+ let n = aa(e, null);
4212
4295
  return n.files[t.id] = t, n;
4213
4296
  }
4214
- function aa(e, t) {
4215
- let n = ra(e, null);
4297
+ function sa(e, t) {
4298
+ let n = aa(e, null);
4216
4299
  for (let e of t) delete n.files[e];
4217
4300
  return n;
4218
4301
  }
4219
- function oa(e) {
4302
+ function ca(e) {
4220
4303
  if (!Array.isArray(e)) return {};
4221
4304
  let t = {};
4222
- for (let n of e) ua(n) && typeof n.id == "string" && (t[n.id] = n);
4305
+ for (let n of e) fa(n) && typeof n.id == "string" && (t[n.id] = n);
4223
4306
  return t;
4224
4307
  }
4225
- function sa(e) {
4308
+ function la(e) {
4226
4309
  let t = /* @__PURE__ */ new Set(), n = [], r;
4227
- for (ta.lastIndex = 0; (r = ta.exec(e)) !== null;) {
4310
+ for (ra.lastIndex = 0; (r = ra.exec(e)) !== null;) {
4228
4311
  let e = r[1];
4229
4312
  t.has(e) || (t.add(e), n.push(e));
4230
4313
  }
4231
4314
  return n;
4232
4315
  }
4233
- function ca(e) {
4316
+ function ua(e) {
4234
4317
  return e ? /^declarion:\/\/file\/([0-9a-fA-F-]{36})$/.exec(e)?.[1] ?? null : null;
4235
4318
  }
4236
- function la(e) {
4319
+ function da(e) {
4237
4320
  let t = `declarion://file/${e.id}`;
4238
4321
  return e.content_type.startsWith("image/") ? `![](${t})` : `[${e.filename || e.id}](${t})`;
4239
4322
  }
4240
- function ua(e) {
4323
+ function fa(e) {
4241
4324
  return typeof e == "object" && !!e;
4242
4325
  }
4243
4326
  //#endregion
@@ -4249,10 +4332,10 @@ var Q = class extends Error {
4249
4332
  super(n), this.code = t, this.status = e;
4250
4333
  }
4251
4334
  };
4252
- async function da(e) {
4335
+ async function pa(e) {
4253
4336
  let t = wt();
4254
4337
  try {
4255
- return await fa(e, t ? await At() : null);
4338
+ return await ma(e, t ? await At() : null);
4256
4339
  } catch (n) {
4257
4340
  if (!(n instanceof Q && n.status === 401 && (n.code === "TOKEN_REFRESH_NEEDED" || n.code === "UNAUTHORIZED"))) throw n;
4258
4341
  let r = null;
@@ -4262,17 +4345,17 @@ async function da(e) {
4262
4345
  throw vn()(), n;
4263
4346
  }
4264
4347
  try {
4265
- return await fa(e, r);
4348
+ return await ma(e, r);
4266
4349
  } catch (e) {
4267
4350
  throw e instanceof Q && e.status === 401 && vn()(), e;
4268
4351
  }
4269
4352
  }
4270
4353
  }
4271
- function fa(e, t) {
4354
+ function ma(e, t) {
4272
4355
  let { file: n, entityCode: r, fieldCode: i, slotCode: a, onProgress: o, signal: s } = e;
4273
4356
  return new Promise((e, c) => {
4274
4357
  let l = new XMLHttpRequest();
4275
- if (l.open("POST", pa(r, i, a)), l.withCredentials = t === null, t && l.setRequestHeader("Authorization", `Bearer ${t}`), l.upload.onprogress = (e) => {
4358
+ if (l.open("POST", ha(r, i, a)), l.withCredentials = t === null, t && l.setRequestHeader("Authorization", `Bearer ${t}`), l.upload.onprogress = (e) => {
4276
4359
  if (!o) return;
4277
4360
  let t = e.lengthComputable ? e.total : n.size, r = t > 0 ? Math.min(100, Math.round(e.loaded / t * 100)) : 0;
4278
4361
  o({
@@ -4286,7 +4369,7 @@ function fa(e, t) {
4286
4369
  n = t ? JSON.parse(t) : null;
4287
4370
  } catch {}
4288
4371
  if (l.status >= 200 && l.status < 300) {
4289
- let t = ma(n);
4372
+ let t = ga(n);
4290
4373
  if (!t || !t.id) {
4291
4374
  c(new Q(l.status, "BAD_RESPONSE", "Upload returned no file id"));
4292
4375
  return;
@@ -4311,56 +4394,56 @@ function fa(e, t) {
4311
4394
  u.append("file", n, n.name), l.send(u);
4312
4395
  });
4313
4396
  }
4314
- function pa(e, t, n) {
4397
+ function ha(e, t, n) {
4315
4398
  let r = new URLSearchParams();
4316
4399
  e && t && (r.set("entity_code", e), r.set("field_code", t), n && r.set("slot_code", n));
4317
4400
  let i = r.toString();
4318
4401
  return i ? `/api/files/upload?${i}` : "/api/files/upload";
4319
4402
  }
4320
- function ma(e) {
4321
- return ga(e) ? ga(e.result) ? ma(e.result) : ga(e.file) ? ha(e.file) : typeof e.id == "string" ? e : null : null;
4403
+ function ga(e) {
4404
+ return va(e) ? va(e.result) ? ga(e.result) : va(e.file) ? _a(e.file) : typeof e.id == "string" ? e : null : null;
4322
4405
  }
4323
- function ha(e) {
4324
- let t = _a(e.file_id);
4406
+ function _a(e) {
4407
+ let t = ya(e.file_id);
4325
4408
  return t ? {
4326
4409
  id: t,
4327
- filename: _a(e.filename_original) ?? _a(e.filename_normalized) ?? t,
4328
- content_type: _a(e.content_type) ?? "application/octet-stream",
4329
- size_bytes: va(e.size_bytes) ?? 0,
4330
- sha256: _a(e.sha256) ?? "",
4331
- dedup: ya(e.dedup)
4410
+ filename: ya(e.filename_original) ?? ya(e.filename_normalized) ?? t,
4411
+ content_type: ya(e.content_type) ?? "application/octet-stream",
4412
+ size_bytes: ba(e.size_bytes) ?? 0,
4413
+ sha256: ya(e.sha256) ?? "",
4414
+ dedup: xa(e.dedup)
4332
4415
  } : null;
4333
4416
  }
4334
- function ga(e) {
4417
+ function va(e) {
4335
4418
  return typeof e == "object" && !!e;
4336
4419
  }
4337
- function _a(e) {
4420
+ function ya(e) {
4338
4421
  return typeof e == "string" ? e : void 0;
4339
4422
  }
4340
- function va(e) {
4423
+ function ba(e) {
4341
4424
  return typeof e == "number" ? e : void 0;
4342
4425
  }
4343
- function ya(e) {
4426
+ function xa(e) {
4344
4427
  return typeof e == "boolean" ? e : void 0;
4345
4428
  }
4346
- async function ba(e) {
4429
+ async function Sa(e) {
4347
4430
  await J("files.discard", { file_id: e });
4348
4431
  }
4349
- function xa(e, t, n) {
4432
+ function Ca(e, t, n) {
4350
4433
  if (n && e.size > n) return {
4351
4434
  code: "FILE_TOO_LARGE",
4352
- message: `File is ${Ca(e.size)}, max ${Ca(n)}`
4435
+ message: `File is ${Ta(e.size)}, max ${Ta(n)}`
4353
4436
  };
4354
4437
  if (t && t.length > 0) {
4355
4438
  let n = e.type || "application/octet-stream";
4356
- if (!t.some((e) => Sa(e, n))) return {
4439
+ if (!t.some((e) => wa(e, n))) return {
4357
4440
  code: "MIME_NOT_ACCEPTED",
4358
4441
  message: `File type ${n} is not accepted`
4359
4442
  };
4360
4443
  }
4361
4444
  return null;
4362
4445
  }
4363
- function Sa(e, t) {
4446
+ function wa(e, t) {
4364
4447
  if (e === "*/*" || e === "*") return !0;
4365
4448
  if (e.endsWith("/*")) {
4366
4449
  let n = e.slice(0, e.length - 1);
@@ -4368,7 +4451,7 @@ function Sa(e, t) {
4368
4451
  }
4369
4452
  return e === t;
4370
4453
  }
4371
- function Ca(e) {
4454
+ function Ta(e) {
4372
4455
  if (e < 1024) return `${e} B`;
4373
4456
  let t = [
4374
4457
  "KB",
@@ -4380,7 +4463,7 @@ function Ca(e) {
4380
4463
  }
4381
4464
  //#endregion
4382
4465
  //#region src/components/file-widgets/draft-scope.tsx
4383
- var wa = i({
4466
+ var Ea = i({
4384
4467
  registerDraft() {},
4385
4468
  unregisterDraft() {},
4386
4469
  hasDraft() {
@@ -4389,7 +4472,7 @@ var wa = i({
4389
4472
  flushAllDrafts: async () => {},
4390
4473
  markCommitted() {}
4391
4474
  });
4392
- function Ta({ children: e }) {
4475
+ function Da({ children: e }) {
4393
4476
  let t = f(/* @__PURE__ */ new Map()), n = d(() => ({
4394
4477
  registerDraft(e) {
4395
4478
  t.current.set(e.fileId, e);
@@ -4408,16 +4491,16 @@ function Ta({ children: e }) {
4408
4491
  t.current.clear(), await Promise.allSettled(e.map((e) => Promise.resolve(e.discard())));
4409
4492
  }
4410
4493
  }), []);
4411
- return /* @__PURE__ */ b(wa.Provider, {
4494
+ return /* @__PURE__ */ b(Ea.Provider, {
4412
4495
  value: n,
4413
4496
  children: e
4414
4497
  });
4415
4498
  }
4416
- function Ea() {
4417
- return c(wa);
4499
+ function Oa() {
4500
+ return c(Ea);
4418
4501
  }
4419
- function Da() {
4420
- let e = Ea();
4502
+ function ka() {
4503
+ let e = Oa();
4421
4504
  return {
4422
4505
  register: s((t, n) => {
4423
4506
  e.registerDraft({
@@ -4436,17 +4519,17 @@ function Da() {
4436
4519
  }
4437
4520
  //#endregion
4438
4521
  //#region src/components/fields/RichTextField.tsx
4439
- function Oa(e) {
4440
- let { field: n, entityCode: r, fieldName: i, value: a, mode: o, onChange: s, record: c, compact: l, fieldId: u } = e, m = f(null), h = f(null), g = f(/* @__PURE__ */ new Map()), _ = f(/* @__PURE__ */ new Set()), [v, y] = p(0), [S, C] = p(null), { register: w, unregister: T } = Da(), E = c?.$files?.[i], O = d(() => ra(a, E), [E, a]), k = O.markdown, A = n.files?.accepts, j = n.files?.max_size_bytes, M = (e, t = O.files) => {
4441
- let n = new Set(sa(e)), r = [];
4522
+ function Aa(e) {
4523
+ let { field: n, entityCode: r, fieldName: i, value: a, mode: o, onChange: s, record: c, compact: l, fieldId: u } = e, m = f(null), h = f(null), g = f(/* @__PURE__ */ new Map()), _ = f(/* @__PURE__ */ new Set()), [v, y] = p(0), [S, C] = p(null), { register: w, unregister: T } = ka(), E = c?.$files?.[i], O = d(() => aa(a, E), [E, a]), k = O.markdown, A = n.files?.accepts, j = n.files?.max_size_bytes, M = (e, t = O.files) => {
4524
+ let n = new Set(la(e)), r = [];
4442
4525
  for (let e of _.current) n.has(e) || r.push(e);
4443
4526
  if (r.length > 0) {
4444
4527
  for (let e of r) {
4445
- _.current.delete(e), T(e), ba(e).catch(() => {});
4528
+ _.current.delete(e), T(e), Sa(e).catch(() => {});
4446
4529
  let t = g.current.get(e);
4447
4530
  t && (URL.revokeObjectURL(t), g.current.delete(e));
4448
4531
  }
4449
- s?.(aa({
4532
+ s?.(sa({
4450
4533
  markdown: e,
4451
4534
  files: t
4452
4535
  }, r));
@@ -4457,7 +4540,7 @@ function Oa(e) {
4457
4540
  files: t
4458
4541
  });
4459
4542
  }, ee = (e, t, n) => {
4460
- let r = m.current, i = r?.selectionStart ?? e.markdown.length, a = r?.selectionEnd ?? e.markdown.length, o = `${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, s = n ? ia(e, n).files : e.files;
4543
+ let r = m.current, i = r?.selectionStart ?? e.markdown.length, a = r?.selectionEnd ?? e.markdown.length, o = `${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, s = n ? oa(e, n).files : e.files;
4461
4544
  M(o, s), requestAnimationFrame(() => {
4462
4545
  if (!r) return;
4463
4546
  let e = i + t.length;
@@ -4473,28 +4556,28 @@ function Oa(e) {
4473
4556
  files: O.files
4474
4557
  };
4475
4558
  for (let e of t) {
4476
- let n = xa(e, A, j);
4559
+ let n = Ca(e, A, j);
4477
4560
  if (n) {
4478
4561
  C(n.message), y((e) => e - 1);
4479
4562
  continue;
4480
4563
  }
4481
4564
  try {
4482
- let n = await da({
4565
+ let n = await pa({
4483
4566
  file: e,
4484
4567
  entityCode: r,
4485
4568
  fieldCode: i
4486
4569
  }), o = e.type.startsWith("image/") ? URL.createObjectURL(e) : void 0;
4487
4570
  o && g.current.set(n.id, o);
4488
- let s = Aa(n, o);
4489
- if (w(n.id, () => ba(n.id)), _.current.add(n.id), t.length === 1) {
4490
- let e = ka(a.markdown, la(s));
4491
- ee(a, e, s), a = ia({
4571
+ let s = Ma(n, o);
4572
+ if (w(n.id, () => Sa(n.id)), _.current.add(n.id), t.length === 1) {
4573
+ let e = ja(a.markdown, da(s));
4574
+ ee(a, e, s), a = oa({
4492
4575
  markdown: `${a.markdown}${e}`,
4493
4576
  files: a.files
4494
4577
  }, s);
4495
4578
  } else {
4496
- let e = ka(a.markdown, la(s));
4497
- a = ia({
4579
+ let e = ja(a.markdown, da(s));
4580
+ a = oa({
4498
4581
  markdown: `${a.markdown}${e}`,
4499
4582
  files: a.files
4500
4583
  }, s), M(a.markdown, a.files);
@@ -4636,10 +4719,10 @@ function Oa(e) {
4636
4719
  ]
4637
4720
  });
4638
4721
  }
4639
- function ka(e, t) {
4722
+ function ja(e, t) {
4640
4723
  return e ? e.endsWith("\n\n") ? t : e.endsWith("\n") ? `\n${t}` : `\n\n${t}` : `${t}\n`;
4641
4724
  }
4642
- function Aa(e, t) {
4725
+ function Ma(e, t) {
4643
4726
  return {
4644
4727
  id: e.id,
4645
4728
  filename: e.filename,
@@ -4654,8 +4737,8 @@ function Aa(e, t) {
4654
4737
  }
4655
4738
  //#endregion
4656
4739
  //#region src/components/fields/cells/factories/text.ts
4657
- var ja = () => (e) => e == null || e === "" ? "—" : I(e), Ma = (e) => {
4658
- let { field: t, fieldName: n, locale: r = "en" } = e, i = Na(t, n, r);
4740
+ var Na = () => (e) => e == null || e === "" ? "—" : I(e), Pa = (e) => {
4741
+ let { field: t, fieldName: n, locale: r = "en" } = e, i = Fa(t, n, r);
4659
4742
  return (e) => {
4660
4743
  if (e == null) return "—";
4661
4744
  let t = !!e;
@@ -4666,7 +4749,7 @@ var ja = () => (e) => e == null || e === "" ? "—" : I(e), Ma = (e) => {
4666
4749
  });
4667
4750
  };
4668
4751
  };
4669
- function Na(e, t, n) {
4752
+ function Fa(e, t, n) {
4670
4753
  if (e.display?.bool_labels) return {
4671
4754
  trueLabel: L(e.display.bool_labels.true, n) || "Yes",
4672
4755
  falseLabel: L(e.display.bool_labels.false, n) || "No"
@@ -4687,14 +4770,14 @@ function Na(e, t, n) {
4687
4770
  };
4688
4771
  }
4689
4772
  if (t.startsWith("is_")) {
4690
- let e = Pa(t.slice(3));
4773
+ let e = Ia(t.slice(3));
4691
4774
  return {
4692
4775
  trueLabel: e,
4693
4776
  falseLabel: `Not ${e}`
4694
4777
  };
4695
4778
  }
4696
4779
  if (t.startsWith("has_")) {
4697
- let e = Pa(t.slice(4));
4780
+ let e = Ia(t.slice(4));
4698
4781
  return {
4699
4782
  trueLabel: e,
4700
4783
  falseLabel: `No ${e}`
@@ -4705,12 +4788,12 @@ function Na(e, t, n) {
4705
4788
  falseLabel: "No"
4706
4789
  };
4707
4790
  }
4708
- function Pa(e) {
4791
+ function Ia(e) {
4709
4792
  return e.split("_").map((e) => e && e[0].toUpperCase() + e.slice(1)).join(" ");
4710
4793
  }
4711
4794
  //#endregion
4712
4795
  //#region src/components/fields/cells/factories/badge.tsx
4713
- var Fa = /* @__PURE__ */ new Set([
4796
+ var La = /* @__PURE__ */ new Set([
4714
4797
  "indigo",
4715
4798
  "emerald",
4716
4799
  "amber",
@@ -4720,17 +4803,17 @@ var Fa = /* @__PURE__ */ new Set([
4720
4803
  "slate",
4721
4804
  "teal"
4722
4805
  ]);
4723
- function Ia(e) {
4724
- return e && Fa.has(e) ? e : "slate";
4806
+ function Ra(e) {
4807
+ return e && La.has(e) ? e : "slate";
4725
4808
  }
4726
- var La = (e) => {
4809
+ var za = (e) => {
4727
4810
  let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
4728
4811
  if (t.values) for (let e of t.values) r.set(e.code, {
4729
- tone: Ia(e.color),
4812
+ tone: Ra(e.color),
4730
4813
  label: L(e.name, n) || e.code
4731
4814
  });
4732
4815
  if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) {
4733
- let t = r.get(e), a = i.color ? Ia(i.color) : t?.tone ?? "slate", o = (i.label ? L(i.label, n) : "") || t?.label || e;
4816
+ let t = r.get(e), a = i.color ? Ra(i.color) : t?.tone ?? "slate", o = (i.label ? L(i.label, n) : "") || t?.label || e;
4734
4817
  r.set(e, {
4735
4818
  tone: a,
4736
4819
  label: o
@@ -4745,7 +4828,7 @@ var La = (e) => {
4745
4828
  children: n?.label ?? t
4746
4829
  });
4747
4830
  };
4748
- }, Ra = /* @__PURE__ */ new Set([
4831
+ }, Ba = /* @__PURE__ */ new Set([
4749
4832
  "indigo",
4750
4833
  "emerald",
4751
4834
  "amber",
@@ -4755,13 +4838,13 @@ var La = (e) => {
4755
4838
  "slate",
4756
4839
  "teal"
4757
4840
  ]);
4758
- function za(e) {
4759
- return e && Ra.has(e) ? e : "slate";
4841
+ function Va(e) {
4842
+ return e && Ba.has(e) ? e : "slate";
4760
4843
  }
4761
- var Ba = (e) => {
4844
+ var Ha = (e) => {
4762
4845
  let { entity: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
4763
4846
  if (t?.status_groups) for (let e of Object.values(t.status_groups)) for (let t of e.statuses) r.set(t.code, {
4764
- tone: za(t.color),
4847
+ tone: Va(t.color),
4765
4848
  label: L(t.name, n) || t.code
4766
4849
  });
4767
4850
  return (e) => {
@@ -4773,7 +4856,7 @@ var Ba = (e) => {
4773
4856
  children: n?.label ?? t
4774
4857
  });
4775
4858
  };
4776
- }, Va = /* @__PURE__ */ new Set([
4859
+ }, Ua = /* @__PURE__ */ new Set([
4777
4860
  "indigo",
4778
4861
  "emerald",
4779
4862
  "amber",
@@ -4783,14 +4866,14 @@ var Ba = (e) => {
4783
4866
  "slate",
4784
4867
  "teal"
4785
4868
  ]);
4786
- function Ha(e) {
4787
- return e && Va.has(e) ? e : null;
4869
+ function Wa(e) {
4870
+ return e && Ua.has(e) ? e : null;
4788
4871
  }
4789
- var Ua = (e) => {
4872
+ var Ga = (e) => {
4790
4873
  let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
4791
4874
  if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) r.set(e, {
4792
4875
  label: i.label && L(i.label, n) || e,
4793
- tone: Ha(i.color)
4876
+ tone: Wa(i.color)
4794
4877
  });
4795
4878
  return (e) => !Array.isArray(e) || e.length === 0 ? "—" : /* @__PURE__ */ b("span", {
4796
4879
  style: {
@@ -4807,14 +4890,14 @@ var Ua = (e) => {
4807
4890
  }, `${n}-${t}`) : /* @__PURE__ */ b(N, { children: i?.label ?? n }, `${n}-${t}`);
4808
4891
  })
4809
4892
  });
4810
- }, Wa = () => (e) => {
4893
+ }, Ka = () => (e) => {
4811
4894
  if (e == null || e === "") return "—";
4812
4895
  let { text: t, absolute: n } = hi(typeof e == "string" ? e : I(e));
4813
4896
  return /* @__PURE__ */ b("span", {
4814
4897
  title: n,
4815
4898
  children: t
4816
4899
  });
4817
- }, Ga = () => (e) => e == null || e === "" ? "—" : mi(typeof e == "string" ? e : I(e)), Ka = 60 * 1e3, qa = 300 * 1e3, Ja = () => (e) => {
4900
+ }, qa = () => (e) => e == null || e === "" ? "—" : mi(typeof e == "string" ? e : I(e)), Ja = 60 * 1e3, Ya = 300 * 1e3, Xa = () => (e) => {
4818
4901
  if (e == null || e === "") return "—";
4819
4902
  let t = typeof e == "string" ? e : I(e), n = new Date(t);
4820
4903
  if (isNaN(n.getTime())) return t;
@@ -4823,7 +4906,7 @@ var Ua = (e) => {
4823
4906
  title: r,
4824
4907
  children: ["in ", w(n, /* @__PURE__ */ new Date(), { addSuffix: !1 })]
4825
4908
  });
4826
- if (i <= Ka) return /* @__PURE__ */ b("span", {
4909
+ if (i <= Ja) return /* @__PURE__ */ b("span", {
4827
4910
  title: r,
4828
4911
  children: /* @__PURE__ */ b(k, {
4829
4912
  tone: "slate",
@@ -4835,13 +4918,13 @@ var Ua = (e) => {
4835
4918
  return /* @__PURE__ */ b("span", {
4836
4919
  title: r,
4837
4920
  children: /* @__PURE__ */ x(k, {
4838
- tone: i <= qa ? "amber" : "rose",
4921
+ tone: i <= Ya ? "amber" : "rose",
4839
4922
  size: "xs",
4840
4923
  children: ["overdue ", a]
4841
4924
  })
4842
4925
  });
4843
- }, Ya = (e) => {
4844
- let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = t.display?.currency_field, a = Xa(t.display?.currency_display), o = Za(typeof t.scale == "number" ? t.scale : 2, 0, 6), s = /* @__PURE__ */ new Map();
4926
+ }, Za = (e) => {
4927
+ let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = t.display?.currency_field, a = Qa(t.display?.currency_display), o = $a(typeof t.scale == "number" ? t.scale : 2, 0, 6), s = /* @__PURE__ */ new Map();
4845
4928
  return (e, t = {}) => {
4846
4929
  if (e == null || e === "") return "—";
4847
4930
  let c = typeof e == "number" ? e : Number(e);
@@ -4856,7 +4939,7 @@ var Ua = (e) => {
4856
4939
  }), s.set(d, f)), f.format(c);
4857
4940
  };
4858
4941
  };
4859
- function Xa(e) {
4942
+ function Qa(e) {
4860
4943
  switch (e) {
4861
4944
  case "narrow_symbol": return "narrowSymbol";
4862
4945
  case "code":
@@ -4865,16 +4948,16 @@ function Xa(e) {
4865
4948
  default: return "symbol";
4866
4949
  }
4867
4950
  }
4868
- function Za(e, t, n) {
4951
+ function $a(e, t, n) {
4869
4952
  return e < t ? t : e > n ? n : e;
4870
4953
  }
4871
4954
  //#endregion
4872
4955
  //#region src/components/fields/cells/factories/refLink.tsx
4873
- var Qa = (e) => {
4956
+ var eo = (e) => {
4874
4957
  let { field: t, entities: r, screens: i, refs: a, surface: o } = e, s = t.ref?.entity, c = s ? r?.[s] : void 0, l = typeof a == "function" ? a : () => a, u = o === "detail", d = c?.display?.icon, f = t.display?.ref_display_field || "$display", p = c?.detail_screen, m = (p ? i?.[p] : void 0)?.route;
4875
4958
  return (e, t) => {
4876
4959
  if (e == null || e === "") return "—";
4877
- let r = I(e), i = $a(r, s, l(), f), a = m ? m.replace(":id", encodeURIComponent(r)) : void 0;
4960
+ let r = I(e), i = to(r, s, l(), f), a = m ? m.replace(":id", encodeURIComponent(r)) : void 0;
4878
4961
  if (u) {
4879
4962
  let e = /* @__PURE__ */ x(y, { children: [d && /* @__PURE__ */ b("span", {
4880
4963
  style: {
@@ -4916,29 +4999,29 @@ var Qa = (e) => {
4916
4999
  }) : i;
4917
5000
  };
4918
5001
  };
4919
- function $a(e, t, n, r) {
5002
+ function to(e, t, n, r) {
4920
5003
  let i = t && n ? n[t]?.[e] : void 0;
4921
5004
  return i ? R(i, r, e) : e;
4922
5005
  }
4923
5006
  //#endregion
4924
5007
  //#region src/components/fields/cells/factories/url-helpers.ts
4925
- var eo = /^(https?|ftps?|ssh|mailto|tel):/i, to = /^(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;
4926
- function no(e) {
4927
- return /^[a-z]{2,3}$/i.test(e) || to.test(e);
5008
+ var no = /^(https?|ftps?|ssh|mailto|tel):/i, ro = /^(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;
5009
+ function io(e) {
5010
+ return /^[a-z]{2,3}$/i.test(e) || ro.test(e);
4928
5011
  }
4929
- function ro(e) {
5012
+ function ao(e) {
4930
5013
  if (!e.includes(".")) return !1;
4931
5014
  let t = e.split(".");
4932
5015
  if (t.length < 3) return !0;
4933
5016
  let n = t[0].toLowerCase();
4934
- return /^(com|org|net|edu|gov)$/.test(n) ? !1 : !/^(io|app|dev)$/.test(n) || no(t[t.length - 1]);
5017
+ return /^(com|org|net|edu|gov)$/.test(n) ? !1 : !/^(io|app|dev)$/.test(n) || io(t[t.length - 1]);
4935
5018
  }
4936
- function io(e) {
4937
- if (eo.test(e)) return e;
5019
+ function oo(e) {
5020
+ if (no.test(e)) return e;
4938
5021
  let t = e.match(/^([a-z][a-z0-9+.-]*):/i);
4939
5022
  if (t) {
4940
5023
  let n = t[1], r = e.slice(t[0].length);
4941
- if (/^\d+([/?#]|$)/.test(r) && ro(n)) {
5024
+ if (/^\d+([/?#]|$)/.test(r) && ao(n)) {
4942
5025
  let t = parseInt(r, 10);
4943
5026
  if (t >= 1 && t <= 65535) return `https://${e}`;
4944
5027
  }
@@ -4946,14 +5029,14 @@ function io(e) {
4946
5029
  }
4947
5030
  return `https://${e}`;
4948
5031
  }
4949
- function ao(e) {
5032
+ function so(e) {
4950
5033
  try {
4951
5034
  return new URL(e).hostname.replace(/^www\./i, "") || null;
4952
5035
  } catch {
4953
5036
  return null;
4954
5037
  }
4955
5038
  }
4956
- function oo(e, t) {
5039
+ function co(e, t) {
4957
5040
  if (t !== "linkedin.com") return null;
4958
5041
  try {
4959
5042
  let t = new URL(e).pathname.match(/^\/(in|company|school)\/([^/]+)/i);
@@ -4961,7 +5044,7 @@ function oo(e, t) {
4961
5044
  } catch {}
4962
5045
  return null;
4963
5046
  }
4964
- function so(e) {
5047
+ function lo(e) {
4965
5048
  try {
4966
5049
  return new URL(e), !0;
4967
5050
  } catch {
@@ -4970,7 +5053,7 @@ function so(e) {
4970
5053
  }
4971
5054
  //#endregion
4972
5055
  //#region src/components/fields/cells/factories/host-icons.tsx
4973
- function co(e, t = "0 0 24 24") {
5056
+ function uo(e, t = "0 0 24 24") {
4974
5057
  return (n) => /* @__PURE__ */ b("svg", {
4975
5058
  width: 16,
4976
5059
  height: 16,
@@ -4986,17 +5069,17 @@ function co(e, t = "0 0 24 24") {
4986
5069
  children: e
4987
5070
  });
4988
5071
  }
4989
- var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5072
+ var fo = uo(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
4990
5073
  cx: "12",
4991
5074
  cy: "12",
4992
5075
  r: "9"
4993
- }), /* @__PURE__ */ b("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })), uo = () => /* @__PURE__ */ b(e, {
5076
+ }), /* @__PURE__ */ b("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })), po = () => /* @__PURE__ */ b(e, {
4994
5077
  size: 16,
4995
5078
  style: {
4996
5079
  flexShrink: 0,
4997
5080
  color: "#0A66C2"
4998
5081
  }
4999
- }), fo = (e) => /* @__PURE__ */ b("svg", {
5082
+ }), mo = (e) => /* @__PURE__ */ b("svg", {
5000
5083
  width: 16,
5001
5084
  height: 16,
5002
5085
  viewBox: "0 0 24 24",
@@ -5005,7 +5088,7 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5005
5088
  style: { flexShrink: 0 },
5006
5089
  ...e,
5007
5090
  children: /* @__PURE__ */ b("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" })
5008
- }), po = (e) => /* @__PURE__ */ b("svg", {
5091
+ }), ho = (e) => /* @__PURE__ */ b("svg", {
5009
5092
  width: 16,
5010
5093
  height: 16,
5011
5094
  viewBox: "0 0 24 24",
@@ -5014,7 +5097,7 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5014
5097
  style: { flexShrink: 0 },
5015
5098
  ...e,
5016
5099
  children: /* @__PURE__ */ b("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" })
5017
- }), mo = (e) => /* @__PURE__ */ b("svg", {
5100
+ }), go = (e) => /* @__PURE__ */ b("svg", {
5018
5101
  width: 16,
5019
5102
  height: 16,
5020
5103
  viewBox: "0 0 24 24",
@@ -5023,7 +5106,7 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5023
5106
  style: { flexShrink: 0 },
5024
5107
  ...e,
5025
5108
  children: /* @__PURE__ */ b("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" })
5026
- }), ho = (e) => /* @__PURE__ */ b("svg", {
5109
+ }), _o = (e) => /* @__PURE__ */ b("svg", {
5027
5110
  width: 16,
5028
5111
  height: 16,
5029
5112
  viewBox: "0 0 24 24",
@@ -5032,7 +5115,7 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5032
5115
  style: { flexShrink: 0 },
5033
5116
  ...e,
5034
5117
  children: /* @__PURE__ */ b("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" })
5035
- }), go = (e) => /* @__PURE__ */ x("svg", {
5118
+ }), vo = (e) => /* @__PURE__ */ x("svg", {
5036
5119
  width: 16,
5037
5120
  height: 16,
5038
5121
  viewBox: "0 0 24 24",
@@ -5057,7 +5140,7 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5057
5140
  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"
5058
5141
  })
5059
5142
  ]
5060
- }), _o = (e) => /* @__PURE__ */ b("svg", {
5143
+ }), yo = (e) => /* @__PURE__ */ b("svg", {
5061
5144
  width: 16,
5062
5145
  height: 16,
5063
5146
  viewBox: "0 0 24 24",
@@ -5066,39 +5149,39 @@ var lo = co(/* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
5066
5149
  style: { flexShrink: 0 },
5067
5150
  ...e,
5068
5151
  children: /* @__PURE__ */ b("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" })
5069
- }), vo = {
5070
- "linkedin.com": uo,
5071
- "github.com": fo,
5072
- "x.com": po,
5073
- "twitter.com": po,
5074
- "youtube.com": mo,
5075
- "youtu.be": mo,
5076
- "gmail.com": ho,
5077
- "mail.google.com": ho,
5078
- "slack.com": go,
5079
- "notion.so": _o,
5080
- "notion.com": _o
5152
+ }), bo = {
5153
+ "linkedin.com": po,
5154
+ "github.com": mo,
5155
+ "x.com": ho,
5156
+ "twitter.com": ho,
5157
+ "youtube.com": go,
5158
+ "youtu.be": go,
5159
+ "gmail.com": _o,
5160
+ "mail.google.com": _o,
5161
+ "slack.com": vo,
5162
+ "notion.so": yo,
5163
+ "notion.com": yo
5081
5164
  };
5082
- function yo(e, t) {
5165
+ function xo(e, t) {
5083
5166
  return !e || t === "none" ? null : t === "google" ? `https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=32` : `https://${e}/favicon.ico`;
5084
5167
  }
5085
- var bo = {
5168
+ var So = {
5086
5169
  width: 16,
5087
5170
  height: 16,
5088
5171
  flexShrink: 0,
5089
5172
  objectFit: "contain"
5090
5173
  };
5091
- function xo({ domain: e, source: t }) {
5092
- let n = e ? e.toLowerCase() : "", r = n ? vo[n] : void 0;
5174
+ function Co({ domain: e, source: t }) {
5175
+ let n = e ? e.toLowerCase() : "", r = n ? bo[n] : void 0;
5093
5176
  if (r) return /* @__PURE__ */ b(r, {});
5094
- let i = yo(n, t);
5095
- return i ? /* @__PURE__ */ b(So, { src: i }) : /* @__PURE__ */ b(lo, {});
5177
+ let i = xo(n, t);
5178
+ return i ? /* @__PURE__ */ b(wo, { src: i }) : /* @__PURE__ */ b(fo, {});
5096
5179
  }
5097
- function So({ src: e }) {
5180
+ function wo({ src: e }) {
5098
5181
  let [t, n] = p(!1);
5099
5182
  return l(() => {
5100
5183
  n(!1);
5101
- }, [e]), t ? /* @__PURE__ */ b(lo, {}) : /* @__PURE__ */ b("img", {
5184
+ }, [e]), t ? /* @__PURE__ */ b(fo, {}) : /* @__PURE__ */ b("img", {
5102
5185
  src: e,
5103
5186
  alt: "",
5104
5187
  width: 16,
@@ -5106,7 +5189,7 @@ function So({ src: e }) {
5106
5189
  loading: "lazy",
5107
5190
  decoding: "async",
5108
5191
  referrerPolicy: "no-referrer",
5109
- style: bo,
5192
+ style: So,
5110
5193
  onError: () => n(!0)
5111
5194
  });
5112
5195
  }
@@ -5116,33 +5199,33 @@ var $ = /* @__PURE__ */ b("span", {
5116
5199
  color: "var(--text-4)"
5117
5200
  },
5118
5201
  children: "—"
5119
- }), Co = {
5202
+ }), To = {
5120
5203
  display: "inline-flex",
5121
5204
  alignItems: "center",
5122
5205
  gap: 4,
5123
5206
  fontSize: 12.5,
5124
5207
  color: "var(--accent)",
5125
5208
  textDecoration: "none"
5126
- }, wo = { fontSize: 12.5 }, To = (e) => {
5209
+ }, Eo = { fontSize: 12.5 }, Do = (e) => {
5127
5210
  let n = e.field.display?.favicon_source ?? "google";
5128
5211
  return (e) => {
5129
5212
  let r = e == null ? "" : I(e);
5130
5213
  if (!r) return $;
5131
- let i = io(r);
5132
- if (i == null || !so(i)) return /* @__PURE__ */ b("span", {
5133
- style: wo,
5214
+ let i = oo(r);
5215
+ if (i == null || !lo(i)) return /* @__PURE__ */ b("span", {
5216
+ style: Eo,
5134
5217
  children: r
5135
5218
  });
5136
- let a = ao(i), o = oo(i, a ?? "") ?? a ?? r;
5219
+ let a = so(i), o = co(i, a ?? "") ?? a ?? r;
5137
5220
  return /* @__PURE__ */ x("a", {
5138
5221
  href: i,
5139
5222
  target: "_blank",
5140
5223
  rel: "noopener noreferrer",
5141
5224
  title: r,
5142
5225
  className: "mono",
5143
- style: Co,
5226
+ style: To,
5144
5227
  children: [
5145
- /* @__PURE__ */ b(xo, {
5228
+ /* @__PURE__ */ b(Co, {
5146
5229
  domain: a,
5147
5230
  source: n
5148
5231
  }),
@@ -5151,43 +5234,43 @@ var $ = /* @__PURE__ */ b("span", {
5151
5234
  ]
5152
5235
  });
5153
5236
  };
5154
- }, Eo = {
5237
+ }, Oo = {
5155
5238
  fontSize: 12.5,
5156
5239
  color: "var(--accent)",
5157
5240
  textDecoration: "none"
5158
- }, Do = () => (e) => {
5241
+ }, ko = () => (e) => {
5159
5242
  let t = e == null ? "" : I(e);
5160
5243
  return t ? /* @__PURE__ */ b("a", {
5161
5244
  href: `mailto:${t}`,
5162
5245
  className: "mono",
5163
- style: Eo,
5246
+ style: Oo,
5164
5247
  children: t
5165
5248
  }) : $;
5166
- }, Oo = {
5249
+ }, Ao = {
5167
5250
  fontSize: 12.5,
5168
5251
  color: "var(--accent)",
5169
5252
  textDecoration: "none"
5170
- }, ko = { fontSize: 12.5 }, Ao = /^[+()\-.\s\d]+$/, jo = () => (e) => {
5253
+ }, jo = { fontSize: 12.5 }, Mo = /^[+()\-.\s\d]+$/, No = () => (e) => {
5171
5254
  let t = e == null ? "" : I(e);
5172
5255
  if (!t) return $;
5173
5256
  let n = t.trim();
5174
- return Ao.test(n) ? /* @__PURE__ */ b("a", {
5257
+ return Mo.test(n) ? /* @__PURE__ */ b("a", {
5175
5258
  href: `tel:${n.replace(/\s+/g, "")}`,
5176
5259
  className: "mono",
5177
- style: Oo,
5260
+ style: Ao,
5178
5261
  children: t
5179
5262
  }) : /* @__PURE__ */ b("span", {
5180
- style: ko,
5263
+ style: jo,
5181
5264
  children: t
5182
5265
  });
5183
- }, Mo = {
5266
+ }, Po = {
5184
5267
  fontSize: 12.5,
5185
5268
  fontVariantNumeric: "tabular-nums"
5186
- }, No = {
5269
+ }, Fo = {
5187
5270
  color: "var(--text-3)",
5188
5271
  marginLeft: 4
5189
- }, Po = { fontSize: 12.5 };
5190
- function Fo(e, t) {
5272
+ }, Io = { fontSize: 12.5 };
5273
+ function Lo(e, t) {
5191
5274
  let n = e.trim();
5192
5275
  if (n === "" || n === "-") return n;
5193
5276
  let r = n.startsWith("-"), [i, a] = (r ? n.slice(1) : n).split("."), o;
@@ -5199,45 +5282,45 @@ function Fo(e, t) {
5199
5282
  let s = r ? `-${o}` : o;
5200
5283
  return a !== void 0 && (s += `.${a}`), s;
5201
5284
  }
5202
- var Io = (e) => {
5285
+ var Ro = (e) => {
5203
5286
  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;
5204
5287
  return (e, t) => {
5205
5288
  if (e == null) return $;
5206
5289
  let r = t.$units?.[n] || (o && !o.startsWith("$") ? o : void 0), s;
5207
- if (a && typeof e == "string") s = Fo(e, i);
5290
+ if (a && typeof e == "string") s = Lo(e, i);
5208
5291
  else {
5209
5292
  let t = typeof e == "number" ? e : Number(e);
5210
5293
  s = Number.isFinite(t) ? i.format(t) : null;
5211
5294
  }
5212
5295
  return s == null ? /* @__PURE__ */ b("span", {
5213
- style: Po,
5296
+ style: Io,
5214
5297
  children: "—"
5215
5298
  }) : /* @__PURE__ */ x("span", {
5216
5299
  className: "num",
5217
- style: Mo,
5300
+ style: Po,
5218
5301
  children: [s, r && /* @__PURE__ */ b("span", {
5219
- style: No,
5302
+ style: Fo,
5220
5303
  children: r
5221
5304
  })]
5222
5305
  });
5223
5306
  };
5224
- }, Lo = { fontSize: 12.5 }, Ro = () => (e) => e == null || e === "" ? $ : /* @__PURE__ */ b("code", {
5307
+ }, zo = { fontSize: 12.5 }, Bo = () => (e) => e == null || e === "" ? $ : /* @__PURE__ */ b("code", {
5225
5308
  className: "mono",
5226
- style: Lo,
5309
+ style: zo,
5227
5310
  children: I(e)
5228
- }), zo = {
5311
+ }), Vo = {
5229
5312
  display: "inline-flex",
5230
5313
  alignItems: "center",
5231
5314
  gap: 4,
5232
5315
  fontSize: 12.5,
5233
5316
  color: "var(--accent)",
5234
5317
  textDecoration: "none"
5235
- }, Bo = { fontSize: 12.5 }, Vo = () => (e) => {
5318
+ }, Ho = { fontSize: 12.5 }, Uo = () => (e) => {
5236
5319
  let n = e == null ? "" : I(e);
5237
5320
  if (!n) return $;
5238
- let r = io(n);
5239
- return r == null || !so(r) ? /* @__PURE__ */ b("span", {
5240
- style: Bo,
5321
+ let r = oo(n);
5322
+ return r == null || !lo(r) ? /* @__PURE__ */ b("span", {
5323
+ style: Ho,
5241
5324
  children: n
5242
5325
  }) : /* @__PURE__ */ x("a", {
5243
5326
  href: r,
@@ -5245,21 +5328,21 @@ var Io = (e) => {
5245
5328
  rel: "noopener noreferrer",
5246
5329
  title: n,
5247
5330
  className: "mono",
5248
- style: zo,
5331
+ style: Vo,
5249
5332
  children: [n, /* @__PURE__ */ b(t.external, { size: 11 })]
5250
5333
  });
5251
- }, Ho = 400, Uo = 2e3;
5252
- function Wo(e) {
5253
- return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) : Ho, Uo));
5334
+ }, Wo = 400, Go = 2e3;
5335
+ function Ko(e) {
5336
+ return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) : Wo, Go));
5254
5337
  }
5255
- function Go(e, t) {
5338
+ function qo(e, t) {
5256
5339
  return e.length <= t ? e : `${e.slice(0, t)}...`;
5257
5340
  }
5258
- function Ko(e, t, n, r = 0) {
5341
+ function Jo(e, t, n, r = 0) {
5259
5342
  if (e == null || e === "") return "";
5260
- if (typeof e == "string") return Go(e, t);
5343
+ if (typeof e == "string") return qo(e, t);
5261
5344
  if (typeof e == "number" || typeof e == "boolean") return String(e);
5262
- if (typeof e != "object") return Go(I(e), t);
5345
+ if (typeof e != "object") return qo(I(e), t);
5263
5346
  if (n.has(e)) return "[Circular]";
5264
5347
  if (r >= 3) return Array.isArray(e) ? "[...]" : "{...}";
5265
5348
  n.add(e);
@@ -5270,23 +5353,23 @@ function Ko(e, t, n, r = 0) {
5270
5353
  a.push(a.length > 1 ? ",..." : "...");
5271
5354
  break;
5272
5355
  }
5273
- let f = Ko(c, d, n, r + 1);
5356
+ let f = Jo(c, d, n, r + 1);
5274
5357
  if (a.push(u, f), a.join("").length >= t) {
5275
5358
  a.push(",...");
5276
5359
  break;
5277
5360
  }
5278
5361
  }
5279
- return a.push(i), n.delete(e), Go(a.join(""), t);
5362
+ return a.push(i), n.delete(e), qo(a.join(""), t);
5280
5363
  }
5281
- function qo(e, t) {
5282
- return Ko(e, t, /* @__PURE__ */ new WeakSet());
5364
+ function Yo(e, t) {
5365
+ return Jo(e, t, /* @__PURE__ */ new WeakSet());
5283
5366
  }
5284
- var Jo = (e) => {
5285
- let t = e.surface ?? "detail", n = Wo(e.field.display?.list_preview?.max_chars);
5367
+ var Xo = (e) => {
5368
+ let t = e.surface ?? "detail", n = Ko(e.field.display?.list_preview?.max_chars);
5286
5369
  return (r) => {
5287
5370
  if (Ri(r)) return $;
5288
5371
  if (t === "list") {
5289
- let e = qo(r, n);
5372
+ let e = Yo(r, n);
5290
5373
  return /* @__PURE__ */ b("span", {
5291
5374
  className: "font-mono text-xs text-muted-foreground",
5292
5375
  title: e,
@@ -5301,7 +5384,7 @@ var Jo = (e) => {
5301
5384
  locale: e.locale
5302
5385
  });
5303
5386
  };
5304
- }, Yo = [
5387
+ }, Zo = [
5305
5388
  {
5306
5389
  pattern: /```[^\n]*\n?([\s\S]*?)```/g,
5307
5390
  replacement: "$1"
@@ -5364,13 +5447,13 @@ var Jo = (e) => {
5364
5447
  replacement: ""
5365
5448
  }
5366
5449
  ];
5367
- function Xo(e) {
5450
+ function Qo(e) {
5368
5451
  if (!e) return {
5369
5452
  text: "",
5370
5453
  isPlain: !0
5371
5454
  };
5372
5455
  let t = e, n = !1;
5373
- for (let e of Yo) {
5456
+ for (let e of Zo) {
5374
5457
  let r = t.replace(e.pattern, e.replacement);
5375
5458
  r !== t && e.structural !== !1 && (n = !0), t = r;
5376
5459
  }
@@ -5381,123 +5464,123 @@ function Xo(e) {
5381
5464
  }
5382
5465
  //#endregion
5383
5466
  //#region src/components/fields/cells/factories/markdown.tsx
5384
- function Zo(e) {
5467
+ function $o(e) {
5385
5468
  return /* @__PURE__ */ b(Yr, { content: e });
5386
5469
  }
5387
- var Qo = (e) => {
5470
+ var es = (e) => {
5388
5471
  let t = e.surface === "list";
5389
5472
  return (e) => {
5390
5473
  let n = e == null ? "" : I(e);
5391
5474
  if (!n) return $;
5392
- if (!t) return Zo(n);
5393
- let { text: r, isPlain: i } = Xo(n);
5475
+ if (!t) return $o(n);
5476
+ let { text: r, isPlain: i } = Qo(n);
5394
5477
  return i ? /* @__PURE__ */ b("span", {
5395
5478
  title: r,
5396
5479
  children: r
5397
5480
  }) : /* @__PURE__ */ b(se, {
5398
- content: Zo(n),
5481
+ content: $o(n),
5399
5482
  children: /* @__PURE__ */ b("span", {
5400
5483
  title: r,
5401
5484
  children: r
5402
5485
  })
5403
5486
  });
5404
5487
  };
5405
- }, $o = "[SET]", es = {
5488
+ }, ts = "[SET]", ns = {
5406
5489
  fontSize: 12.5,
5407
5490
  color: "var(--text-3)"
5408
- }, ts = {
5491
+ }, rs = {
5409
5492
  fontSize: 12.5,
5410
5493
  color: "var(--text-4)",
5411
5494
  fontStyle: "italic"
5412
- }, ns = () => (e) => e === $o || typeof e == "string" && e !== "" ? /* @__PURE__ */ b("span", {
5495
+ }, is = () => (e) => e === ts || typeof e == "string" && e !== "" ? /* @__PURE__ */ b("span", {
5413
5496
  className: "mono",
5414
- style: es,
5415
- children: $o
5497
+ style: ns,
5498
+ children: ts
5416
5499
  }) : /* @__PURE__ */ b("span", {
5417
- style: ts,
5500
+ style: rs,
5418
5501
  children: "Not set"
5419
5502
  });
5420
5503
  //#endregion
5421
5504
  //#region src/components/fields/cells/factories/richTextPreview.tsx
5422
- function rs(e, t) {
5505
+ function as(e, t) {
5423
5506
  return /* @__PURE__ */ b(Yr, {
5424
5507
  content: e,
5425
5508
  files: t
5426
5509
  });
5427
5510
  }
5428
- var is = (e) => {
5511
+ var os = (e) => {
5429
5512
  let { fieldName: t } = e, n = e.surface === "list";
5430
5513
  return (e, r) => {
5431
- let i = r?.$files?.[t], a = ra(e, i);
5514
+ let i = r?.$files?.[t], a = aa(e, i);
5432
5515
  if (!a.markdown) return $;
5433
- if (!n) return rs(a.markdown, a.files);
5434
- let { text: o, isPlain: s } = Xo(a.markdown);
5516
+ if (!n) return as(a.markdown, a.files);
5517
+ let { text: o, isPlain: s } = Qo(a.markdown);
5435
5518
  return s ? /* @__PURE__ */ b("span", {
5436
5519
  title: o,
5437
5520
  children: o
5438
5521
  }) : /* @__PURE__ */ b(se, {
5439
- content: rs(a.markdown, a.files),
5522
+ content: as(a.markdown, a.files),
5440
5523
  children: /* @__PURE__ */ b("span", {
5441
5524
  title: o,
5442
5525
  children: o
5443
5526
  })
5444
5527
  });
5445
5528
  };
5446
- }, as = { fontSize: 12.5 }, os = {
5529
+ }, ss = { fontSize: 12.5 }, cs = {
5447
5530
  fontSize: 12.5,
5448
5531
  whiteSpace: "pre-wrap",
5449
5532
  margin: 0
5450
5533
  };
5451
- function ss(e) {
5534
+ function ls(e) {
5452
5535
  return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
5453
5536
  }
5454
- function cs(e, t) {
5537
+ function us(e, t) {
5455
5538
  if (t && typeof e[t] == "string" && e[t] !== "") return [t, e[t]];
5456
5539
  for (let [t, n] of Object.entries(e)) if (typeof n == "string" && n !== "") return [t, n];
5457
5540
  return null;
5458
5541
  }
5459
5542
  //#endregion
5460
5543
  //#region src/components/fields/cells/registry.ts
5461
- var ls = {
5462
- text: ja,
5463
- bool_pill: Ma,
5464
- badge: La,
5465
- status_pill: Ba,
5466
- tag_list: Ua,
5467
- time_ago: Wa,
5468
- timestamp_full: Ga,
5469
- next_run: Ja,
5470
- money: Ya,
5471
- ref_link: Qa,
5472
- url: To,
5473
- email: Do,
5474
- phone: jo,
5475
- number: Io,
5476
- code: Ro,
5477
- link: Vo,
5478
- json: Jo,
5479
- markdown: Qo,
5480
- password_mask: ns,
5481
- rich_text_preview: is,
5544
+ var ds = {
5545
+ text: Na,
5546
+ bool_pill: Pa,
5547
+ badge: za,
5548
+ status_pill: Ha,
5549
+ tag_list: Ga,
5550
+ time_ago: Ka,
5551
+ timestamp_full: qa,
5552
+ next_run: Xa,
5553
+ money: Za,
5554
+ ref_link: eo,
5555
+ url: Do,
5556
+ email: ko,
5557
+ phone: No,
5558
+ number: Ro,
5559
+ code: Bo,
5560
+ link: Uo,
5561
+ json: Xo,
5562
+ markdown: es,
5563
+ password_mask: is,
5564
+ rich_text_preview: os,
5482
5565
  multilang_inline: (e) => {
5483
5566
  let { field: t, locale: n } = e, r = t.type === "multilang_text";
5484
5567
  return (e) => {
5485
- let t = cs(ss(e), n);
5568
+ let t = us(ls(e), n);
5486
5569
  if (!t) return r ? /* @__PURE__ */ b("p", {
5487
- style: os,
5570
+ style: cs,
5488
5571
  children: "—"
5489
5572
  }) : /* @__PURE__ */ b("span", {
5490
- style: as,
5573
+ style: ss,
5491
5574
  children: "—"
5492
5575
  });
5493
5576
  let [i, a] = t;
5494
5577
  return r ? /* @__PURE__ */ b("p", {
5495
- style: os,
5578
+ style: cs,
5496
5579
  lang: i,
5497
5580
  dir: "auto",
5498
5581
  children: a
5499
5582
  }) : /* @__PURE__ */ b("span", {
5500
- style: as,
5583
+ style: ss,
5501
5584
  lang: i,
5502
5585
  dir: "auto",
5503
5586
  children: a
@@ -5505,18 +5588,18 @@ var ls = {
5505
5588
  };
5506
5589
  }
5507
5590
  };
5508
- Object.keys(ls).sort();
5509
- function us(e) {
5510
- let t = e.field.display?.widget ?? "text", n = ls[t];
5591
+ Object.keys(ds).sort();
5592
+ function fs(e) {
5593
+ let t = e.field.display?.widget ?? "text", n = ds[t];
5511
5594
  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.`);
5512
5595
  return n(e);
5513
5596
  }
5514
5597
  //#endregion
5515
5598
  //#region src/components/fields/index.tsx
5516
- var ds = {
5599
+ var ps = {
5517
5600
  string: ai,
5518
5601
  text: oi,
5519
- rich_text: Oa,
5602
+ rich_text: Aa,
5520
5603
  int: Di,
5521
5604
  float: Di,
5522
5605
  decimal: Di,
@@ -5534,7 +5617,7 @@ var ds = {
5534
5617
  json: zi,
5535
5618
  tags: ai,
5536
5619
  string_array: Qi,
5537
- int_array: ea,
5620
+ int_array: na,
5538
5621
  uuid_array: Qi,
5539
5622
  multilang: Vi,
5540
5623
  multilang_text: Ui,
@@ -5542,16 +5625,16 @@ var ds = {
5542
5625
  secret: Ji,
5543
5626
  password: Xi
5544
5627
  };
5545
- for (let e of ri) if (!ds[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.`);
5546
- function fs(e) {
5628
+ for (let e of ri) if (!ps[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.`);
5629
+ function ms(e) {
5547
5630
  if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ b(Wi, { ...e });
5548
5631
  if (e.mode === "edit") {
5549
- let t = ds[e.field.type];
5632
+ let t = ps[e.field.type];
5550
5633
  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.`);
5551
5634
  return /* @__PURE__ */ b(t, { ...e });
5552
5635
  }
5553
5636
  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.`);
5554
- return us({
5637
+ return fs({
5555
5638
  field: e.field,
5556
5639
  fieldName: e.fieldName,
5557
5640
  surface: e.surface ?? "detail",
@@ -5564,30 +5647,30 @@ function fs(e) {
5564
5647
  }
5565
5648
  //#endregion
5566
5649
  //#region src/hooks/useUserLocale.ts
5567
- var ps = "en";
5568
- function ms() {
5650
+ var hs = "en";
5651
+ function gs() {
5569
5652
  if (typeof navigator > "u") return;
5570
5653
  let e = navigator.language;
5571
5654
  if (e) return e.split("-")[0] || void 0;
5572
5655
  }
5573
- function hs() {
5656
+ function _s() {
5574
5657
  let e = Wn((e) => e.user), { data: t } = Y(), n = e?.language;
5575
5658
  if (n && n.trim()) return n;
5576
5659
  let r = t?.languages?.[0]?.code;
5577
- return r && r.trim() ? r : ms() || ps;
5660
+ return r && r.trim() ? r : gs() || hs;
5578
5661
  }
5579
5662
  //#endregion
5580
5663
  //#region src/lib/actions.ts
5581
- var gs = {
5664
+ var vs = {
5582
5665
  __create: "create",
5583
5666
  __edit: "update",
5584
5667
  __delete: "delete",
5585
5668
  __restore: "restore"
5586
- }, _s = "__peek", vs = "__open";
5587
- function ys(e) {
5669
+ }, ys = "__peek", bs = "__open";
5670
+ function xs(e) {
5588
5671
  return e === "__peek" || e === "__open";
5589
5672
  }
5590
- function bs(e, t) {
5673
+ function Ss(e, t) {
5591
5674
  if (!e) return "";
5592
5675
  if (t) try {
5593
5676
  return et(t, Ze(t, e));
@@ -5595,26 +5678,26 @@ function bs(e, t) {
5595
5678
  let n = e.id;
5596
5679
  return typeof n == "string" ? n : n == null ? "" : I(n);
5597
5680
  }
5598
- function xs(e, t) {
5681
+ function Cs(e, t) {
5599
5682
  if (!e || e.length === 0) return !0;
5600
5683
  for (let n of e) {
5601
5684
  if (n.status && n.status.length > 0) {
5602
5685
  let e = t.status;
5603
5686
  if (typeof e != "string" || !n.status.includes(e)) return !1;
5604
5687
  }
5605
- if (n.field && !Ss(n, t)) return !1;
5688
+ if (n.field && !ws(n, t)) return !1;
5606
5689
  }
5607
5690
  return !0;
5608
5691
  }
5609
- function Ss(e, t) {
5610
- let n = Cs(t, e.field), r = e.op || "eq";
5692
+ function ws(e, t) {
5693
+ let n = Ts(t, e.field), r = e.op || "eq";
5611
5694
  if (r === "in" || r === "not_in") {
5612
5695
  let t = Array.isArray(e.value) ? e.value : [e.value], i = I(n), a = t.some((e) => I(e) === i);
5613
5696
  return r === "in" ? a : !a;
5614
5697
  }
5615
- return typeof e.value == "boolean" && r === "eq" ? Ts(n) === e.value : typeof n == "number" && typeof e.value == "number" ? Es(n, e.value, r) : Es(I(n), I(e.value), r);
5698
+ return typeof e.value == "boolean" && r === "eq" ? Ds(n) === e.value : typeof n == "number" && typeof e.value == "number" ? Os(n, e.value, r) : Os(I(n), I(e.value), r);
5616
5699
  }
5617
- function Cs(e, t) {
5700
+ function Ts(e, t) {
5618
5701
  if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
5619
5702
  if (t.startsWith("$status.")) {
5620
5703
  let n = t.slice(8), r = e.$statuses;
@@ -5625,27 +5708,27 @@ function Cs(e, t) {
5625
5708
  return Array.isArray(r) ? r.find((e) => !e || typeof e != "object" ? !1 : e.property_code === n)?.value : void 0;
5626
5709
  }
5627
5710
  }
5628
- function ws(e) {
5711
+ function Es(e) {
5629
5712
  let t = null, n = (n, r) => {
5630
5713
  Object.prototype.hasOwnProperty.call(e, n) || (t === null && (t = { ...e }), t[n] = r);
5631
5714
  }, r = e.$statuses;
5632
5715
  if (Array.isArray(r)) for (let t of r) {
5633
5716
  if (!t || typeof t != "object") continue;
5634
5717
  let r = t.group_code;
5635
- typeof r == "string" && n(`$status.${r}`, Cs(e, `$status.${r}`));
5718
+ typeof r == "string" && n(`$status.${r}`, Ts(e, `$status.${r}`));
5636
5719
  }
5637
5720
  let i = e.$properties;
5638
5721
  if (Array.isArray(i)) for (let t of i) {
5639
5722
  if (!t || typeof t != "object") continue;
5640
5723
  let r = t.property_code;
5641
- typeof r == "string" && n(`$property.${r}`, Cs(e, `$property.${r}`));
5724
+ typeof r == "string" && n(`$property.${r}`, Ts(e, `$property.${r}`));
5642
5725
  }
5643
5726
  return t ?? e;
5644
5727
  }
5645
- function Ts(e) {
5728
+ function Ds(e) {
5646
5729
  return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e !== "" : typeof e != "number" || e !== 0;
5647
5730
  }
5648
- function Es(e, t, n) {
5731
+ function Os(e, t, n) {
5649
5732
  switch (n) {
5650
5733
  case "eq": return e === t;
5651
5734
  case "ne": return e !== t;
@@ -5658,14 +5741,14 @@ function Es(e, t, n) {
5658
5741
  default: return !1;
5659
5742
  }
5660
5743
  }
5661
- function Ds(e, t) {
5744
+ function ks(e, t) {
5662
5745
  return e ? Object.entries(e).filter(([, e]) => e.visibility?.includes(t)).map(([e, t]) => ({
5663
5746
  code: e,
5664
5747
  action: t
5665
5748
  })) : [];
5666
5749
  }
5667
- function Os(e, t, n, r) {
5668
- return !e && !r ? [] : t === void 0 ? Ds(e, n) : t.map((t) => {
5750
+ function As(e, t, n, r) {
5751
+ return !e && !r ? [] : t === void 0 ? ks(e, n) : t.map((t) => {
5669
5752
  let n = e?.[t] ?? r?.[t];
5670
5753
  return n ? {
5671
5754
  code: t,
@@ -5673,34 +5756,34 @@ function Os(e, t, n, r) {
5673
5756
  } : null;
5674
5757
  }).filter((e) => e !== null);
5675
5758
  }
5676
- function ks(e, t) {
5759
+ function js(e, t) {
5677
5760
  return e.filter(({ code: e }) => {
5678
- let n = gs[e];
5761
+ let n = vs[e];
5679
5762
  return !n || Xe(t, n);
5680
5763
  });
5681
5764
  }
5682
- var As = {
5765
+ var Ms = {
5683
5766
  en: "This action cannot be undone.",
5684
5767
  ru: "Это действие нельзя отменить."
5685
5768
  };
5686
- function js(e) {
5769
+ function Ns(e) {
5687
5770
  return !!e?.confirmation && Object.keys(e.confirmation).length > 0;
5688
5771
  }
5689
- function Ms(e, t) {
5690
- return js(e) ? L(e.confirmation, t) : e?.destructive ? L(As, t) : null;
5772
+ function Ps(e, t) {
5773
+ return Ns(e) ? L(e.confirmation, t) : e?.destructive ? L(Ms, t) : null;
5691
5774
  }
5692
- function Ns(e) {
5693
- return js(e) || !!e?.destructive;
5775
+ function Fs(e) {
5776
+ return Ns(e) || !!e?.destructive;
5694
5777
  }
5695
- function Ps(e, t, n, r) {
5778
+ function Is(e, t, n, r) {
5696
5779
  if (n && r) return r;
5697
5780
  let i = L(e?.display?.description);
5698
5781
  return i ? e?.display?.icon_only === !0 ? `${t} - ${i}` : i : t;
5699
5782
  }
5700
- function Fs(e) {
5783
+ function Ls(e) {
5701
5784
  return !!e.association;
5702
5785
  }
5703
- function Is(e, t) {
5786
+ function Rs(e, t) {
5704
5787
  if (e) {
5705
5788
  for (let n of Object.values(e.screens)) if (n.entity === t && n.type === "list") {
5706
5789
  let r = e.entities[t];
@@ -5711,21 +5794,21 @@ function Is(e, t) {
5711
5794
  }
5712
5795
  }
5713
5796
  }
5714
- function Ls(e, t, n, r, i) {
5797
+ function zs(e, t, n, r, i) {
5715
5798
  let a = [];
5716
5799
  for (let o of e) {
5717
- let e = Rs(o, t, n, r, i);
5800
+ let e = Bs(o, t, n, r, i);
5718
5801
  e !== null && a.push(e);
5719
5802
  }
5720
5803
  return a;
5721
5804
  }
5722
- function Rs(e, t, n, r, i) {
5723
- return e.kind === "group" ? zs(e, t, n, r, i) : Bs(e, t, n, r, i);
5805
+ function Bs(e, t, n, r, i) {
5806
+ return e.kind === "group" ? Vs(e, t, n, r, i) : Hs(e, t, n, r, i);
5724
5807
  }
5725
- function zs(e, t, n, r, i) {
5808
+ function Vs(e, t, n, r, i) {
5726
5809
  let a = [];
5727
5810
  for (let o of e.items) {
5728
- let e = Rs(o, t, n, r, i);
5811
+ let e = Bs(o, t, n, r, i);
5729
5812
  e !== null && a.push(e);
5730
5813
  }
5731
5814
  return a.length === 0 ? null : {
@@ -5733,31 +5816,31 @@ function zs(e, t, n, r, i) {
5733
5816
  items: a
5734
5817
  };
5735
5818
  }
5736
- function Bs(e, t, n, r, i) {
5737
- let a = Us(e.code, t, n);
5819
+ function Hs(e, t, n, r, i) {
5820
+ let a = Gs(e.code, t, n);
5738
5821
  if (!a) return null;
5739
5822
  if (i.length > 0) {
5740
- let t = Vs(a, i);
5823
+ let t = Us(a, i);
5741
5824
  return t.visible ? {
5742
5825
  ...e,
5743
5826
  enabled: t.enabled,
5744
5827
  reason: t.reason
5745
5828
  } : null;
5746
5829
  }
5747
- if (!xs(a.conditions, r) || !xs(Ws(a.visible_if), r)) return null;
5748
- let { enabled: o, reason: s } = Hs(a, r);
5830
+ if (!Cs(a.conditions, r) || !Cs(Ks(a.visible_if), r)) return null;
5831
+ let { enabled: o, reason: s } = Ws(a, r);
5749
5832
  return {
5750
5833
  ...e,
5751
5834
  enabled: o,
5752
5835
  reason: s
5753
5836
  };
5754
5837
  }
5755
- function Vs(e, t) {
5756
- let n = Ws(e.visible_if), r = Ws(e.enabled_if), i = e.conditions, a = Gs(e.enabled_if_reason), o = 0, s = 0;
5838
+ function Us(e, t) {
5839
+ let n = Ks(e.visible_if), r = Ks(e.enabled_if), i = e.conditions, a = qs(e.enabled_if_reason), o = 0, s = 0;
5757
5840
  for (let e of t) {
5758
- let t = xs(n, e) && xs(i, e);
5841
+ let t = Cs(n, e) && Cs(i, e);
5759
5842
  t && o++;
5760
- let a = xs(r, e);
5843
+ let a = Cs(r, e);
5761
5844
  (!t || !a) && s++;
5762
5845
  }
5763
5846
  if (o === 0) return {
@@ -5777,14 +5860,14 @@ function Vs(e, t) {
5777
5860
  reason: a ? `${a} ${c}` : c
5778
5861
  };
5779
5862
  }
5780
- function Hs(e, t) {
5781
- let n = Ws(e.enabled_if);
5863
+ function Ws(e, t) {
5864
+ let n = Ks(e.enabled_if);
5782
5865
  if (!n || n.length === 0) return {
5783
5866
  enabled: !0,
5784
5867
  reason: null
5785
5868
  };
5786
- let r = Gs(e.enabled_if_reason);
5787
- return xs(n, t) ? {
5869
+ let r = qs(e.enabled_if_reason);
5870
+ return Cs(n, t) ? {
5788
5871
  enabled: !0,
5789
5872
  reason: null
5790
5873
  } : {
@@ -5792,52 +5875,52 @@ function Hs(e, t) {
5792
5875
  reason: r
5793
5876
  };
5794
5877
  }
5795
- function Us(e, t, n) {
5878
+ function Gs(e, t, n) {
5796
5879
  if (t && e in t) return t[e];
5797
5880
  if (n && e in n) return n[e];
5798
5881
  }
5799
- function Ws(e) {
5882
+ function Ks(e) {
5800
5883
  return e;
5801
5884
  }
5802
- function Gs(e) {
5885
+ function qs(e) {
5803
5886
  if (!e) return null;
5804
5887
  if (e.en) return e.en;
5805
5888
  let t = Object.values(e);
5806
5889
  return t.length > 0 ? t[0] : null;
5807
5890
  }
5808
- function Ks(e, t, n, r, i) {
5891
+ function Js(e, t, n, r, i) {
5809
5892
  let a = [];
5810
5893
  for (let o of e) {
5811
5894
  if (o.kind === "group") {
5812
- let e = Ks(o.items, t, n, r, i);
5895
+ let e = Js(o.items, t, n, r, i);
5813
5896
  e.length > 0 && a.push({
5814
5897
  ...o,
5815
5898
  items: e
5816
5899
  });
5817
5900
  continue;
5818
5901
  }
5819
- let e = Us(o.code, t, n);
5902
+ let e = Gs(o.code, t, n);
5820
5903
  e && e.visibility?.includes(r) && (i?.bulkRequired !== void 0 && (i.bulkRequiredPredicate ? i.bulkRequiredPredicate(e) : !1) !== i.bulkRequired || i?.excludeIf && i.excludeIf(e) || a.push(o));
5821
5904
  }
5822
5905
  return a;
5823
5906
  }
5824
- function qs(e, t, n, r, i, a) {
5907
+ function Ys(e, t, n, r, i, a) {
5825
5908
  let o = e ?? t;
5826
- return o ? Ks(o, n, r, i, a) : Zs(n, i);
5909
+ return o ? Js(o, n, r, i, a) : $s(n, i);
5827
5910
  }
5828
- function Js(e) {
5829
- return e.requires_selection === void 0 ? Ys(e) : e.requires_selection;
5911
+ function Xs(e) {
5912
+ return e.requires_selection === void 0 ? Zs(e) : e.requires_selection;
5830
5913
  }
5831
- function Ys(e) {
5914
+ function Zs(e) {
5832
5915
  return e.visibility?.includes("list_floatbar") ?? !1;
5833
5916
  }
5834
- function Xs(e, t, n, r, i) {
5917
+ function Qs(e, t, n, r, i) {
5835
5918
  return e.map((e) => {
5836
5919
  if (e.kind === "group") return {
5837
5920
  ...e,
5838
- items: Xs(e.items, t, n, r, i)
5921
+ items: Qs(e.items, t, n, r, i)
5839
5922
  };
5840
- let a = Us(e.code, t, n);
5923
+ let a = Gs(e.code, t, n);
5841
5924
  return a && r(a) ? {
5842
5925
  ...e,
5843
5926
  enabled: !1,
@@ -5845,7 +5928,7 @@ function Xs(e, t, n, r, i) {
5845
5928
  } : e;
5846
5929
  });
5847
5930
  }
5848
- function Zs(e, t) {
5931
+ function $s(e, t) {
5849
5932
  return e ? Object.entries(e).filter(([, e]) => e.visibility?.includes(t)).sort(([e, t], [n, r]) => {
5850
5933
  let i = t.position ?? 0, a = r.position ?? 0;
5851
5934
  return i === a ? e < n ? -1 : +(e > n) : i - a;
@@ -5858,84 +5941,84 @@ function Zs(e, t) {
5858
5941
  }
5859
5942
  //#endregion
5860
5943
  //#region src/lib/field-regions.ts
5861
- var Qs = /* @__PURE__ */ new Map();
5862
- function $s(e, t) {
5863
- return Qs.set(e, t), () => {
5864
- Qs.get(e) === t && Qs.delete(e);
5944
+ var ec = /* @__PURE__ */ new Map();
5945
+ function tc(e, t) {
5946
+ return ec.set(e, t), () => {
5947
+ ec.get(e) === t && ec.delete(e);
5865
5948
  };
5866
5949
  }
5867
- function ec(e) {
5868
- return Qs.get(e);
5950
+ function nc(e) {
5951
+ return ec.get(e);
5869
5952
  }
5870
5953
  //#endregion
5871
5954
  //#region src/lib/ui-actions.ts
5872
- var tc = /\$\{\s*([^}]+?)\s*\}/g, nc = /^\s*\$\{\s*([^}]+?)\s*\}\s*$/, rc = Symbol("unresolved");
5873
- function ic(e, t) {
5874
- let n = e.match(nc);
5955
+ var rc = /\$\{\s*([^}]+?)\s*\}/g, ic = /^\s*\$\{\s*([^}]+?)\s*\}\s*$/, ac = Symbol("unresolved");
5956
+ function oc(e, t) {
5957
+ let n = e.match(ic);
5875
5958
  if (n) {
5876
- let r = ac(n[1], t);
5877
- return r === rc ? e : r;
5959
+ let r = sc(n[1], t);
5960
+ return r === ac ? e : r;
5878
5961
  }
5879
- return e.replace(tc, (e, n) => {
5880
- let r = ac(n, t);
5881
- return r === rc ? e : I(r);
5962
+ return e.replace(rc, (e, n) => {
5963
+ let r = sc(n, t);
5964
+ return r === ac ? e : I(r);
5882
5965
  });
5883
5966
  }
5884
- function ac(e, t) {
5967
+ function sc(e, t) {
5885
5968
  if (e === "now") return fi();
5886
5969
  let [n, ...r] = e.split(".");
5887
- if (n === "row") return !t.row || r.length === 0 ? rc : oc(t.row, r);
5970
+ if (n === "row") return !t.row || r.length === 0 ? ac : cc(t.row, r);
5888
5971
  if (n === "field" && r.length >= 2) {
5889
- let [e, t] = r, n = ec(e);
5890
- return n ? n.getField(t) : rc;
5972
+ let [e, t] = r, n = nc(e);
5973
+ return n ? n.getField(t) : ac;
5891
5974
  }
5892
- return n === "params" ? !t.params || r.length === 0 ? rc : oc(t.params, r) : rc;
5975
+ return n === "params" ? !t.params || r.length === 0 ? ac : cc(t.params, r) : ac;
5893
5976
  }
5894
- function oc(e, t) {
5977
+ function cc(e, t) {
5895
5978
  return t.reduce((e, t) => {
5896
5979
  if (e && typeof e == "object") return e[t];
5897
5980
  }, e);
5898
5981
  }
5899
- async function sc(e, t) {
5982
+ async function lc(e, t) {
5900
5983
  for (let n of e) try {
5901
- await cc(n, t);
5984
+ await uc(n, t);
5902
5985
  } catch (e) {
5903
5986
  let t = e instanceof Error ? e.message : String(e);
5904
5987
  Z.error(`ui_step failed: ${t}`);
5905
5988
  return;
5906
5989
  }
5907
5990
  }
5908
- async function cc(e, t) {
5991
+ async function uc(e, t) {
5909
5992
  if (e.copy_to_clipboard != null) {
5910
- let n = uc(e.copy_to_clipboard, t);
5993
+ let n = fc(e.copy_to_clipboard, t);
5911
5994
  await navigator.clipboard.writeText(n);
5912
5995
  return;
5913
5996
  }
5914
5997
  if (e.set_field) {
5915
- let { target: n, value: r } = e.set_field, { region: i, field: a } = dc(n), o = ec(i);
5998
+ let { target: n, value: r } = e.set_field, { region: i, field: a } = pc(n), o = nc(i);
5916
5999
  if (!o) throw Error(`region "${i}" not registered`);
5917
- o.setField(a, lc(r, t));
6000
+ o.setField(a, dc(r, t));
5918
6001
  return;
5919
6002
  }
5920
6003
  if (e.focus_field) {
5921
- let { region: t, field: n } = dc(e.focus_field), r = ec(t);
6004
+ let { region: t, field: n } = pc(e.focus_field), r = nc(t);
5922
6005
  if (!r) throw Error(`region "${t}" not registered`);
5923
6006
  r.focusField(n);
5924
6007
  return;
5925
6008
  }
5926
6009
  if (e.show_toast) {
5927
- let n = uc(e.show_toast.message, t), r = e.show_toast.kind ?? "info";
6010
+ let n = fc(e.show_toast.message, t), r = e.show_toast.kind ?? "info";
5928
6011
  r === "success" ? Z.success(n) : r === "error" ? Z.error(n) : Z.info(n);
5929
6012
  return;
5930
6013
  }
5931
6014
  }
5932
- function lc(e, t) {
5933
- return typeof e == "string" ? ic(e, t) : e;
6015
+ function dc(e, t) {
6016
+ return typeof e == "string" ? oc(e, t) : e;
5934
6017
  }
5935
- function uc(e, t) {
5936
- return I(ic(e, t));
6018
+ function fc(e, t) {
6019
+ return I(oc(e, t));
5937
6020
  }
5938
- function dc(e) {
6021
+ function pc(e) {
5939
6022
  let t = e.indexOf(".");
5940
6023
  if (t <= 0) throw Error(`invalid path "${e}" (expected "region.field")`);
5941
6024
  return {
@@ -5943,12 +6026,12 @@ function dc(e) {
5943
6026
  field: e.slice(t + 1)
5944
6027
  };
5945
6028
  }
5946
- function fc(e) {
6029
+ function mc(e) {
5947
6030
  return !e.handler && !!e.ui_steps && e.ui_steps.length > 0;
5948
6031
  }
5949
6032
  //#endregion
5950
6033
  //#region src/lib/mass-edit.ts
5951
- function pc(e) {
6034
+ function hc(e) {
5952
6035
  if (!e) return [];
5953
6036
  let t = /* @__PURE__ */ new Set(), n = [];
5954
6037
  for (let r of e.split(",")) {
@@ -5957,17 +6040,17 @@ function pc(e) {
5957
6040
  }
5958
6041
  return n;
5959
6042
  }
5960
- function mc(e, t) {
6043
+ function gc(e, t) {
5961
6044
  if (!e || !Xe(e, "update")) return [];
5962
- let n = Array.isArray(t) ? t : pc(t), r = n.length > 0 ? new Set(n) : null, i = st(e), a = new Set(z(e)), o = r ? n : hc(e, i, a), s = [];
6045
+ let n = Array.isArray(t) ? t : hc(t), r = n.length > 0 ? new Set(n) : null, i = st(e), a = new Set(z(e)), o = r ? n : _c(e, i, a), s = [];
5963
6046
  for (let t of o) {
5964
6047
  if (r && !r.has(t)) continue;
5965
- let n = gc(e, t, i, a);
6048
+ let n = vc(e, t, i, a);
5966
6049
  n && s.push(n);
5967
6050
  }
5968
6051
  return s;
5969
6052
  }
5970
- function hc(e, t, n) {
6053
+ function _c(e, t, n) {
5971
6054
  let r = [];
5972
6055
  for (let [t, i] of e.fields) n.has(t) || i.auto || r.push(t);
5973
6056
  if (!t) {
@@ -5976,7 +6059,7 @@ function hc(e, t, n) {
5976
6059
  }
5977
6060
  return r;
5978
6061
  }
5979
- function gc(e, t, n, r) {
6062
+ function vc(e, t, n, r) {
5980
6063
  if (t.startsWith("$status.")) {
5981
6064
  if (n) return null;
5982
6065
  let r = t.slice(8), i = e.status_groups?.[r];
@@ -5984,7 +6067,7 @@ function gc(e, t, n, r) {
5984
6067
  code: t,
5985
6068
  bare: r,
5986
6069
  kind: "status",
5987
- label: _c(i.name, r),
6070
+ label: yc(i.name, r),
5988
6071
  statusGroup: i
5989
6072
  } : null;
5990
6073
  }
@@ -5995,7 +6078,7 @@ function gc(e, t, n, r) {
5995
6078
  code: t,
5996
6079
  bare: r,
5997
6080
  kind: "property",
5998
- label: _c(i.name, r),
6081
+ label: yc(i.name, r),
5999
6082
  property: i
6000
6083
  } : null;
6001
6084
  }
@@ -6005,18 +6088,18 @@ function gc(e, t, n, r) {
6005
6088
  code: t,
6006
6089
  bare: t,
6007
6090
  kind: "field",
6008
- label: _c(i.display?.name, t),
6091
+ label: yc(i.display?.name, t),
6009
6092
  field: i
6010
6093
  };
6011
6094
  }
6012
- function _c(e, t) {
6095
+ function yc(e, t) {
6013
6096
  return e && L(e) || t;
6014
6097
  }
6015
6098
  //#endregion
6016
6099
  //#region src/components/mass-edit/PropertyGridEditor.tsx
6017
- var vc = Symbol.for("declarion.mass-edit.multiple");
6018
- function yc({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange: i }) {
6019
- let a = d(() => mc(e, t), [e, t]), o = d(() => Object.keys(r).map((e) => {
6100
+ var bc = Symbol.for("declarion.mass-edit.multiple");
6101
+ function xc({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange: i }) {
6102
+ let a = d(() => gc(e, t), [e, t]), o = d(() => Object.keys(r).map((e) => {
6020
6103
  let t = a.find((t) => t.code === e);
6021
6104
  return t ? {
6022
6105
  target: t,
@@ -6026,8 +6109,8 @@ function yc({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
6026
6109
  let e = new Set(o.map((e) => e.target.code));
6027
6110
  return a.filter((t) => !e.has(t.code));
6028
6111
  }, [o, a]), l = s((e) => {
6029
- let t = wc(e, n), a = { ...r };
6030
- a[e.code] = t === vc ? void 0 : t, i(a);
6112
+ let t = Ec(e, n), a = { ...r };
6113
+ a[e.code] = t === bc ? void 0 : t, i(a);
6031
6114
  }, [
6032
6115
  r,
6033
6116
  n,
@@ -6055,12 +6138,12 @@ function yc({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
6055
6138
  },
6056
6139
  children: "No targets selected. Add a field, status, or property to edit across all selected rows."
6057
6140
  }),
6058
- o.map((e) => /* @__PURE__ */ b(bc, {
6141
+ o.map((e) => /* @__PURE__ */ b(Sc, {
6059
6142
  row: e,
6060
6143
  onChange: (t) => u(e.target.code, t),
6061
6144
  onRemove: () => f(e.target.code)
6062
6145
  }, e.target.code)),
6063
- /* @__PURE__ */ b(Cc, {
6146
+ /* @__PURE__ */ b(Tc, {
6064
6147
  targets: c,
6065
6148
  onPick: l
6066
6149
  })
@@ -6073,7 +6156,7 @@ function yc({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
6073
6156
  children: "Entity schema unavailable. Mass edit requires an entity-bound action."
6074
6157
  });
6075
6158
  }
6076
- function bc({ row: e, onChange: n, onRemove: r }) {
6159
+ function Sc({ row: e, onChange: n, onRemove: r }) {
6077
6160
  let { target: i } = e;
6078
6161
  return /* @__PURE__ */ x("div", {
6079
6162
  "data-testid": "mass-edit-row",
@@ -6092,7 +6175,7 @@ function bc({ row: e, onChange: n, onRemove: r }) {
6092
6175
  title: i.code,
6093
6176
  children: i.label
6094
6177
  }),
6095
- /* @__PURE__ */ b(xc, {
6178
+ /* @__PURE__ */ b(Cc, {
6096
6179
  row: e,
6097
6180
  onChange: n
6098
6181
  }),
@@ -6104,8 +6187,8 @@ function bc({ row: e, onChange: n, onRemove: r }) {
6104
6187
  ]
6105
6188
  });
6106
6189
  }
6107
- function xc({ row: e, onChange: t }) {
6108
- let { target: n } = e, r = hs(), i = e.value === vc, a = i ? "<multiple values>" : void 0, o = i ? "" : e.value;
6190
+ function Cc({ row: e, onChange: t }) {
6191
+ let { target: n } = e, r = _s(), i = e.value === bc, a = i ? "<multiple values>" : void 0, o = i ? "" : e.value;
6109
6192
  if (n.kind === "status" && n.statusGroup) {
6110
6193
  let e = n.statusGroup.statuses.map((e) => ({
6111
6194
  value: e.code,
@@ -6121,11 +6204,11 @@ function xc({ row: e, onChange: t }) {
6121
6204
  })
6122
6205
  });
6123
6206
  }
6124
- let s = Sc(n);
6207
+ let s = wc(n);
6125
6208
  return /* @__PURE__ */ x("div", {
6126
6209
  "data-testid": `value-${n.code}`,
6127
6210
  style: { position: "relative" },
6128
- children: [fs({
6211
+ children: [ms({
6129
6212
  field: s,
6130
6213
  fieldName: n.bare,
6131
6214
  value: o ?? "",
@@ -6144,7 +6227,7 @@ function xc({ row: e, onChange: t }) {
6144
6227
  })]
6145
6228
  });
6146
6229
  }
6147
- function Sc(e) {
6230
+ function wc(e) {
6148
6231
  if (e.kind === "field" && e.field) return e.field;
6149
6232
  if (e.kind === "property" && e.property) {
6150
6233
  let t = e.property;
@@ -6159,7 +6242,7 @@ function Sc(e) {
6159
6242
  }
6160
6243
  return { type: "string" };
6161
6244
  }
6162
- function Cc({ targets: e, onPick: n }) {
6245
+ function Tc({ targets: e, onPick: n }) {
6163
6246
  let [r, i] = p(!1);
6164
6247
  return e.length === 0 ? null : r ? /* @__PURE__ */ b("div", {
6165
6248
  "data-testid": "mass-edit-target-picker",
@@ -6186,7 +6269,7 @@ function Cc({ targets: e, onPick: n }) {
6186
6269
  children: [/* @__PURE__ */ b(t.plus, { size: 12 }), " Add target"]
6187
6270
  });
6188
6271
  }
6189
- function wc(e, t) {
6272
+ function Ec(e, t) {
6190
6273
  if (!t || t.length === 0 || e.kind !== "field") return;
6191
6274
  let n, r = !1;
6192
6275
  for (let i of t) {
@@ -6195,16 +6278,16 @@ function wc(e, t) {
6195
6278
  n = t, r = !0;
6196
6279
  continue;
6197
6280
  }
6198
- if (n !== t) return vc;
6281
+ if (n !== t) return bc;
6199
6282
  }
6200
6283
  return n;
6201
6284
  }
6202
6285
  //#endregion
6203
6286
  //#region src/components/shared/ActionDialog.tsx
6204
- var Tc = /^\$row\.([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)$/;
6205
- function Ec(e, t) {
6287
+ var Dc = /^\$row\.([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)$/;
6288
+ function Oc(e, t) {
6206
6289
  if (typeof e != "string") return e ?? "";
6207
- let n = e.match(Tc);
6290
+ let n = e.match(Dc);
6208
6291
  if (n) {
6209
6292
  let r = n[1].split("."), i = t;
6210
6293
  for (let e of r) {
@@ -6216,9 +6299,9 @@ function Ec(e, t) {
6216
6299
  }
6217
6300
  return i === void 0 ? ((t == null || !(r[0] in t)) && typeof console < "u" && console.warn && console.warn(`ActionDialog: prefill template ${e} could not be resolved; row is missing field '${r[0]}'`), "") : i ?? "";
6218
6301
  }
6219
- return ic(e, { row: t });
6302
+ return oc(e, { row: t });
6220
6303
  }
6221
- function Dc(e) {
6304
+ function kc(e) {
6222
6305
  return {
6223
6306
  type: e.type ?? "string",
6224
6307
  required: e.required,
@@ -6232,18 +6315,18 @@ function Dc(e) {
6232
6315
  ref: qe(e.ref)
6233
6316
  };
6234
6317
  }
6235
- function Oc(e, t) {
6318
+ function Ac(e, t) {
6236
6319
  if (!e.includes("${")) return e;
6237
- let n = ic(e, { params: t });
6320
+ let n = oc(e, { params: t });
6238
6321
  return n == null ? "" : I(n);
6239
6322
  }
6240
- var kc = /\$\{\s*([^}]+?)\s*\}/g;
6241
- function Ac(e, t) {
6323
+ var jc = /\$\{\s*([^}]+?)\s*\}/g;
6324
+ function Mc(e, t) {
6242
6325
  let n = `params.${t}`;
6243
- for (let t of e.matchAll(kc)) if (t[1] === n) return !0;
6326
+ for (let t of e.matchAll(jc)) if (t[1] === n) return !0;
6244
6327
  return !1;
6245
6328
  }
6246
- function jc({ param: e, value: t, onChange: n, statusGroups: r }) {
6329
+ function Nc({ param: e, value: t, onChange: n, statusGroups: r }) {
6247
6330
  let i = d(() => {
6248
6331
  let t = r ? Object.entries(r) : [];
6249
6332
  return [{
@@ -6261,12 +6344,12 @@ function jc({ param: e, value: t, onChange: n, statusGroups: r }) {
6261
6344
  placeholder: "Select status group…"
6262
6345
  });
6263
6346
  }
6264
- function Mc({ param: e, value: t, onChange: n, statusGroups: r, formData: i }) {
6347
+ function Pc({ param: e, value: t, onChange: n, statusGroups: r, formData: i }) {
6265
6348
  let a = d(() => {
6266
6349
  if (!r) return [];
6267
6350
  let t = e.filter?.status_group;
6268
6351
  if (t) {
6269
- let e = Oc(t, i);
6352
+ let e = Ac(t, i);
6270
6353
  return e && r[e] ? r[e].statuses : [];
6271
6354
  }
6272
6355
  return Object.values(r).flatMap((e) => e.statuses);
@@ -6288,8 +6371,8 @@ function Mc({ param: e, value: t, onChange: n, statusGroups: r, formData: i }) {
6288
6371
  placeholder: "Select status…"
6289
6372
  });
6290
6373
  }
6291
- function Nc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, isPending: o, row: c, bulkSelection: u }) {
6292
- let { data: m } = Y(), h = hs(), g = r.resolved_params, _ = r.resolved_hidden_defaults ?? {}, v = !!r.destructive, S = Ms(r, h), C = s(() => {
6374
+ function Fc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, isPending: o, row: c, bulkSelection: u }) {
6375
+ let { data: m } = Y(), h = _s(), g = r.resolved_params, _ = r.resolved_hidden_defaults ?? {}, v = !!r.destructive, S = Ps(r, h), C = s(() => {
6293
6376
  o || n(!1);
6294
6377
  }, [o, n]), w = f(null);
6295
6378
  l(() => {
@@ -6316,11 +6399,11 @@ function Nc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
6316
6399
  continue;
6317
6400
  }
6318
6401
  if (n.type === "bool") {
6319
- let r = Ec(n.default, c);
6402
+ let r = Oc(n.default, c);
6320
6403
  e[t] = r === !0 || r === "true";
6321
6404
  continue;
6322
6405
  }
6323
- e[t] = Ec(n.default, c);
6406
+ e[t] = Oc(n.default, c);
6324
6407
  }
6325
6408
  return e;
6326
6409
  }, [
@@ -6338,7 +6421,7 @@ function Nc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
6338
6421
  for (let [t, n] of g) {
6339
6422
  if (n.type !== "status") continue;
6340
6423
  let i = n.filter?.status_group;
6341
- i && Ac(i, e) && (r[t] = "");
6424
+ i && Mc(i, e) && (r[t] = "");
6342
6425
  }
6343
6426
  return r;
6344
6427
  });
@@ -6484,27 +6567,27 @@ function Nc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
6484
6567
  let r;
6485
6568
  if (t.type === "entity_patch") {
6486
6569
  let n = typeof t.filter?.targets == "string" ? t.filter.targets : void 0;
6487
- r = /* @__PURE__ */ b(yc, {
6570
+ r = /* @__PURE__ */ b(xc, {
6488
6571
  entity: k,
6489
6572
  filterTargets: n,
6490
6573
  selectedRows: u,
6491
6574
  value: j[e] ?? {},
6492
6575
  onChange: (t) => ee(e, t)
6493
6576
  });
6494
- } else r = t.type === "status_group" ? /* @__PURE__ */ b(jc, {
6577
+ } else r = t.type === "status_group" ? /* @__PURE__ */ b(Nc, {
6495
6578
  param: t,
6496
6579
  value: j[e],
6497
6580
  onChange: (t) => ee(e, t),
6498
6581
  statusGroups: E,
6499
6582
  formData: j
6500
- }) : t.type === "status" ? /* @__PURE__ */ b(Mc, {
6583
+ }) : t.type === "status" ? /* @__PURE__ */ b(Pc, {
6501
6584
  param: t,
6502
6585
  value: j[e],
6503
6586
  onChange: (t) => ee(e, t),
6504
6587
  statusGroups: E,
6505
6588
  formData: j
6506
- }) : fs({
6507
- field: Dc(t),
6589
+ }) : ms({
6590
+ field: kc(t),
6508
6591
  fieldName: e,
6509
6592
  value: j[e],
6510
6593
  mode: "edit",
@@ -6567,7 +6650,7 @@ function Nc({ open: e, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
6567
6650
  }
6568
6651
  //#endregion
6569
6652
  //#region src/components/shared/ActionResultDialog.tsx
6570
- function Pc({ open: e, onClose: n, display: r }) {
6653
+ function Ic({ open: e, onClose: n, display: r }) {
6571
6654
  let i = f(null);
6572
6655
  return l(() => {
6573
6656
  e && i.current?.focus();
@@ -6662,7 +6745,7 @@ function Pc({ open: e, onClose: n, display: r }) {
6662
6745
  gap: 12,
6663
6746
  overflowY: "auto"
6664
6747
  },
6665
- children: r.fields.map((e, t) => /* @__PURE__ */ b(Fc, { field: e }, t))
6748
+ children: r.fields.map((e, t) => /* @__PURE__ */ b(Lc, { field: e }, t))
6666
6749
  }),
6667
6750
  /* @__PURE__ */ x("div", {
6668
6751
  style: {
@@ -6685,7 +6768,7 @@ function Pc({ open: e, onClose: n, display: r }) {
6685
6768
  ]
6686
6769
  })] }) : null;
6687
6770
  }
6688
- function Fc({ field: e }) {
6771
+ function Lc({ field: e }) {
6689
6772
  let n = e.href ?? e.download_url ?? e.value, r = e.type === "download", i = r || e.type === "link", a = n ? Qr(n) : void 0, [o, s] = p(!1), [c, l] = p(null);
6690
6773
  async function u() {
6691
6774
  if (a) {
@@ -6815,7 +6898,7 @@ function Fc({ field: e }) {
6815
6898
  }
6816
6899
  //#endregion
6817
6900
  //#region src/components/shared/ActionRunner.tsx
6818
- function Ic(e) {
6901
+ function Rc(e) {
6819
6902
  if (!e || typeof e != "object") return { kind: "success" };
6820
6903
  let t = e, n = t.status, r = t.success?.length ?? 0, i = t.errors?.length ?? 0, a = t.skipped?.length ?? 0, o = t.errors?.[0]?.error;
6821
6904
  if (n === "partial") {
@@ -6830,15 +6913,15 @@ function Ic(e) {
6830
6913
  detail: "No items matched"
6831
6914
  } : n === "accepted" ? { kind: "accepted" } : { kind: "success" };
6832
6915
  }
6833
- function Lc(e) {
6916
+ function zc(e) {
6834
6917
  if (!e || typeof e != "object") return null;
6835
6918
  let t = e.result;
6836
6919
  if (!t || typeof t != "object") return null;
6837
6920
  let n = t.$display;
6838
6921
  return !n || typeof n != "object" ? null : n;
6839
6922
  }
6840
- function Rc(e) {
6841
- let t = Lc(e)?.fields;
6923
+ function Bc(e) {
6924
+ let t = zc(e)?.fields;
6842
6925
  if (!Array.isArray(t)) return null;
6843
6926
  for (let e of t) {
6844
6927
  if (e?.type !== "download") continue;
@@ -6850,12 +6933,12 @@ function Rc(e) {
6850
6933
  }
6851
6934
  return null;
6852
6935
  }
6853
- function zc(e) {
6936
+ function Vc(e) {
6854
6937
  if (!e || typeof e != "object") return;
6855
6938
  let t = e.result;
6856
6939
  !t || typeof t != "object" || "impersonation_session_id" in t && window.location.assign("/");
6857
6940
  }
6858
- function Bc(e) {
6941
+ function Hc(e) {
6859
6942
  if (e instanceof er) {
6860
6943
  let t = e.response.errors ?? [];
6861
6944
  if (t.length === 1) return {
@@ -6876,23 +6959,23 @@ function Bc(e) {
6876
6959
  detail: e instanceof Error ? e.message : String(e)
6877
6960
  };
6878
6961
  }
6879
- var Vc = i(null);
6880
- function Hc() {
6881
- let e = c(Vc);
6962
+ var Uc = i(null);
6963
+ function Wc() {
6964
+ let e = c(Uc);
6882
6965
  if (!e) throw Error("useActionRunner must be used within <ActionRunnerProvider>");
6883
6966
  return e;
6884
6967
  }
6885
- function Uc(e) {
6968
+ function Gc(e) {
6886
6969
  let t = {}, n = e.action?.resolved_hidden_defaults;
6887
6970
  if (n) for (let [e, r] of Object.entries(n)) r !== void 0 && (t[e] = r);
6888
6971
  return t;
6889
6972
  }
6890
- function Wc({ children: e }) {
6973
+ function Kc({ children: e }) {
6891
6974
  let t = Nr(), { data: n } = Y(), [r, i] = p(null), [a, o] = p(0), [c, l] = p(null), u = s((e) => {
6892
6975
  if (e?.progress_screen) return n?.screens[e.progress_screen]?.route;
6893
6976
  }, [n?.screens]), f = s((e, n, r, i, a) => {
6894
6977
  let o = () => {
6895
- let n = Gc(a), i = u(r), o = n ? `Job ${n} queued` : "Running in background";
6978
+ let n = qc(a), i = u(r), o = n ? `Job ${n} queued` : "Running in background";
6896
6979
  Z.success(`${e} started`, o, i ? { action: {
6897
6980
  label: "View",
6898
6981
  onClick: () => t(i)
@@ -6900,7 +6983,7 @@ function Wc({ children: e }) {
6900
6983
  };
6901
6984
  switch (i.kind) {
6902
6985
  case "success": {
6903
- let t = Rc(a), r = t ? { action: {
6986
+ let t = Bc(a), r = t ? { action: {
6904
6987
  label: "Download",
6905
6988
  onClick: () => {
6906
6989
  ti(t.url, t.filename).catch((e) => {
@@ -6935,16 +7018,16 @@ function Wc({ children: e }) {
6935
7018
  }
6936
7019
  if (t.kind !== "success" && t.kind !== "accepted") return;
6937
7020
  e.onSuccess?.(n);
6938
- let r = Lc(n);
6939
- r && l(r), zc(n);
7021
+ let r = zc(n);
7022
+ r && l(r), Vc(n);
6940
7023
  }, [m]), g = s((e) => {
6941
7024
  let t = e.action, n = e.longRunning ?? t?.long_running ?? !1, r = e.title || L(t?.display?.name) || "Action", a = async (i) => {
6942
7025
  o((e) => e + 1);
6943
7026
  try {
6944
- let a = await e.execute(i), o = Ic(a);
7027
+ let a = await e.execute(i), o = Rc(a);
6945
7028
  f(r, n, t, o, a), h(e, o, a);
6946
7029
  } catch (e) {
6947
- f(r, n, t, Bc(e));
7030
+ f(r, n, t, Hc(e));
6948
7031
  } finally {
6949
7032
  o((e) => Math.max(0, e - 1));
6950
7033
  }
@@ -6954,14 +7037,14 @@ function Wc({ children: e }) {
6954
7037
  icon: ""
6955
7038
  },
6956
7039
  destructive: !0
6957
- } : void 0), c = !!(t?.resolved_params && t.resolved_params.length > 0), l = Ns(s);
7040
+ } : void 0), c = !!(t?.resolved_params && t.resolved_params.length > 0), l = Fs(s);
6958
7041
  return s && (c || l) ? (i({
6959
7042
  id: Symbol(),
6960
7043
  opts: e,
6961
7044
  title: r,
6962
7045
  action: s,
6963
7046
  pending: !1
6964
- }), Promise.resolve()) : a(Uc(e));
7047
+ }), Promise.resolve()) : a(Gc(e));
6965
7048
  }, [f, h]), v = a > 0 || !!r?.pending, y = d(() => ({
6966
7049
  run: g,
6967
7050
  isRunning: v
@@ -6973,10 +7056,10 @@ function Wc({ children: e }) {
6973
7056
  pending: !0
6974
7057
  } : e), o((e) => e + 1);
6975
7058
  try {
6976
- let r = await n.opts.execute(e), o = Ic(r);
7059
+ let r = await n.opts.execute(e), o = Rc(r);
6977
7060
  f(n.title, s, a, o, r), h(n.opts, o, r), o.kind !== "partial" && i((e) => e?.id === t ? null : e);
6978
7061
  } catch (e) {
6979
- f(n.title, s, a, Bc(e));
7062
+ f(n.title, s, a, Hc(e));
6980
7063
  } finally {
6981
7064
  o((e) => Math.max(0, e - 1)), i((e) => e?.id === t ? {
6982
7065
  ...e,
@@ -6988,16 +7071,16 @@ function Wc({ children: e }) {
6988
7071
  f,
6989
7072
  h
6990
7073
  ]);
6991
- return /* @__PURE__ */ x(Vc.Provider, {
7074
+ return /* @__PURE__ */ x(Uc.Provider, {
6992
7075
  value: y,
6993
7076
  children: [
6994
7077
  e,
6995
- c && /* @__PURE__ */ b(Pc, {
7078
+ c && /* @__PURE__ */ b(Ic, {
6996
7079
  open: !0,
6997
7080
  onClose: () => l(null),
6998
7081
  display: c
6999
7082
  }),
7000
- r && S && /* @__PURE__ */ b(Nc, {
7083
+ r && S && /* @__PURE__ */ b(Fc, {
7001
7084
  open: !0,
7002
7085
  onOpenChange: (e) => {
7003
7086
  e || i(null);
@@ -7012,29 +7095,29 @@ function Wc({ children: e }) {
7012
7095
  ]
7013
7096
  });
7014
7097
  }
7015
- function Gc(e) {
7016
- return Kc(e) ?? Kc(e?.result);
7098
+ function qc(e) {
7099
+ return Jc(e) ?? Jc(e?.result);
7017
7100
  }
7018
- function Kc(e) {
7101
+ function Jc(e) {
7019
7102
  if (!e || typeof e != "object") return;
7020
7103
  let t = e, n = t.job_id ?? t.id;
7021
7104
  return typeof n == "string" ? n : void 0;
7022
7105
  }
7023
7106
  //#endregion
7024
7107
  //#region src/hooks/useCurrentScreen.tsx
7025
- var qc = i(void 0);
7026
- function Jc({ code: e, children: t }) {
7108
+ var Yc = i(void 0);
7109
+ function Xc({ code: e, children: t }) {
7027
7110
  let { data: n } = Y(), r = d(() => ({
7028
7111
  code: e,
7029
7112
  screen: n?.screens[e]
7030
7113
  }), [e, n]);
7031
- return /* @__PURE__ */ b(qc.Provider, {
7114
+ return /* @__PURE__ */ b(Yc.Provider, {
7032
7115
  value: r,
7033
7116
  children: t
7034
7117
  });
7035
7118
  }
7036
- function Yc() {
7037
- return c(qc);
7119
+ function Zc() {
7120
+ return c(Yc);
7038
7121
  }
7039
7122
  //#endregion
7040
- export { ii as $, ve as $n, Bt as $t, hs as A, Ye as An, Yn as At, xa as B, ke as Bn, Fn as Bt, Is as C, He as Cn, qn as Ct, qs as D, nt as Dn, ir as Dt, ys as E, Qe as En, Qn as Et, Ea as F, I as Fn, Pn as Ft, Pi as G, Fe as Gn, G as Gt, ca as H, ze as Hn, Nn as Ht, Q as I, Be as In, Hn as It, Oi as J, Re as Jn, gn as Jt, Mi as K, Te as Kn, q as Kt, ba as L, Ae as Ln, Bn as Lt, us as M, R as Mn, Wn as Mt, Ta as N, Ge as Nn, Un as Nt, bs as O, et as On, cr as Ot, Da as P, tt as Pn, jn as Pt, fi as Q, ue as Qn, zt as Qt, Ca as R, Ce as Rn, Vn as Rt, ks as S, Ke as Sn, $n as St, Fs as T, L as Tn, ur as Tt, sa as U, Le as Un, zn as Ut, ra as V, Pe as Vn, Mn as Vt, na as W, F as Wn, In as Wt, ki as X, xe as Xn, _n as Xt, Ai as Y, Se as Yn, vn as Yt, mi as Z, be as Zn, It as Zt, Ls as _, at as _n, nr as _t, vc as a, Ot as an, A as ar, Nr as at, xs as b, Xe as bn, Zn as bt, mc as c, bt as cn, D as cr, Mr as ct, fc as d, B as dn, Tr as dt, At as en, pe as er, ti as et, $s as f, lt as fn, Er as ft, Ps as g, it as gn, er as gt, Js as h, Ve as hn, hr as ht, Hc as i, wt as in, j as ir, Z as it, fs as j, rt as jn, Y as jt, ws as k, $e as kn, sr as kt, pc as l, gt as ln, Ar as lt, _s as m, ut as mn, wr as mt, Yc as n, Tt as nn, N as nr, Qr as nt, yc as o, vt as on, k as or, Fr as ot, vs as p, ct as pn, Cr as pt, ji as q, P as qn, J as qt, Wc as r, Ct as rn, se as rr, Yr as rt, wc as s, yt as sn, O as sr, Pr as st, Jc as t, kt as tn, ye as tr, ei as tt, sc as u, ht as un, Dr as ut, Zs as v, ot as vn, Jn as vt, Os as w, z as wn, Kn as wt, Ks as x, Ze as xn, lr as xt, Xs as y, Je as yn, Xn as yt, da as z, Ie as zn, Rn as zt };
7123
+ export { ii as $, ve as $n, Bt as $t, _s as A, Ye as An, Yn as At, Ca as B, ke as Bn, Fn as Bt, Rs as C, He as Cn, qn as Ct, Ys as D, nt as Dn, ir as Dt, xs as E, Qe as En, Qn as Et, Oa as F, I as Fn, Pn as Ft, Pi as G, Fe as Gn, G as Gt, ua as H, ze as Hn, Nn as Ht, Q as I, Be as In, Hn as It, Oi as J, Re as Jn, gn as Jt, Mi as K, Te as Kn, q as Kt, Sa as L, Ae as Ln, Bn as Lt, fs as M, R as Mn, Wn as Mt, Da as N, Ge as Nn, Un as Nt, Ss as O, et as On, cr as Ot, ka as P, tt as Pn, jn as Pt, fi as Q, ue as Qn, zt as Qt, Ta as R, Ce as Rn, Vn as Rt, js as S, Ke as Sn, $n as St, Ls as T, L as Tn, ur as Tt, la as U, Le as Un, zn as Ut, aa as V, Pe as Vn, Mn as Vt, ia as W, F as Wn, In as Wt, ki as X, xe as Xn, _n as Xt, Ai as Y, Se as Yn, vn as Yt, mi as Z, be as Zn, It as Zt, zs as _, at as _n, nr as _t, bc as a, Ot as an, A as ar, Nr as at, Cs as b, Xe as bn, Zn as bt, gc as c, bt as cn, D as cr, Mr as ct, mc as d, B as dn, Tr as dt, At as en, pe as er, ti as et, tc as f, lt as fn, Er as ft, Is as g, it as gn, er as gt, Xs as h, Ve as hn, hr as ht, Wc as i, wt as in, j as ir, Z as it, ms as j, rt as jn, Y as jt, Es as k, $e as kn, sr as kt, hc as l, gt as ln, Ar as lt, ys as m, ut as mn, wr as mt, Zc as n, Tt as nn, N as nr, Qr as nt, xc as o, vt as on, k as or, Fr as ot, bs as p, ct as pn, Cr as pt, ji as q, P as qn, J as qt, Kc as r, Ct as rn, se as rr, Yr as rt, Ec as s, yt as sn, O as sr, Pr as st, Xc as t, kt as tn, ye as tr, ei as tt, lc as u, ht as un, Dr as ut, $s as v, ot as vn, Jn as vt, As as w, z as wn, Kn as wt, Js as x, Ze as xn, lr as xt, Qs as y, Je as yn, Xn as yt, pa as z, Ie as zn, Rn as zt };