@baishuyun/ai-feat-utils 2.0.46 → 2.0.48

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.
@@ -10,18 +10,18 @@ const y = (e) => {
10
10
  console.error("invalid raw data");
11
11
  }
12
12
  return t || e.providerMetadata.raw.data;
13
- }, j = (e) => {
13
+ }, H = (e) => {
14
14
  if ((e == null ? void 0 : e.type) === "error")
15
15
  return !0;
16
16
  const t = y(e);
17
17
  return (t == null ? void 0 : t.type) === "agent-error";
18
- }, Oe = (e) => {
18
+ }, We = (e) => {
19
19
  const t = y(e);
20
20
  return (t == null ? void 0 : t.type) === "agent-fake-msg";
21
- }, Ie = (e) => (e == null ? void 0 : e.type) === "file", Pe = (e) => {
21
+ }, Be = (e) => (e == null ? void 0 : e.type) === "file", je = (e) => {
22
22
  const t = y(e);
23
23
  return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
24
- }, Le = (e) => {
24
+ }, Ue = (e) => {
25
25
  const t = y(e);
26
26
  if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
27
27
  return null;
@@ -32,32 +32,32 @@ const y = (e) => {
32
32
  } catch (r) {
33
33
  return console.error("invalid query result data"), null;
34
34
  }
35
- }, We = (e) => {
35
+ }, He = (e) => {
36
36
  if (!Array.isArray(e))
37
37
  return !1;
38
38
  for (const t of e)
39
39
  if ((t == null ? void 0 : t.type) === "file")
40
40
  return !0;
41
41
  return !1;
42
- }, Be = (e) => {
42
+ }, Ge = (e) => {
43
43
  const t = y(e);
44
44
  return (t == null ? void 0 : t.type) === "agent-loading";
45
- }, je = (e) => {
45
+ }, ze = (e) => {
46
46
  const t = y(e);
47
47
  return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
48
- }, Ue = (e) => {
49
- if (!j(e))
48
+ }, Qe = (e) => {
49
+ if (!H(e))
50
50
  return "";
51
51
  if (e != null && e.errorText)
52
52
  return e.errorText;
53
53
  const t = y(e);
54
54
  return (t == null ? void 0 : t.error) || "未知错误";
55
- }, He = (e) => {
55
+ }, Ye = (e) => {
56
56
  if (e != null && e.errorText)
57
57
  return e.errorText;
58
58
  const t = y(e);
59
59
  return (t == null ? void 0 : t.error) || "未知错误";
60
- }, M = "data-shadow-slot-injected", v = "host-clone", U = (e) => {
60
+ }, M = "data-shadow-slot-injected", v = "host-clone", G = (e) => {
61
61
  try {
62
62
  const t = new CSSStyleSheet();
63
63
  t.replaceSync(e);
@@ -78,13 +78,13 @@ ${a.join(`
78
78
  ${e}
79
79
  }`;
80
80
  }
81
- }, Ge = (e, t) => {
81
+ }, Ke = (e, t) => {
82
82
  if (e.querySelector(`[${M}]`)) return;
83
83
  const n = [], r = [], l = (o) => {
84
84
  if (o instanceof HTMLLinkElement) {
85
85
  const s = `@import url("${o.href}") layer(${v})`;
86
86
  n.push(o.media ? `${s} ${o.media};` : `${s};`);
87
- } else o instanceof HTMLStyleElement && r.push(U(o.textContent || ""));
87
+ } else o instanceof HTMLStyleElement && r.push(G(o.textContent || ""));
88
88
  };
89
89
  document.head.querySelectorAll("style").forEach(l), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(l);
90
90
  let a = t.parentNode;
@@ -97,7 +97,7 @@ ${e}
97
97
  ...r
98
98
  ].join(`
99
99
  `), e.appendChild(i);
100
- }, E = "data-bs-host-style", N = /* @__PURE__ */ new WeakMap(), A = (e, t) => e.replace(
100
+ }, E = "data-bs-host-style", C = /* @__PURE__ */ new WeakMap(), A = (e, t) => e.replace(
101
101
  /url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^\s)]*))\s*\)/gi,
102
102
  (n, r, l, a) => {
103
103
  var o;
@@ -109,18 +109,18 @@ ${e}
109
109
  return n;
110
110
  }
111
111
  }
112
- ), H = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), C = (e, t) => Array.from(e).map((n) => {
112
+ ), z = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), N = (e, t) => Array.from(e).map((n) => {
113
113
  if (n.type === 1) {
114
114
  const r = n, l = n.cssText.slice(n.cssText.indexOf("{"));
115
- return H(r.selectorText) + A(l, t);
115
+ return z(r.selectorText) + A(l, t);
116
116
  }
117
- return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + C(n.cssRules, t) + "}" : A(n.cssText, t);
117
+ return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + N(n.cssRules, t) + "}" : A(n.cssText, t);
118
118
  }).join(`
119
119
  `), q = (e) => {
120
120
  var r, l;
121
121
  const t = e.nodeType === 9 ? e : e.ownerDocument, n = [];
122
122
  if (e.nodeType === 9 && t.body) {
123
- const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((m) => m.startsWith("--")), s = [...i, ...o].map((m) => `${m}:${a.getPropertyValue(m)};`).join("");
123
+ const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((p) => p.startsWith("--")), s = [...i, ...o].map((p) => `${p}:${a.getPropertyValue(p)};`).join("");
124
124
  n.push({ source: t, css: `:host {display:contents;${s}}`, media: "", nonce: "", classes: `${t.documentElement.className} ${t.body.className}` });
125
125
  }
126
126
  for (const a of Array.from(e.querySelectorAll('style,link[rel~="stylesheet"]'))) {
@@ -128,7 +128,7 @@ ${e}
128
128
  const i = a.media || "", o = a.nonce || "";
129
129
  try {
130
130
  if (a.sheet) {
131
- n.push({ source: a, css: C(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
131
+ n.push({ source: a, css: N(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
132
132
  continue;
133
133
  }
134
134
  } catch (s) {
@@ -140,10 +140,10 @@ ${e}
140
140
  a.tagName === "LINK" ? n.push({ source: a, href: a.href, media: i, nonce: o }) : n.push({ source: a, css: A(a.textContent || "", a.baseURI), media: i, nonce: o });
141
141
  }
142
142
  for (const a of Array.from(e.adoptedStyleSheets || []))
143
- a.disabled || n.push({ source: a, css: C(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
143
+ a.disabled || n.push({ source: a, css: N(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
144
144
  return ((l = n[0]) == null ? void 0 : l.source) === t && n.push(n.shift()), n;
145
- }, G = (e) => {
146
- const t = N.get(e);
145
+ }, Q = (e) => {
146
+ const t = C.get(e);
147
147
  if (t) return t;
148
148
  const n = e.nodeType === 9 ? e : e.ownerDocument;
149
149
  let r = q(e), l = !1;
@@ -164,53 +164,53 @@ ${e}
164
164
  }) && o();
165
165
  });
166
166
  s.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["href", "rel", "media", "disabled", "class", "style"] }), e.addEventListener("load", o, !0);
167
- const m = n.defaultView.setInterval(i, 1e3), d = {
167
+ const p = n.defaultView.setInterval(i, 1e3), d = {
168
168
  read: () => r,
169
169
  refresh: o,
170
170
  subscribe(u) {
171
171
  return a.add(u), () => {
172
- a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(m), N.delete(e));
172
+ a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(p), C.delete(e));
173
173
  };
174
174
  }
175
175
  };
176
- return N.set(e, d), d;
177
- }, ze = (e, t) => {
176
+ return C.set(e, d), d;
177
+ }, Xe = (e, t) => {
178
178
  const n = [t.ownerDocument];
179
179
  let r = t.getRootNode();
180
180
  for (; r.nodeType === 11 && "host" in r; ) {
181
181
  const d = r;
182
182
  d.host.getAttribute("data-bs-style-mode") !== "sdk" && n.splice(1, 0, d), r = d.host.getRootNode();
183
183
  }
184
- const l = n.map(G), a = t.ownerDocument.createComment("host styles");
184
+ const l = n.map(Q), a = t.ownerDocument.createComment("host styles");
185
185
  e.prepend(a);
186
186
  const i = /* @__PURE__ */ new Map(), o = () => {
187
187
  var x;
188
- const d = l.reduce((p, f) => p.concat(f.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
188
+ const d = l.reduce((f, g) => f.concat(g.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
189
189
  u && u.className !== c && (u.className = c);
190
- const b = new Set(d.map((p) => p.source));
191
- for (const [p, f] of i) b.has(p) || (f.remove(), i.delete(p));
190
+ const b = new Set(d.map((f) => f.source));
191
+ for (const [f, g] of i) b.has(f) || (g.remove(), i.delete(f));
192
192
  let h = a;
193
- for (const p of d) {
194
- let f = i.get(p.source);
195
- const B = p.href ? "LINK" : "STYLE";
196
- if (f && f.tagName !== B && (f.remove(), i.delete(p.source), f = void 0), f || (f = t.ownerDocument.createElement(p.href ? "link" : "style"), f.setAttribute(E, ""), i.set(p.source, f)), f.media = p.media, f.nonce = p.nonce, p.href) {
197
- const k = f;
198
- k.rel = "stylesheet", k.href !== p.href && (k.href = p.href);
199
- } else f.textContent !== p.css && (f.textContent = p.css || "");
200
- h.nextSibling !== f && h.after(f), h = f;
193
+ for (const f of d) {
194
+ let g = i.get(f.source);
195
+ const U = f.href ? "LINK" : "STYLE";
196
+ if (g && g.tagName !== U && (g.remove(), i.delete(f.source), g = void 0), g || (g = t.ownerDocument.createElement(f.href ? "link" : "style"), g.setAttribute(E, ""), i.set(f.source, g)), g.media = f.media, g.nonce = f.nonce, f.href) {
197
+ const k = g;
198
+ k.rel = "stylesheet", k.href !== f.href && (k.href = f.href);
199
+ } else g.textContent !== f.css && (g.textContent = f.css || "");
200
+ h.nextSibling !== g && h.after(g), h = g;
201
201
  }
202
202
  }, s = l.map((d) => d.subscribe(o));
203
203
  o();
204
- const m = new MutationObserver((d) => {
204
+ const p = new MutationObserver((d) => {
205
205
  d.some((u) => {
206
206
  const c = u.target.nodeType === 1 ? u.target : u.target.parentElement;
207
207
  return c && !c.closest("style,link");
208
208
  }) && l.forEach((u) => u.refresh());
209
209
  });
210
- return m.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
- m.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
210
+ return p.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
+ p.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
212
212
  };
213
- }, F = "data-bs-font-faces", z = 5, Qe = (e, t) => {
213
+ }, F = "data-bs-font-faces", Y = 5, Ze = (e, t) => {
214
214
  if (e.querySelector(`[${F}]`)) return;
215
215
  const n = t.ownerDocument, r = [];
216
216
  for (const a of Array.from(n.styleSheets)) {
@@ -222,22 +222,22 @@ ${e}
222
222
  }
223
223
  const o = a.href || n.baseURI;
224
224
  for (const s of Array.from(i))
225
- s.type === z && r.push(A(s.cssText, o));
225
+ s.type === Y && r.push(A(s.cssText, o));
226
226
  }
227
227
  if (!r.length) return;
228
228
  const l = n.createElement("style");
229
229
  l.setAttribute(F, ""), l.textContent = r.join(`
230
230
  `), e.prepend(l);
231
231
  };
232
- function Q(e) {
232
+ function K(e) {
233
233
  return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
234
234
  }
235
- function Y(e) {
235
+ function X(e) {
236
236
  return Array.isArray(e) ? e.every(
237
237
  (t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
238
238
  ) : !1;
239
239
  }
240
- const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ") : e, K = /* @__PURE__ */ new Set([
240
+ const Ve = (e) => K(e) ? e.join(", ") : X(e) ? e.map((n) => n.value).join(", ") : e, Z = /* @__PURE__ */ new Set([
241
241
  "password",
242
242
  "textarea",
243
243
  "datetime",
@@ -248,16 +248,16 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
248
248
  "combocheck",
249
249
  "checkboxgroup",
250
250
  "number"
251
- ]), Ke = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? K.has(t.widget.type) : !1) : [], V = (e) => (t) => {
251
+ ]), Je = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? Z.has(t.widget.type) : !1) : [], V = (e) => (t) => {
252
252
  const n = y(t);
253
253
  return (n == null ? void 0 : n.type) === e;
254
- }, Ve = (e) => (t) => {
254
+ }, et = (e) => (t) => {
255
255
  const n = t, r = n == null ? void 0 : n.part;
256
256
  return V(e)(r);
257
- }, Xe = (e) => (t) => {
257
+ }, tt = (e) => (t) => {
258
258
  const n = y(t);
259
259
  return (n == null ? void 0 : n.type) !== e ? null : (n == null ? void 0 : n.field) || null;
260
- }, Ze = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Je = (e) => {
260
+ }, nt = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], rt = (e) => {
261
261
  if (typeof e != "string")
262
262
  return e;
263
263
  try {
@@ -265,14 +265,14 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
265
265
  } catch (t) {
266
266
  return console.info("[safeParseJson] Failed to parse JSON:", t), null;
267
267
  }
268
- }, R = (e) => !!(e && typeof e == "object" && e.qnKey), et = (e) => {
268
+ }, R = (e) => !!(e && typeof e == "object" && e.qnKey), at = (e) => {
269
269
  var r, l;
270
270
  const t = (r = e == null ? void 0 : e.widget) == null ? void 0 : r.value, n = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.type;
271
271
  return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 : n === "signature" ? R(t) : n === "upload" || n === "image" ? Array.isArray(t) && t.length > 0 && t.every(R) : !0;
272
- }, X = (e = "_widget_") => {
272
+ }, J = (e = "_widget_") => {
273
273
  const t = Date.now(), n = String(t), r = n.length, l = n.slice(0, r - 5), a = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
274
274
  return `${e}${l}${a}`;
275
- }, tt = (e, t) => ({
275
+ }, lt = (e, t) => ({
276
276
  field: e,
277
277
  onLoaded: () => {
278
278
  t.fillWidget({
@@ -289,13 +289,13 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
289
289
  };
290
290
  t.fillWidget(i);
291
291
  }
292
- }), nt = 10, rt = (e, t = "image/png") => new Promise((n) => {
292
+ }), it = 10, ot = (e, t = "image/png") => new Promise((n) => {
293
293
  const r = new Image();
294
294
  r.crossOrigin = "anonymous", r.onload = () => {
295
295
  const l = document.createElement("canvas");
296
296
  l.width = r.naturalWidth, l.height = r.naturalHeight, l.getContext("2d").drawImage(r, 0, 0), n(l.toDataURL(t));
297
297
  }, r.onerror = () => n(e), r.src = e;
298
- }), Z = {
298
+ }), ee = {
299
299
  eq: "等于",
300
300
  neq: "不等于",
301
301
  gt: "大于",
@@ -312,7 +312,7 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
312
312
  range: "选择范围",
313
313
  like: "模糊匹配",
314
314
  unlike: "模糊不匹配"
315
- }, J = {
315
+ }, te = {
316
316
  usergroup: { in: "包含任意一个" },
317
317
  deptgroup: { in: "包含任意一个" },
318
318
  checkboxgroup: { in: "包含任意一个" },
@@ -320,12 +320,12 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
320
320
  address: { in: "属于", nin: "不属于" },
321
321
  location: { in: "包含", nin: "不包含" }
322
322
  };
323
- function at(e, t) {
323
+ function st(e, t) {
324
324
  var r, l;
325
- const n = t ? J[t] : void 0;
326
- return (l = (r = n == null ? void 0 : n[e]) != null ? r : Z[e]) != null ? l : e;
325
+ const n = t ? te[t] : void 0;
326
+ return (l = (r = n == null ? void 0 : n[e]) != null ? r : ee[e]) != null ? l : e;
327
327
  }
328
- const ee = {
328
+ const ne = {
329
329
  // Text-like: equality, fuzzy, empty checks
330
330
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
331
331
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -369,7 +369,7 @@ const ee = {
369
369
  button: [],
370
370
  subform: [],
371
371
  unknown: []
372
- }, te = {
372
+ }, re = {
373
373
  text: "eq",
374
374
  password: "eq",
375
375
  radiogroup: "eq",
@@ -397,21 +397,21 @@ const ee = {
397
397
  dataload: "eq",
398
398
  formula: "eq"
399
399
  };
400
- function lt(e) {
400
+ function ut(e) {
401
401
  var t;
402
- return e ? (t = ee[e]) != null ? t : [] : [];
402
+ return e ? (t = ne[e]) != null ? t : [] : [];
403
403
  }
404
- function it(e) {
404
+ function dt(e) {
405
405
  var t;
406
- return e && (t = te[e]) != null ? t : "eq";
406
+ return e && (t = re[e]) != null ? t : "eq";
407
407
  }
408
- function S(e) {
408
+ function w(e) {
409
409
  return typeof e == "object" && e !== null && !Array.isArray(e);
410
410
  }
411
- function L(e) {
412
- return S(e) ? e : null;
411
+ function B(e) {
412
+ return w(e) ? e : null;
413
413
  }
414
- function D(e) {
414
+ function T(e) {
415
415
  return !!(e == null || e === "" || e === "{}" || Array.isArray(e) && e.length === 0);
416
416
  }
417
417
  function _(e, t) {
@@ -420,13 +420,13 @@ function _(e, t) {
420
420
  const n = e.map(String).sort(), r = t.map(String).sort();
421
421
  return n.every((l, a) => l === r[a]);
422
422
  }
423
- if (S(e) && S(t)) {
423
+ if (w(e) && w(t)) {
424
424
  const n = Object.keys(e), r = Object.keys(t);
425
425
  return n.length !== r.length ? !1 : n.every((l) => String(e[l]) === String(t[l]));
426
426
  }
427
427
  return String(e) === String(t);
428
428
  }
429
- function T(e) {
429
+ function D(e) {
430
430
  if (e == null) return null;
431
431
  let t = null;
432
432
  if (e instanceof Date)
@@ -440,71 +440,102 @@ function T(e) {
440
440
  return n ? `${n[1]}-${n[2].padStart(2, "0")}-${n[3].padStart(2, "0")}` : null;
441
441
  }
442
442
  function $(e, t) {
443
- const n = T(e), r = T(t);
443
+ const n = D(e), r = D(t);
444
444
  return n !== null && r !== null ? n === r : _(e, t);
445
445
  }
446
446
  function O(e, t) {
447
- if (S(t)) {
448
- const r = L(e);
447
+ if (w(t)) {
448
+ const r = B(e);
449
449
  return !(!r || t.province !== void 0 && String(r.province) !== String(t.province) || t.city !== void 0 && String(r.city) !== String(t.city) || t.district !== void 0 && String(r.district) !== String(t.district));
450
450
  }
451
451
  const n = Array.isArray(t) ? t.map(String) : [];
452
452
  return Array.isArray(e) ? e.some((r) => n.includes(String(r))) : n.includes(String(e));
453
453
  }
454
- function ne(e, t) {
454
+ function ae(e, t) {
455
455
  const n = Array.isArray(t) ? t.map(String) : [];
456
456
  if (n.length === 0) return !1;
457
457
  const r = Array.isArray(e) ? e.map(String) : [];
458
458
  return n.every((l) => r.includes(l));
459
459
  }
460
- function re(e, t) {
461
- const n = L(t);
460
+ function le(e, t) {
461
+ const n = B(t);
462
462
  if (!n) return !1;
463
463
  const r = Number(e);
464
464
  return !(isNaN(r) || n.min !== void 0 && n.min !== null && r < Number(n.min) || n.max !== void 0 && n.max !== null && r > Number(n.max));
465
465
  }
466
- const ae = (e, t) => t === "user" ? e._id : e;
467
- function le(e, t) {
468
- var m, d, u;
469
- const n = (m = e.field.widget) == null ? void 0 : m.widgetName;
470
- if (!n) return !1;
471
- const r = (d = e.field.widget) == null ? void 0 : d.type, l = t[n], a = ae(l, r), { operator: i, value: o } = e, s = ((u = e.field.widget) == null ? void 0 : u.type) === "datetime";
472
- switch (i) {
466
+ const ie = (e, t) => t === "user" ? e == null ? void 0 : e._id : e;
467
+ function oe(e) {
468
+ return w(e) && "data" in e && "widgetType" in e;
469
+ }
470
+ function I(e, t) {
471
+ const n = [];
472
+ for (const r of e)
473
+ if (w(r) && t in r) {
474
+ const l = r[t];
475
+ n.push(oe(l) ? l.data : l);
476
+ }
477
+ return n;
478
+ }
479
+ function se(e, t) {
480
+ if (e.includes(".")) {
481
+ const [n, r] = e.split("."), l = t[n];
482
+ return Array.isArray(l) ? I(l, r) : [];
483
+ }
484
+ if (e in t)
485
+ return [t[e]];
486
+ for (const n of Object.values(t)) {
487
+ if (!Array.isArray(n)) continue;
488
+ const r = I(n, e);
489
+ if (r.length > 0) return r;
490
+ }
491
+ return [];
492
+ }
493
+ function P(e, t) {
494
+ var o;
495
+ const n = (o = t.field.widget) == null ? void 0 : o.type, r = ie(e, n), { operator: l, value: a } = t, i = n === "datetime";
496
+ switch (l) {
473
497
  case "empty":
474
- return D(a);
498
+ return T(r);
475
499
  case "not_empty":
476
- return !D(a);
500
+ return !T(r);
477
501
  case "eq":
478
- return s ? $(a, o) : _(a, o);
502
+ return i ? $(r, a) : _(r, a);
479
503
  case "neq":
480
- return s ? !$(a, o) : !_(a, o);
504
+ return i ? !$(r, a) : !_(r, a);
481
505
  case "contains":
482
506
  case "like":
483
- return String(a).includes(String(o));
507
+ return String(r).includes(String(a));
484
508
  case "not_contains":
485
509
  case "unlike":
486
- return !String(a).includes(String(o));
510
+ return !String(r).includes(String(a));
487
511
  case "gt":
488
- return Number(a) > Number(o);
512
+ return Number(r) > Number(a);
489
513
  case "gte":
490
- return Number(a) >= Number(o);
514
+ return Number(r) >= Number(a);
491
515
  case "lt":
492
- return Number(a) < Number(o);
516
+ return Number(r) < Number(a);
493
517
  case "lte":
494
- return Number(a) <= Number(o);
518
+ return Number(r) <= Number(a);
495
519
  case "in":
496
- return O(a, o);
520
+ return O(r, a);
497
521
  case "nin":
498
- return !O(a, o);
522
+ return !O(r, a);
499
523
  case "all":
500
- return ne(a, o);
524
+ return ae(r, a);
501
525
  case "range":
502
- return re(a, o);
526
+ return le(r, a);
503
527
  default:
504
528
  return !1;
505
529
  }
506
530
  }
507
- function ot(e, t) {
531
+ function ue(e, t) {
532
+ var l;
533
+ const n = (l = e.field.widget) == null ? void 0 : l.widgetName;
534
+ if (!n) return !1;
535
+ const r = se(n, t);
536
+ return r.length === 0 ? P(void 0, e) : r.some((a) => P(a, e));
537
+ }
538
+ function ct(e, t) {
508
539
  if (!t || !(t != null && t.length))
509
540
  return !1;
510
541
  const n = e.formFieldEditPreference;
@@ -516,17 +547,17 @@ function ot(e, t) {
516
547
  return r.has((a = l == null ? void 0 : l.widget) == null ? void 0 : a.widgetName);
517
548
  });
518
549
  }
519
- function st(e, t) {
550
+ function mt(e, t) {
520
551
  if (!e.enabled)
521
552
  return !1;
522
553
  const n = e.triggerCondition;
523
554
  if (!n) return !0;
524
555
  const { items: r, quantifier: l } = n;
525
556
  if (!r || r.length === 0) return !0;
526
- const a = r.map((i) => le(i, t));
557
+ const a = r.map((i) => ue(i, t));
527
558
  return l === "any" ? a.some((i) => i) : a.every((i) => i);
528
559
  }
529
- const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", ie = {
560
+ const gt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", de = {
530
561
  eq: "eq",
531
562
  neq: "ne",
532
563
  gt: "gt",
@@ -543,7 +574,7 @@ const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
543
574
  empty: "empty",
544
575
  not_empty: "not_empty",
545
576
  range: "range"
546
- }, oe = {
577
+ }, ce = {
547
578
  eq: "eq",
548
579
  ne: "neq",
549
580
  gt: "gt",
@@ -561,13 +592,13 @@ const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
561
592
  not_empty: "not_empty",
562
593
  range: "range"
563
594
  };
564
- function dt(e) {
595
+ function ft(e) {
565
596
  const t = e.quantifier === "any" ? "or" : "and", n = e.items.map((r) => {
566
- var i, o, s, m, d, u;
567
- const l = (i = ie[r.operator]) != null ? i : "eq";
597
+ var i, o, s, p, d, u;
598
+ const l = (i = de[r.operator]) != null ? i : "eq";
568
599
  let a;
569
- return r.operator === "range" && S(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
570
- field: (m = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? m : "",
600
+ return r.operator === "range" && w(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
601
+ field: (p = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? p : "",
571
602
  method: l,
572
603
  value: a,
573
604
  type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
@@ -575,10 +606,10 @@ function dt(e) {
575
606
  });
576
607
  return JSON.stringify({ rel: t, cond: n });
577
608
  }
578
- function ct(e) {
609
+ function pt(e) {
579
610
  const t = JSON.parse(e), n = t.rel === "or" ? "any" : "all", r = t.cond.map((l, a) => {
580
- var s, m;
581
- const i = (s = oe[l.method]) != null ? s : "eq";
611
+ var s, p;
612
+ const i = (s = ce[l.method]) != null ? s : "eq";
582
613
  let o = l.value;
583
614
  return i === "range" ? o = { min: l.value[0], max: l.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (o = l.value[0]), {
584
615
  id: `${l.field}_${a}`,
@@ -586,7 +617,7 @@ function ct(e) {
586
617
  label: l.field,
587
618
  widget: {
588
619
  widgetName: l.field,
589
- type: (m = l.type) != null ? m : "unknown",
620
+ type: (p = l.type) != null ? p : "unknown",
590
621
  value: void 0
591
622
  }
592
623
  },
@@ -596,23 +627,23 @@ function ct(e) {
596
627
  });
597
628
  return { targetName: "", quantifier: n, items: r };
598
629
  }
599
- function gt(e) {
630
+ function bt(e) {
600
631
  const t = (n) => String(n).padStart(2, "0");
601
632
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
602
633
  }
603
- function mt(e, t, n = 1) {
634
+ function yt(e, t, n = 1) {
604
635
  const r = [], l = [];
605
636
  for (const a of e)
606
637
  t(a) ? l.push(a) : (l.length > 0 && (r.push(l.length >= n ? [...l] : l[0]), l.length = 0), r.push(a));
607
638
  return l.length > 0 && r.push(l.length >= 2 ? [...l] : l[0]), r;
608
639
  }
609
- function W(e) {
640
+ function j(e) {
610
641
  const t = [];
611
642
  for (const n of e)
612
- Array.isArray(n) ? t.push(...W(n)) : t.push(n);
643
+ Array.isArray(n) ? t.push(...j(n)) : t.push(n);
613
644
  return t;
614
645
  }
615
- const se = {
646
+ const me = {
616
647
  projectdevelopment: "e914",
617
648
  resourcelibrary: "e915",
618
649
  Plugin2: "e90e",
@@ -1019,11 +1050,11 @@ const se = {
1019
1050
  Automation1: "ea95",
1020
1051
  Avatar: "ea96"
1021
1052
  };
1022
- function ft(e) {
1023
- const t = se[e];
1053
+ function ht(e) {
1054
+ const t = me[e];
1024
1055
  return t ? `&#x${t};` : void 0;
1025
1056
  }
1026
- const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, bt = (e, t, n) => {
1057
+ const wt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, St = (e, t, n) => {
1027
1058
  if (!n)
1028
1059
  return {
1029
1060
  translated: ""
@@ -1040,15 +1071,15 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1040
1071
  const l = [], a = e.replace(
1041
1072
  /\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
1042
1073
  (i, o, s) => {
1043
- const m = !!o, { translated: d, meta: u } = n(s, m);
1074
+ const p = !!o, { translated: d, meta: u } = n(s, p);
1044
1075
  return u && l.push(u), d;
1045
1076
  }
1046
1077
  );
1047
1078
  return {
1048
- meta: l.length ? W(l) : null,
1079
+ meta: l.length ? j(l) : null,
1049
1080
  translated: (a != null ? a : "").trim()
1050
1081
  };
1051
- }, ue = {
1082
+ }, ge = {
1052
1083
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
1053
1084
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
1054
1085
  邮政编码: "^\\d{6}$",
@@ -1060,8 +1091,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1060
1091
  二维码图片: "qrcode",
1061
1092
  条形码图片: "barcode",
1062
1093
  自定义: "custom"
1063
- }, I = (e) => {
1064
- const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = ue[n] || "";
1094
+ }, L = (e) => {
1095
+ const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = ge[n] || "";
1065
1096
  return {
1066
1097
  widget: {
1067
1098
  widgetName: `_widget_${Date.now()}`,
@@ -1109,18 +1140,18 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1109
1140
  tab: null,
1110
1141
  ...l
1111
1142
  };
1112
- }, g = (e = "_widget", t) => {
1143
+ }, m = (e = "_widget", t) => {
1113
1144
  const n = `${e}_${Date.now()}`;
1114
1145
  if (t === void 0)
1115
1146
  return n;
1116
1147
  const r = t.toString().length;
1117
1148
  return `${n.slice(0, -r)}${t}`;
1118
- }, de = (e) => {
1149
+ }, fe = (e) => {
1119
1150
  const { widget: t, label: n, ...r } = e || {};
1120
1151
  return {
1121
1152
  widget: {
1122
1153
  type: "number",
1123
- widgetName: g(),
1154
+ widgetName: m(),
1124
1155
  widgetNameAlias: "",
1125
1156
  triggerEvent: !1,
1126
1157
  customCls: null,
@@ -1180,7 +1211,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1180
1211
  tab: null,
1181
1212
  ...r
1182
1213
  };
1183
- }, ce = (e) => {
1214
+ }, pe = (e) => {
1184
1215
  const { widget: t, label: n, ...r } = e || {};
1185
1216
  return {
1186
1217
  widget: {
@@ -1217,7 +1248,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1217
1248
  tab: null,
1218
1249
  ...r
1219
1250
  };
1220
- }, P = (e) => {
1251
+ }, W = (e) => {
1221
1252
  const { widget: t, label: n, ...r } = e || {};
1222
1253
  return {
1223
1254
  widget: {
@@ -1253,7 +1284,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1253
1284
  ...r,
1254
1285
  labelStyle: n
1255
1286
  };
1256
- }, ge = (e) => {
1287
+ }, be = (e) => {
1257
1288
  const { widget: t, label: n, ...r } = e || {};
1258
1289
  return {
1259
1290
  widget: {
@@ -1320,12 +1351,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1320
1351
  tab: null,
1321
1352
  ...r
1322
1353
  };
1323
- }, w = (e) => e, me = (e) => {
1354
+ }, S = (e) => e, ye = (e) => {
1324
1355
  const { widget: t, label: n, ...r } = e || {};
1325
1356
  return {
1326
1357
  widget: {
1327
1358
  type: "deptgroup",
1328
- widgetName: g(),
1359
+ widgetName: m(),
1329
1360
  widgetNameAlias: "",
1330
1361
  customCls: null,
1331
1362
  height: "34",
@@ -1354,12 +1385,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1354
1385
  tab: null,
1355
1386
  ...r
1356
1387
  };
1357
- }, fe = (e) => {
1388
+ }, he = (e) => {
1358
1389
  const { widget: t, label: n, ...r } = e || {};
1359
1390
  return {
1360
1391
  widget: {
1361
1392
  type: "sn",
1362
- widgetName: g(),
1393
+ widgetName: m(),
1363
1394
  widgetNameAlias: "",
1364
1395
  triggerEvent: 0,
1365
1396
  customCls: null,
@@ -1391,12 +1422,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1391
1422
  tab: null,
1392
1423
  ...r
1393
1424
  };
1394
- }, pe = (e) => {
1425
+ }, we = (e) => {
1395
1426
  const { widget: t, label: n, ...r } = e || {};
1396
1427
  return {
1397
1428
  widget: {
1398
1429
  type: "dept",
1399
- widgetName: g(),
1430
+ widgetName: m(),
1400
1431
  widgetNameAlias: "",
1401
1432
  customCls: null,
1402
1433
  height: "34",
@@ -1425,12 +1456,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1425
1456
  tab: null,
1426
1457
  ...r
1427
1458
  };
1428
- }, be = (e) => {
1459
+ }, Se = (e) => {
1429
1460
  const { widget: t, label: n, ...r } = e || {};
1430
1461
  return {
1431
1462
  widget: {
1432
1463
  type: "usergroup",
1433
- widgetName: g(),
1464
+ widgetName: m(),
1434
1465
  widgetNameAlias: "",
1435
1466
  customCls: null,
1436
1467
  height: "34",
@@ -1462,11 +1493,11 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1462
1493
  tab: null,
1463
1494
  ...r
1464
1495
  };
1465
- }, ye = (e) => {
1496
+ }, ve = (e) => {
1466
1497
  const { widget: t, label: n, ...r } = e || {};
1467
1498
  return {
1468
1499
  widget: {
1469
- widgetName: g(),
1500
+ widgetName: m(),
1470
1501
  widgetNameAlias: "",
1471
1502
  customCls: null,
1472
1503
  enable: !0,
@@ -1490,7 +1521,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1490
1521
  tab: null,
1491
1522
  ...r
1492
1523
  };
1493
- }, he = (e) => !e || !e.length ? e : e.map((t, n) => ({
1524
+ }, Ae = (e) => !e || !e.length ? e : e.map((t, n) => ({
1494
1525
  id: n,
1495
1526
  // name: "_widget_1761976674767",
1496
1527
  // form: "a2f34ef882158a3e97da4ef7",
@@ -1502,16 +1533,16 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1502
1533
  isEditable: !0,
1503
1534
  group: "dimension,filter,select",
1504
1535
  formula: ""
1505
- })), we = (e) => !e || !e.length ? e : e.map((t) => ({
1536
+ })), ke = (e) => !e || !e.length ? e : e.map((t) => ({
1506
1537
  mode: "depend",
1507
1538
  ...t
1508
- })), Se = (e) => {
1539
+ })), Ce = (e) => {
1509
1540
  var l, a, i;
1510
1541
  const { widget: t, label: n, ...r } = e || {};
1511
1542
  return {
1512
1543
  widget: {
1513
1544
  type: "dataload",
1514
- widgetName: g(),
1545
+ widgetName: m(),
1515
1546
  widgetNameAlias: "",
1516
1547
  customCls: null,
1517
1548
  width: 350,
@@ -1547,8 +1578,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1547
1578
  forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
1548
1579
  selectArg: [],
1549
1580
  selectRel: "and",
1550
- fields: he((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1551
- mapFields: we((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1581
+ fields: Ae((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1582
+ mapFields: ke((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1552
1583
  },
1553
1584
  labelStyle: n
1554
1585
  },
@@ -1557,12 +1588,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1557
1588
  tab: null,
1558
1589
  ...r
1559
1590
  };
1560
- }, ve = (e) => {
1591
+ }, Ne = (e) => {
1561
1592
  const { widget: t, label: n, ...r } = e || {};
1562
1593
  return {
1563
1594
  widget: {
1564
1595
  type: "user",
1565
- widgetName: g(),
1596
+ widgetName: m(),
1566
1597
  widgetNameAlias: "",
1567
1598
  customCls: null,
1568
1599
  height: "34",
@@ -1594,12 +1625,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1594
1625
  tab: null,
1595
1626
  ...r
1596
1627
  };
1597
- }, Ae = (e) => {
1628
+ }, _e = (e) => {
1598
1629
  const { widget: t, label: n, ...r } = e || {};
1599
1630
  return {
1600
1631
  widget: {
1601
1632
  type: "signature",
1602
- widgetName: g(),
1633
+ widgetName: m(),
1603
1634
  widgetNameAlias: "",
1604
1635
  customCls: null,
1605
1636
  height: 34,
@@ -1617,12 +1648,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1617
1648
  tab: null,
1618
1649
  ...r
1619
1650
  };
1620
- }, ke = (e) => {
1651
+ }, Ee = (e) => {
1621
1652
  const { widget: t, label: n, ...r } = e || {};
1622
1653
  return {
1623
1654
  widget: {
1624
1655
  type: "image",
1625
- widgetName: g(),
1656
+ widgetName: m(),
1626
1657
  widgetNameAlias: "",
1627
1658
  customCls: null,
1628
1659
  height: 100,
@@ -1689,12 +1720,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1689
1720
  tab: null,
1690
1721
  ...r
1691
1722
  };
1692
- }, Ne = (e) => {
1723
+ }, xe = (e) => {
1693
1724
  const { widget: t, label: n, ...r } = e || {};
1694
1725
  return {
1695
1726
  widget: {
1696
1727
  type: "upload",
1697
- widgetName: g(),
1728
+ widgetName: m(),
1698
1729
  widgetNameAlias: "",
1699
1730
  customCls: null,
1700
1731
  enable: !0,
@@ -1724,12 +1755,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1724
1755
  tab: null,
1725
1756
  ...r
1726
1757
  };
1727
- }, Ce = (e) => {
1758
+ }, Me = (e) => {
1728
1759
  const { widget: t, label: n, ...r } = e || {};
1729
1760
  return {
1730
1761
  widget: {
1731
1762
  type: "checkboxgroup",
1732
- widgetName: g(),
1763
+ widgetName: m(),
1733
1764
  widgetNameAlias: "",
1734
1765
  customCls: null,
1735
1766
  enable: !0,
@@ -1758,12 +1789,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1758
1789
  tab: null,
1759
1790
  ...r
1760
1791
  };
1761
- }, _e = (e) => {
1792
+ }, qe = (e) => {
1762
1793
  const { widget: t, label: n, ...r } = e || {};
1763
1794
  return {
1764
1795
  widget: {
1765
1796
  type: "separator",
1766
- widgetName: g(),
1797
+ widgetName: m(),
1767
1798
  widgetNameAlias: "",
1768
1799
  customCls: null,
1769
1800
  enable: !0,
@@ -1777,12 +1808,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1777
1808
  tab: null,
1778
1809
  ...r
1779
1810
  };
1780
- }, Ee = (e) => {
1811
+ }, Fe = (e) => {
1781
1812
  const { widget: t, label: n, ...r } = e || {};
1782
1813
  return {
1783
1814
  widget: {
1784
1815
  type: "combocheck",
1785
- widgetName: g(),
1816
+ widgetName: m(),
1786
1817
  widgetNameAlias: "",
1787
1818
  customCls: null,
1788
1819
  height: 34,
@@ -1814,12 +1845,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1814
1845
  tab: null,
1815
1846
  ...r
1816
1847
  };
1817
- }, xe = (e) => {
1848
+ }, Re = (e) => {
1818
1849
  const { widget: t, label: n, ...r } = e || {};
1819
1850
  return {
1820
1851
  widget: {
1821
1852
  type: "location",
1822
- widgetName: g(),
1853
+ widgetName: m(),
1823
1854
  widgetNameAlias: "",
1824
1855
  customCls: null,
1825
1856
  enable: !0,
@@ -1851,12 +1882,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1851
1882
  tab: null,
1852
1883
  ...r
1853
1884
  };
1854
- }, Me = (e) => {
1885
+ }, Te = (e) => {
1855
1886
  const { widget: t, label: n, ...r } = e || {};
1856
1887
  return {
1857
1888
  widget: {
1858
1889
  type: "textarea",
1859
- widgetName: g(),
1890
+ widgetName: m(),
1860
1891
  widgetNameAlias: "",
1861
1892
  triggerEvent: !1,
1862
1893
  customCls: null,
@@ -1894,12 +1925,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1894
1925
  tab: null,
1895
1926
  ...r
1896
1927
  };
1897
- }, qe = (e = {}) => {
1928
+ }, De = (e = {}) => {
1898
1929
  const { widget: t, label: n, ...r } = e;
1899
1930
  return {
1900
1931
  widget: {
1901
1932
  type: "button",
1902
- widgetName: g(),
1933
+ widgetName: m(),
1903
1934
  widgetNameAlias: "",
1904
1935
  triggerEvent: 0,
1905
1936
  customCls: null,
@@ -1938,12 +1969,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1938
1969
  tab: null,
1939
1970
  ...r
1940
1971
  };
1941
- }, Fe = (e = {}) => {
1972
+ }, $e = (e = {}) => {
1942
1973
  const { widget: t, label: n, ...r } = e;
1943
1974
  return {
1944
1975
  widget: {
1945
1976
  type: "address",
1946
- widgetName: g(),
1977
+ widgetName: m(),
1947
1978
  widgetNameAlias: "",
1948
1979
  customCls: null,
1949
1980
  width: 720,
@@ -1972,12 +2003,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1972
2003
  tab: null,
1973
2004
  ...r
1974
2005
  };
1975
- }, Re = (e = {}) => {
2006
+ }, Oe = (e = {}) => {
1976
2007
  const { widget: t, label: n, ...r } = e;
1977
2008
  return {
1978
2009
  widget: {
1979
2010
  type: "subform",
1980
- widgetName: g(),
2011
+ widgetName: m(),
1981
2012
  widgetNameAlias: "",
1982
2013
  customCls: null,
1983
2014
  enable: !0,
@@ -1992,8 +2023,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1992
2023
  version: 1
1993
2024
  },
1994
2025
  items: (t.items || []).map((l, a) => {
1995
- const i = $e(l, !0);
1996
- return i.widget.widgetName = g("_widget", a), i;
2026
+ const i = Le(l, !0);
2027
+ return i.widget.widgetName = m("_widget", a), i;
1997
2028
  }),
1998
2029
  sortable: !0,
1999
2030
  //启用子表单数据排序
@@ -2055,11 +2086,11 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2055
2086
  lineWidth: 12,
2056
2087
  tab: null
2057
2088
  };
2058
- }, De = (e) => {
2089
+ }, Ie = (e) => {
2059
2090
  const { widget: t, label: n, ...r } = e || {};
2060
2091
  return {
2061
2092
  widget: {
2062
- widgetName: g(),
2093
+ widgetName: m(),
2063
2094
  widgetNameAlias: "",
2064
2095
  customCls: null,
2065
2096
  enable: !0,
@@ -2089,47 +2120,47 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2089
2120
  tab: null,
2090
2121
  ...r
2091
2122
  };
2092
- }, Te = {
2093
- address: Fe,
2094
- button: qe,
2095
- textarea: Me,
2096
- datetime: ge,
2097
- text: I,
2098
- password: I,
2099
- location: xe,
2100
- radiogroup: P,
2101
- radio: P,
2102
- combo: ce,
2103
- combocheck: Ee,
2104
- separator: _e,
2105
- checkboxgroup: Ce,
2106
- upload: Ne,
2107
- number: de,
2108
- image: ke,
2109
- signature: Ae,
2110
- user: ve,
2111
- dataload: Se,
2112
- linkdata: ye,
2113
- linkquery: De,
2114
- usergroup: be,
2115
- subform: Re,
2116
- dept: pe,
2117
- sn: fe,
2118
- deptgroup: me,
2119
- flowState: w,
2120
- flowstate: w,
2121
- formula: w,
2122
- unknown: w
2123
- }, $e = (e, t = !1) => {
2123
+ }, Pe = {
2124
+ address: $e,
2125
+ button: De,
2126
+ textarea: Te,
2127
+ datetime: be,
2128
+ text: L,
2129
+ password: L,
2130
+ location: Re,
2131
+ radiogroup: W,
2132
+ radio: W,
2133
+ combo: pe,
2134
+ combocheck: Fe,
2135
+ separator: qe,
2136
+ checkboxgroup: Me,
2137
+ upload: xe,
2138
+ number: fe,
2139
+ image: Ee,
2140
+ signature: _e,
2141
+ user: Ne,
2142
+ dataload: Ce,
2143
+ linkdata: ve,
2144
+ linkquery: Ie,
2145
+ usergroup: Se,
2146
+ subform: Oe,
2147
+ dept: we,
2148
+ sn: he,
2149
+ deptgroup: ye,
2150
+ flowState: S,
2151
+ flowstate: S,
2152
+ formula: S,
2153
+ unknown: S
2154
+ }, Le = (e, t = !1) => {
2124
2155
  var a, i;
2125
2156
  if (!e || !e.widget || !e.widget.type)
2126
2157
  return e;
2127
2158
  const n = e.widget.type || "unknown";
2128
- return t && n === "subform" ? w(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = X()), (Te[n] || w)(e));
2129
- }, yt = (e) => {
2159
+ return t && n === "subform" ? S(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = J()), (Pe[n] || S)(e));
2160
+ }, vt = (e) => {
2130
2161
  var t, n, r, l, a, i, o, s;
2131
2162
  return !e || !((t = e.corp) != null && t.name) || !((n = e.user) != null && n.nickname) ? "" : `${(r = e.corp) == null ? void 0 : r.name} ${(l = e.user) == null ? void 0 : l.nickname}(${(a = e.user) == null ? void 0 : a.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(s = e.agentName) != null ? s : ""}`;
2132
- }, ht = (e) => {
2163
+ }, At = (e) => {
2133
2164
  var n;
2134
2165
  if (!e)
2135
2166
  return "";
@@ -2149,52 +2180,52 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2149
2180
  }
2150
2181
  };
2151
2182
  export {
2152
- nt as DATA_COUNT_PER_BATCH,
2153
- J as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2154
- ee as FIELD_TYPE_OPERATOR_MAP,
2155
- pt as FORM_ICON_UNICODE_MAP,
2156
- je as GetLoadingMsg,
2157
- Ue as GetPartErrMsg,
2158
- Le as GetQueryResult,
2159
- Ke as GetSafeFormStructure,
2160
- se as ICON_UNICODE_MAP,
2161
- j as IsErrorPart,
2162
- Oe as IsFakeMsgPart,
2163
- We as IsFileGroupPart,
2164
- Ie as IsFilePart,
2165
- Be as IsLoadingPart,
2166
- Pe as IsQueryResultPart,
2167
- Z as OPERATOR_LABEL_MAP,
2168
- K as WHITE_LIST_FIELDS_SET,
2169
- ct as bsConditionParse2Condition,
2170
- dt as conditionStringify2bsCondition,
2171
- Ze as createFieldPartsExtractor,
2172
- Xe as createGetFieldJsonInfo,
2183
+ it as DATA_COUNT_PER_BATCH,
2184
+ te as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2185
+ ne as FIELD_TYPE_OPERATOR_MAP,
2186
+ wt as FORM_ICON_UNICODE_MAP,
2187
+ ze as GetLoadingMsg,
2188
+ Qe as GetPartErrMsg,
2189
+ Ue as GetQueryResult,
2190
+ Je as GetSafeFormStructure,
2191
+ me as ICON_UNICODE_MAP,
2192
+ H as IsErrorPart,
2193
+ We as IsFakeMsgPart,
2194
+ He as IsFileGroupPart,
2195
+ Be as IsFilePart,
2196
+ Ge as IsLoadingPart,
2197
+ je as IsQueryResultPart,
2198
+ ee as OPERATOR_LABEL_MAP,
2199
+ Z as WHITE_LIST_FIELDS_SET,
2200
+ pt as bsConditionParse2Condition,
2201
+ ft as conditionStringify2bsCondition,
2202
+ nt as createFieldPartsExtractor,
2203
+ tt as createGetFieldJsonInfo,
2173
2204
  V as createPartTypeChecker,
2174
- Ve as createPayloadTypeChecker,
2205
+ et as createPayloadTypeChecker,
2175
2206
  y as extractTextPartMeta,
2176
- tt as field2config,
2177
- W as flatArr,
2178
- gt as formatLocalDate,
2179
- lt as getAvailableOperators,
2180
- yt as getChatCtxForHuman,
2181
- ht as getChatCtxForMcp,
2182
- it as getDefaultOperator,
2183
- ft as getIconUnicode,
2184
- He as getMetaErrorMsg,
2185
- at as getOperatorLabel,
2186
- et as hasValidFieldValue,
2187
- rt as imageUrlToBase64,
2188
- Qe as injectHostFontFacesIntoShadow,
2189
- Ge as injectHostStylesIntoShadow,
2190
- ut as isCtxMatch,
2191
- st as isHelperCondMet,
2192
- ot as isHelperPrefMet,
2193
- mt as mergeConsecutiveTargets,
2194
- bt as promptParser,
2195
- $e as rebuildFieldsJsonStructure,
2196
- Je as safeParseJson,
2197
- ze as syncHostStylesIntoShadow,
2198
- Ye as valueNormalizer
2207
+ lt as field2config,
2208
+ j as flatArr,
2209
+ bt as formatLocalDate,
2210
+ ut as getAvailableOperators,
2211
+ vt as getChatCtxForHuman,
2212
+ At as getChatCtxForMcp,
2213
+ dt as getDefaultOperator,
2214
+ ht as getIconUnicode,
2215
+ Ye as getMetaErrorMsg,
2216
+ st as getOperatorLabel,
2217
+ at as hasValidFieldValue,
2218
+ ot as imageUrlToBase64,
2219
+ Ze as injectHostFontFacesIntoShadow,
2220
+ Ke as injectHostStylesIntoShadow,
2221
+ gt as isCtxMatch,
2222
+ mt as isHelperCondMet,
2223
+ ct as isHelperPrefMet,
2224
+ yt as mergeConsecutiveTargets,
2225
+ St as promptParser,
2226
+ Le as rebuildFieldsJsonStructure,
2227
+ rt as safeParseJson,
2228
+ Xe as syncHostStylesIntoShadow,
2229
+ Ve as valueNormalizer
2199
2230
  };
2200
2231
  //# sourceMappingURL=ai-feat-utils.js.map