@skopon-cool/form-sdk 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,43 +1,43 @@
1
1
  import './form-sdk.css';
2
- var zn = Object.defineProperty;
3
- var On = (e, t, n) => t in e ? zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var G = (e, t, n) => On(e, typeof t != "symbol" ? t + "" : t, n);
2
+ var qn = Object.defineProperty;
3
+ var Bn = (e, t, n) => t in e ? qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var G = (e, t, n) => Bn(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  import { jsx as u, jsxs as M } from "react/jsx-runtime";
6
- import { useRef as A, useState as P, useCallback as j, useMemo as L, createContext as Se, useContext as ke, useEffect as q, useSyncExternalStore as qn, forwardRef as Bn, useImperativeHandle as Vn } from "react";
7
- import { Spin as ft, Button as Oe, Typography as ne, Avatar as Ln, Tag as ge, Select as st, Checkbox as jn, Radio as $n, Switch as Dn, TimePicker as Hn, DatePicker as Kn, Upload as Ye, Input as Qe, InputNumber as Jn, ConfigProvider as Gn, Tooltip as he } from "antd";
8
- import { ReloadOutlined as Yt, FileTextOutlined as Qt, UserOutlined as Wn, FileImageOutlined as Yn, FileExcelOutlined as Qn, FileOutlined as Xt, PictureOutlined as Xn, SoundOutlined as Zn, VideoCameraOutlined as er } from "@ant-design/icons";
9
- import { createBinderlessComponentImplementation as X, basicCatalog as Ue, A2uiSurface as Zt } from "@a2ui/react/v0_9";
6
+ import { useRef as A, useState as w, useCallback as j, useMemo as L, createContext as Ce, useContext as Ae, useEffect as q, useSyncExternalStore as Vn, forwardRef as Ln, useImperativeHandle as jn } from "react";
7
+ import { Spin as dt, Button as ze, Typography as ne, Avatar as $n, Tag as ve, Select as it, Checkbox as Dn, Radio as Hn, Switch as Kn, TimePicker as Jn, DatePicker as Gn, Upload as We, Input as Ye, InputNumber as Wn, ConfigProvider as Yn, Tooltip as ye } from "antd";
8
+ import { ReloadOutlined as Yt, FileTextOutlined as Qt, UserOutlined as Qn, FileImageOutlined as Xn, FileExcelOutlined as Zn, FileOutlined as Xt, PictureOutlined as er, SoundOutlined as tr, VideoCameraOutlined as nr } from "@ant-design/icons";
9
+ import { createBinderlessComponentImplementation as X, basicCatalog as Ee, A2uiSurface as Zt } from "@a2ui/react/v0_9";
10
10
  import { z as h } from "zod";
11
- import { Catalog as tr, MessageProcessor as en } from "@a2ui/web_core/v0_9";
11
+ import { Catalog as rr, MessageProcessor as en } from "@a2ui/web_core/v0_9";
12
12
  import { injectBasicCatalogStyles as tn } from "@a2ui/web_core/v0_9/basic_catalog";
13
13
  import { injectStyles as nn } from "@a2ui/react/styles";
14
14
  import jt from "dayjs";
15
- const ds = "v0.9", nr = [
15
+ const hs = "v0.9", or = [
16
16
  "huge",
17
17
  "large",
18
18
  "medium",
19
19
  "small",
20
20
  "icon"
21
21
  ];
22
- function de(e) {
22
+ function pe(e) {
23
23
  return e === "image" || e === "video" || e === "audio";
24
24
  }
25
- function Ce(e) {
25
+ function ft(e) {
26
26
  return e === "heading" || e === "paragraph";
27
27
  }
28
28
  function Z(e) {
29
- return !Ce(e) && !de(e);
29
+ return !ft(e) && !pe(e);
30
30
  }
31
- function fs(e) {
32
- return Ce(e) || de(e);
31
+ function rn(e) {
32
+ return ft(e) || pe(e);
33
33
  }
34
- function rr(e) {
34
+ function ir(e) {
35
35
  return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
36
36
  }
37
- function ps(e) {
37
+ function gs(e) {
38
38
  return Z(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
39
39
  }
40
- function or() {
40
+ function sr() {
41
41
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
42
42
  return crypto.randomUUID();
43
43
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -52,10 +52,10 @@ function or() {
52
52
  });
53
53
  }
54
54
  function le(e) {
55
- const t = or().replace(/-/g, "").slice(0, 8);
55
+ const t = sr().replace(/-/g, "").slice(0, 8);
56
56
  return `${e}${t}`;
57
57
  }
58
- const rn = [
58
+ const on = [
59
59
  { value: "image/*", label: "图片" },
60
60
  { value: "video/*", label: "视频" },
61
61
  { value: "audio/*", label: "音频" },
@@ -66,7 +66,7 @@ const rn = [
66
66
  { value: "text/plain", label: "纯文本" },
67
67
  { value: "application/zip", label: "ZIP 压缩包" },
68
68
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
69
- ], ir = {
69
+ ], ar = {
70
70
  "image/*": ["image/*"],
71
71
  "video/*": ["video/*"],
72
72
  "audio/*": ["audio/*"],
@@ -86,7 +86,7 @@ const rn = [
86
86
  "text/plain": ["text/plain"],
87
87
  "application/zip": ["application/zip"],
88
88
  "application/x-rar-compressed": ["application/x-rar-compressed"]
89
- }, sr = {
89
+ }, lr = {
90
90
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
91
91
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
92
92
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -97,7 +97,7 @@ const rn = [
97
97
  "text/plain": [".txt"],
98
98
  "application/zip": [".zip", ".7z"],
99
99
  "application/x-rar-compressed": [".rar"]
100
- }, ar = {
100
+ }, cr = {
101
101
  "application/msword": "office/word",
102
102
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
103
103
  "application/vnd.ms-excel": "office/excel",
@@ -130,119 +130,119 @@ const rn = [
130
130
  { value: ".zip", label: ".zip" },
131
131
  { value: ".rar", label: ".rar" },
132
132
  { value: ".7z", label: ".7z" }
133
- ], lr = Object.fromEntries(
134
- rn.map((e) => [e.value, e.label])
135
- ), cr = Object.fromEntries(
133
+ ], ur = Object.fromEntries(
134
+ on.map((e) => [e.value, e.label])
135
+ ), mr = Object.fromEntries(
136
136
  pt.map((e) => [e.value, e.label])
137
- ), ur = new Set(rn.map((e) => e.value)), mr = new Set(
137
+ ), dr = new Set(on.map((e) => e.value)), fr = new Set(
138
138
  pt.map((e) => e.value)
139
139
  );
140
- function dr(e) {
140
+ function pr(e) {
141
141
  const t = e.trim();
142
- return t ? ur.has(t) ? t : ar[t] ?? null : null;
142
+ return t ? dr.has(t) ? t : cr[t] ?? null : null;
143
143
  }
144
- function fr(e) {
144
+ function hr(e) {
145
145
  return Array.isArray(e) ? e.map((t) => {
146
146
  const n = t.trim().toLowerCase();
147
147
  return n ? n.startsWith(".") ? n : `.${n}` : "";
148
148
  }).filter(Boolean) : [];
149
149
  }
150
- function Ae(e) {
150
+ function _e(e) {
151
151
  if (!Array.isArray(e)) return [];
152
152
  const t = [], n = /* @__PURE__ */ new Set();
153
153
  for (const r of e) {
154
- const o = dr(r);
154
+ const o = pr(r);
155
155
  o && !n.has(o) && (n.add(o), t.push(o));
156
156
  }
157
157
  return t;
158
158
  }
159
- function pr(e) {
160
- const t = Ae(e), n = [];
159
+ function gr(e) {
160
+ const t = _e(e), n = [];
161
161
  for (const r of t)
162
- n.push(...ir[r] ?? [r]);
162
+ n.push(...ar[r] ?? [r]);
163
163
  return n;
164
164
  }
165
- function hr(e) {
166
- const t = Ae(e);
165
+ function yr(e) {
166
+ const t = _e(e);
167
167
  if (t.length === 0) return [];
168
168
  const n = /* @__PURE__ */ new Set();
169
169
  for (const r of t)
170
- for (const o of sr[r] ?? [])
170
+ for (const o of lr[r] ?? [])
171
171
  n.add(o);
172
172
  return pt.filter((r) => n.has(r.value));
173
173
  }
174
174
  function ht(e, t) {
175
- const n = fr(t), r = Ae(e);
175
+ const n = hr(t), r = _e(e);
176
176
  if (r.length === 0)
177
- return n.filter((i) => mr.has(i));
177
+ return n.filter((i) => fr.has(i));
178
178
  const o = new Set(
179
- hr(r).map((i) => i.value)
179
+ yr(r).map((i) => i.value)
180
180
  );
181
181
  return n.filter((i) => o.has(i));
182
182
  }
183
- function gr(e, t) {
184
- const n = pr(e), r = ht(e, t), o = [...n, ...r];
183
+ function vr(e, t) {
184
+ const n = gr(e), r = ht(e, t), o = [...n, ...r];
185
185
  return o.length > 0 ? o.join(",") : void 0;
186
186
  }
187
- function yr(e, t) {
188
- const n = Ae(e), r = ht(
187
+ function br(e, t) {
188
+ const n = _e(e), r = ht(
189
189
  n,
190
190
  t
191
191
  ), o = [
192
- ...n.map((i) => lr[i] ?? i),
193
- ...r.map((i) => cr[i] ?? i)
192
+ ...n.map((i) => ur[i] ?? i),
193
+ ...r.map((i) => mr[i] ?? i)
194
194
  ];
195
195
  return o.length === 0 ? null : o.join("、");
196
196
  }
197
- const vr = [
197
+ const Sr = [
198
198
  "video",
199
199
  "audio",
200
200
  "image",
201
201
  "file",
202
202
  "spreadsheet",
203
203
  "document"
204
- ], br = new Set(vr);
205
- function Sr(e) {
206
- return e && br.has(e) ? e : "file";
204
+ ], kr = new Set(Sr);
205
+ function Cr(e) {
206
+ return e && kr.has(e) ? e : "file";
207
207
  }
208
- function _e(e) {
209
- return typeof e == "string" && nr.includes(e) ? e : "medium";
208
+ function Te(e) {
209
+ return typeof e == "string" && or.includes(e) ? e : "medium";
210
210
  }
211
- function kr(e, t) {
211
+ function Ar(e, t) {
212
212
  var o;
213
213
  const n = Math.max(1, t);
214
214
  let r = [];
215
215
  return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((i) => String(i).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
216
216
  }
217
- function Cr(e) {
217
+ function _r(e) {
218
218
  var t;
219
219
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
220
220
  }
221
- function Ar(e) {
222
- return `form-media-size-${_e(e)}`;
221
+ function Tr(e) {
222
+ return `form-media-size-${Te(e)}`;
223
223
  }
224
- function _r(e) {
225
- return `form-media-preview form-media-list ${Ar(e)}`;
224
+ function xr(e) {
225
+ return `form-media-preview form-media-list ${Tr(e)}`;
226
226
  }
227
- const Tr = 10;
228
- function on(e) {
227
+ const Mr = 10;
228
+ function sn(e) {
229
229
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
230
230
  }
231
- function Te(e) {
231
+ function xe(e) {
232
232
  return e === !0 || e === "true" || e === 1 || e === "1";
233
233
  }
234
- function Re(e, t = 1) {
234
+ function Ue(e, t = 1) {
235
235
  const n = typeof e == "number" ? e : Number(e);
236
236
  return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
237
237
  }
238
- function ue(e, t = 1) {
238
+ function de(e, t = 1) {
239
239
  const n = typeof e == "number" ? e : Number(e);
240
240
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
241
241
  }
242
- function sn(e, t) {
243
- return t == null ? void 0 : e === "toggle" ? Te(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String).map((o) => o.trim()).filter(Boolean) : typeof t == "string" && t.trim() ? [t.trim()] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t).trim() || void 0;
242
+ function an(e, t) {
243
+ return t == null ? void 0 : e === "toggle" ? xe(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String).map((o) => o.trim()).filter(Boolean) : typeof t == "string" && t.trim() ? [t.trim()] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t).trim() || void 0;
244
244
  }
245
- function xr(e) {
245
+ function Nr(e) {
246
246
  if (Array.isArray(e)) return e.map(String).filter(Boolean);
247
247
  if (typeof e == "string" && e.trim())
248
248
  try {
@@ -252,11 +252,11 @@ function xr(e) {
252
252
  }
253
253
  return [];
254
254
  }
255
- function Mr(e) {
256
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = xr(e == null ? void 0 : e.flowUniqueIds);
255
+ function Ir(e) {
256
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = Nr(e == null ? void 0 : e.flowUniqueIds);
257
257
  return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
258
258
  }
259
- function Nr(e) {
259
+ function Fr(e) {
260
260
  const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0;
261
261
  return {
262
262
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -266,14 +266,14 @@ function Nr(e) {
266
266
  pageSize: n
267
267
  };
268
268
  }
269
- function Ir(e) {
269
+ function Er(e) {
270
270
  if (e.type !== "case_singleselect") return e;
271
271
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
272
272
  return { ...e, type: "case_multiselect", defaultValue: t };
273
273
  }
274
- function Fr(e) {
274
+ function Ur(e) {
275
275
  var o, i, s, a;
276
- const t = Ir(e), n = Ae(t.fileAcceptTypes), r = t.type;
276
+ const t = Er(e), n = _e(t.fileAcceptTypes), r = t.type;
277
277
  return {
278
278
  id: ((o = t.id) == null ? void 0 : o.trim()) || le("block-"),
279
279
  type: r,
@@ -282,17 +282,17 @@ function Fr(e) {
282
282
  placeholder: t.placeholder ?? "",
283
283
  help: t.help ?? "",
284
284
  required: t.required === !0,
285
- mediaUrls: de(r) ? kr(t, Tr) : void 0,
286
- mediaSize: de(r) ? _e(t.mediaSize) : void 0,
285
+ mediaUrls: pe(r) ? Ar(t, Mr) : void 0,
286
+ mediaSize: pe(r) ? Te(t.mediaSize) : void 0,
287
287
  fileAcceptTypes: n,
288
288
  fileAcceptExtensions: ht(
289
289
  n,
290
290
  t.fileAcceptExtensions
291
291
  ),
292
- filePlaceholderIcon: Sr(t.filePlaceholderIcon),
293
- fileMinCount: r === "file" ? Re(t.fileMinCount, 1) : void 0,
294
- fileMaxCount: r === "file" ? Re(t.fileMaxCount, 1) : void 0,
295
- defaultValue: sn(r, t.defaultValue),
292
+ filePlaceholderIcon: Cr(t.filePlaceholderIcon),
293
+ fileMinCount: r === "file" ? Ue(t.fileMinCount, 1) : void 0,
294
+ fileMaxCount: r === "file" ? Ue(t.fileMaxCount, 1) : void 0,
295
+ defaultValue: an(r, t.defaultValue),
296
296
  jsonSchemaDescription: ((s = t.jsonSchemaDescription) == null ? void 0 : s.trim()) ?? "",
297
297
  hidden: r === "text" ? t.hidden === !0 : void 0,
298
298
  needLLM: t.needLLM === !0 ? !0 : void 0,
@@ -309,16 +309,16 @@ function Fr(e) {
309
309
  value: t.condition.value
310
310
  } : void 0,
311
311
  resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
312
- resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? ue(t.resumeMinCount, 1) : void 0,
313
- resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? ue(t.resumeMaxCount, 1) : void 0,
314
- resumeFilter: r === "resume_multiselect" ? Nr(t.resumeFilter) : void 0,
312
+ resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? de(t.resumeMinCount, 1) : void 0,
313
+ resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? de(t.resumeMaxCount, 1) : void 0,
314
+ resumeFilter: r === "resume_multiselect" ? Fr(t.resumeFilter) : void 0,
315
315
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
316
- caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? ue(t.caseMinCount, 1) : void 0,
317
- caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? ue(t.caseMaxCount, 1) : void 0,
318
- caseFilter: r === "case_multiselect" ? Mr(t.caseFilter) : void 0
316
+ caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? de(t.caseMinCount, 1) : void 0,
317
+ caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? de(t.caseMaxCount, 1) : void 0,
318
+ caseFilter: r === "case_multiselect" ? Ir(t.caseFilter) : void 0
319
319
  };
320
320
  }
321
- function Er(e) {
321
+ function Rr(e) {
322
322
  return new Set((e.options ?? []).map((t) => t.value));
323
323
  }
324
324
  function $t(e, t) {
@@ -326,12 +326,12 @@ function $t(e, t) {
326
326
  type: "array",
327
327
  items: { type: "string" }
328
328
  };
329
- return e !== void 0 && (n.minItems = ue(e, 1)), t !== void 0 && (n.maxItems = ue(t, 1)), n;
329
+ return e !== void 0 && (n.minItems = de(e, 1)), t !== void 0 && (n.maxItems = de(t, 1)), n;
330
330
  }
331
- function Ur(e) {
332
- const t = sn(e.type, e.defaultValue);
331
+ function Pr(e) {
332
+ const t = an(e.type, e.defaultValue);
333
333
  if (t === void 0) return;
334
- const n = Er(e);
334
+ const n = Rr(e);
335
335
  switch (e.type) {
336
336
  case "toggle":
337
337
  return t;
@@ -358,7 +358,7 @@ function Ur(e) {
358
358
  return t;
359
359
  }
360
360
  }
361
- function Rr(e) {
361
+ function wr(e) {
362
362
  var i, s;
363
363
  if (!((i = e.name) == null ? void 0 : i.trim()) || !Z(e.type)) return null;
364
364
  let n;
@@ -386,7 +386,7 @@ function Rr(e) {
386
386
  break;
387
387
  }
388
388
  case "file": {
389
- const a = Re(e.fileMinCount, 1), l = Re(e.fileMaxCount, 1);
389
+ const a = Ue(e.fileMinCount, 1), l = Ue(e.fileMaxCount, 1);
390
390
  l <= 1 ? n = { type: "string" } : n = {
391
391
  type: "array",
392
392
  items: { type: "string" },
@@ -410,16 +410,16 @@ function Rr(e) {
410
410
  }
411
411
  const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
412
412
  r && (n.$comment = r);
413
- const o = Ur(e);
413
+ const o = Pr(e);
414
414
  return o !== void 0 && (n.default = o), n;
415
415
  }
416
- function Pr(e, t, n) {
416
+ function zr(e, t, n) {
417
417
  var l;
418
418
  const r = {}, o = [];
419
419
  for (const c of e) {
420
420
  const m = (l = c.name) == null ? void 0 : l.trim();
421
421
  if (!m || !Z(c.type)) continue;
422
- const d = Rr(c);
422
+ const d = wr(c);
423
423
  d && (r[m] = d, c.required && o.push(m));
424
424
  }
425
425
  const i = {
@@ -430,35 +430,35 @@ function Pr(e, t, n) {
430
430
  }, s = t == null ? void 0 : t.trim(), a = n == null ? void 0 : n.trim();
431
431
  return s && (i.title = s), a && (i.description = a), i;
432
432
  }
433
- function ye(e) {
433
+ function be(e) {
434
434
  const t = e.title ?? "", n = e.description ?? "";
435
435
  return {
436
436
  title: t,
437
437
  description: n,
438
438
  blocks: e.blocks,
439
- jsonSchema: Pr(e.blocks, t, n)
439
+ jsonSchema: zr(e.blocks, t, n)
440
440
  };
441
441
  }
442
- function qe(e) {
442
+ function Oe(e) {
443
443
  if (!e || !Array.isArray(e.blocks))
444
- return ye({ title: "", description: "", blocks: [] });
445
- const t = e.blocks.map(Fr);
446
- return ye({
444
+ return be({ title: "", description: "", blocks: [] });
445
+ const t = e.blocks.map(Ur);
446
+ return be({
447
447
  title: typeof e.title == "string" ? e.title : "",
448
448
  description: typeof e.description == "string" ? e.description : "",
449
449
  blocks: t
450
450
  });
451
451
  }
452
- function hs() {
453
- return ye({ title: "", description: "", blocks: [] });
452
+ function ys() {
453
+ return be({ title: "", description: "", blocks: [] });
454
454
  }
455
- function gs(e) {
455
+ function vs(e) {
456
456
  const t = {
457
457
  id: le("block-"),
458
458
  type: e,
459
459
  label: e
460
460
  };
461
- return Z(e) && (t.label = "", t.name = le("field_"), t.placeholder = "", t.required = !1), de(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), rr(e) && (t.options = [
461
+ return Z(e) && (t.label = "", t.name = le("field_"), t.placeholder = "", t.required = !1), pe(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), ir(e) && (t.options = [
462
462
  { value: "option_1", label: "选项 1" },
463
463
  { value: "option_2", label: "选项 2" }
464
464
  ]), e === "file" && (t.fileAcceptTypes = [], t.fileAcceptExtensions = [], t.filePlaceholderIcon = "file", t.fileMinCount = 1, t.fileMaxCount = 1), e === "resume_multiselect" && (t.resumeEnableRefresh = !0, t.resumeMinCount = 1, t.resumeMaxCount = 1, t.resumeFilter = {
@@ -468,7 +468,7 @@ function gs(e) {
468
468
  pageSize: 20
469
469
  }, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
470
470
  }
471
- function wr(e) {
471
+ function Or(e) {
472
472
  const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
473
473
  return {
474
474
  agentKind: n,
@@ -485,7 +485,7 @@ function Dt(e) {
485
485
  if (!(!Number.isFinite(t) || t < 1))
486
486
  return Math.floor(t);
487
487
  }
488
- function zr(e, t) {
488
+ function qr(e, t) {
489
489
  var s, a, l, c, m, d;
490
490
  const { id: n, label: r, path: o, withData: i } = t;
491
491
  return i({
@@ -508,7 +508,7 @@ function zr(e, t) {
508
508
  value: { path: o }
509
509
  });
510
510
  }
511
- function Or(e, t, n) {
511
+ function Br(e, t, n) {
512
512
  const r = n.nameFromValue(e.value), o = {
513
513
  ...t("case_multiselect"),
514
514
  name: r,
@@ -516,23 +516,23 @@ function Or(e, t, n) {
516
516
  }, i = n.asLiteral(e.placeholder);
517
517
  i && (o.placeholder = i);
518
518
  const s = n.asLiteral(e.help);
519
- s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = wr(e.caseFilter));
519
+ s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = Or(e.caseFilter));
520
520
  const a = Dt(e.minCount);
521
521
  a !== void 0 && (o.caseMinCount = a);
522
522
  const l = Dt(e.maxCount);
523
523
  return l !== void 0 && (o.caseMaxCount = l), o;
524
524
  }
525
- const an = Se(
525
+ const ln = Ce(
526
526
  null
527
527
  );
528
- function qr(e) {
528
+ function Vr(e) {
529
529
  try {
530
530
  return JSON.stringify(e);
531
531
  } catch {
532
532
  return String(e.length);
533
533
  }
534
534
  }
535
- const Br = {
535
+ const Lr = {
536
536
  publishLiveOptions: () => {
537
537
  },
538
538
  liveOptions: /* @__PURE__ */ new Map(),
@@ -541,18 +541,18 @@ const Br = {
541
541
  clearPendingChangeFields: () => {
542
542
  }
543
543
  };
544
- function Vr({ children: e }) {
545
- const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = P(0), [s, a] = P(() => /* @__PURE__ */ new Map()), [l, c] = P(
544
+ function jr({ children: e }) {
545
+ const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = w(0), [s, a] = w(() => /* @__PURE__ */ new Map()), [l, c] = w(
546
546
  []
547
547
  ), m = j(
548
- (g, S) => {
549
- const y = g.trim();
550
- if (!y) return;
548
+ (y, S) => {
549
+ const g = y.trim();
550
+ if (!g) return;
551
551
  const k = S.map((f) => ({
552
552
  value: String(f.value ?? ""),
553
553
  label: String(f.label ?? f.value ?? "")
554
- })), p = qr(k);
555
- n.current.get(y) !== p && (n.current.set(y, p), t.current.set(y, k), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
554
+ })), p = Vr(k);
555
+ n.current.get(g) !== p && (n.current.set(g, p), t.current.set(g, k), r.current.includes(g) || (r.current = [...r.current, g]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
556
556
  },
557
557
  []
558
558
  ), d = j(() => {
@@ -573,26 +573,26 @@ function Vr({ children: e }) {
573
573
  d
574
574
  ]
575
575
  );
576
- return /* @__PURE__ */ u(an.Provider, { value: b, children: e });
576
+ return /* @__PURE__ */ u(ln.Provider, { value: b, children: e });
577
577
  }
578
578
  function gt() {
579
- return ke(an) ?? Br;
579
+ return Ae(ln) ?? Lr;
580
580
  }
581
- const ln = Se({ interactive: !0 });
582
- function at({
581
+ const cn = Ce({ interactive: !0 });
582
+ function st({
583
583
  interactive: e,
584
584
  children: t
585
585
  }) {
586
- return /* @__PURE__ */ u(ln.Provider, { value: { interactive: e }, children: t });
586
+ return /* @__PURE__ */ u(cn.Provider, { value: { interactive: e }, children: t });
587
587
  }
588
588
  function se() {
589
- return ke(ln);
589
+ return Ae(cn);
590
590
  }
591
- const cn = Se(null);
592
- function Lr(e) {
591
+ const un = Ce(null);
592
+ function $r(e) {
593
593
  return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
594
594
  }
595
- const jr = {
595
+ const Dr = {
596
596
  reportEvent: () => {
597
597
  },
598
598
  reportData: () => {
@@ -600,7 +600,7 @@ const jr = {
600
600
  runAutoControl: (e) => e(),
601
601
  isAutoControl: () => !1
602
602
  };
603
- function $r(e) {
603
+ function Hr(e) {
604
604
  const t = {};
605
605
  for (const [n, r] of Object.entries(e.form_values ?? {}))
606
606
  r !== void 0 && (t[n] = r);
@@ -610,7 +610,7 @@ function $r(e) {
610
610
  form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
611
611
  };
612
612
  }
613
- function Dr({
613
+ function Kr({
614
614
  client: e,
615
615
  children: t
616
616
  }) {
@@ -628,7 +628,7 @@ function Dr({
628
628
  m.send(b, d);
629
629
  }, []), i = j((c) => {
630
630
  const m = r.current;
631
- m && m.send("form_runtime_data", $r(c));
631
+ m && m.send("form_runtime_data", Hr(c));
632
632
  }, []), s = j((c) => {
633
633
  n.current += 1;
634
634
  let m;
@@ -637,7 +637,7 @@ function Dr({
637
637
  } catch (d) {
638
638
  throw n.current = Math.max(0, n.current - 1), d;
639
639
  }
640
- return Lr(m) ? Promise.resolve(m).finally(() => {
640
+ return $r(m) ? Promise.resolve(m).finally(() => {
641
641
  n.current = Math.max(0, n.current - 1);
642
642
  }) : (n.current = Math.max(0, n.current - 1), m);
643
643
  }, []), a = j(
@@ -652,16 +652,16 @@ function Dr({
652
652
  }),
653
653
  [o, i, s, a]
654
654
  );
655
- return /* @__PURE__ */ u(cn.Provider, { value: l, children: t });
655
+ return /* @__PURE__ */ u(un.Provider, { value: l, children: t });
656
656
  }
657
- function un() {
658
- return ke(cn) ?? jr;
657
+ function mn() {
658
+ return Ae(un) ?? Dr;
659
659
  }
660
- const Hr = 300;
661
- function mn(e) {
660
+ const Jr = 300;
661
+ function dn(e) {
662
662
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
663
663
  }
664
- function Kr(e) {
664
+ function Gr(e) {
665
665
  if (!e) return;
666
666
  const t = e.trim();
667
667
  if (t)
@@ -669,24 +669,24 @@ function Kr(e) {
669
669
  }
670
670
  function Ht(e, t = "value") {
671
671
  const r = e.componentModel.properties[t];
672
- if (!(!mn(r) || r === void 0))
672
+ if (!(!dn(r) || r === void 0))
673
673
  return e.dataContext.resolveDynamicValue(r);
674
674
  }
675
675
  function ae(e, t = "value", n = {}) {
676
- const o = e.componentModel.properties[t], i = mn(o), s = Kr(i), a = un(), {
676
+ const o = e.componentModel.properties[t], i = dn(o), s = Gr(i), a = mn(), {
677
677
  component: l = "Unknown",
678
678
  changeAction: c = "change",
679
679
  debounceChange: m = !1
680
- } = n, d = A(null), b = A(void 0), g = A(!1), S = A(a);
680
+ } = n, d = A(null), b = A(void 0), y = A(!1), S = A(a);
681
681
  S.current = a;
682
- const y = A(c);
683
- y.current = c;
682
+ const g = A(c);
683
+ g.current = c;
684
684
  const k = A(l);
685
685
  k.current = l;
686
686
  const p = A(s);
687
687
  p.current = s, q(() => () => {
688
- d.current != null && (clearTimeout(d.current), d.current = null), g.current && p.current && (g.current = !1, S.current.reportEvent({
689
- action: y.current,
688
+ d.current != null && (clearTimeout(d.current), d.current = null), y.current && p.current && (y.current = !1, S.current.reportEvent({
689
+ action: g.current,
690
690
  component: k.current,
691
691
  field: p.current,
692
692
  value: b.current
@@ -703,11 +703,11 @@ function ae(e, t = "value", n = {}) {
703
703
  ), v = j(() => {
704
704
  if (!(!i || o === void 0))
705
705
  return e.dataContext.resolveDynamicValue(o);
706
- }, [e, o, i]), x = qn(f, v, v), N = j(
706
+ }, [e, o, i]), x = Vn(f, v, v), N = j(
707
707
  (B) => {
708
708
  if (!s) return;
709
709
  const V = () => {
710
- g.current = !1, S.current.reportEvent({
710
+ y.current = !1, S.current.reportEvent({
711
711
  action: c,
712
712
  component: l,
713
713
  field: s,
@@ -718,9 +718,9 @@ function ae(e, t = "value", n = {}) {
718
718
  V();
719
719
  return;
720
720
  }
721
- b.current = B, g.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
721
+ b.current = B, y.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
722
722
  d.current = null, V();
723
- }, Hr);
723
+ }, Jr);
724
724
  },
725
725
  [s, c, l, m]
726
726
  ), _ = j(
@@ -728,7 +728,7 @@ function ae(e, t = "value", n = {}) {
728
728
  !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), B);
729
729
  },
730
730
  [e, o, i]
731
- ), w = j(
731
+ ), z = j(
732
732
  (B) => {
733
733
  _(B), N(B);
734
734
  },
@@ -742,7 +742,7 @@ function ae(e, t = "value", n = {}) {
742
742
  }, [s, l]);
743
743
  return {
744
744
  value: x,
745
- setValue: w,
745
+ setValue: z,
746
746
  /** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
747
747
  setValueSilent: _,
748
748
  hasBinding: !!i,
@@ -750,59 +750,69 @@ function ae(e, t = "value", n = {}) {
750
750
  reportFocus: C
751
751
  };
752
752
  }
753
- function ve(e) {
753
+ function Se(e) {
754
754
  if (typeof e == "string") return e || void 0;
755
755
  if (typeof e == "number") return String(e);
756
756
  }
757
757
  function Q(e) {
758
758
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
759
759
  }
760
- function dn(e, t) {
760
+ function fn(e, t) {
761
761
  return t ? Array.isArray(e) ? null : Q(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
762
762
  }
763
- function Pe(e) {
763
+ function Re(e) {
764
764
  if (e == null) return;
765
765
  const t = typeof e == "number" ? e : Number(e);
766
766
  if (!(!Number.isFinite(t) || t < 1))
767
767
  return Math.floor(t);
768
768
  }
769
- function fn(e, t, n, r) {
769
+ function pn(e, t, n, r) {
770
770
  return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
771
771
  }
772
- function pn(e, t, n, r, o) {
772
+ function hn(e, t, n, r, o) {
773
773
  return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
774
774
  }
775
- function hn(e, t) {
775
+ function gn(e, t) {
776
776
  return t === void 0 || e.length <= t ? null : e.slice(0, t);
777
777
  }
778
- const gn = Se(null);
779
- function lt({
778
+ const yn = Ce(null);
779
+ function at({
780
780
  caseSearch: e,
781
781
  children: t
782
782
  }) {
783
- return /* @__PURE__ */ u(gn.Provider, { value: e ?? null, children: t });
783
+ return /* @__PURE__ */ u(yn.Provider, { value: e ?? null, children: t });
784
784
  }
785
- function Jr() {
786
- return ke(gn);
785
+ function Wr() {
786
+ return Ae(yn);
787
787
  }
788
- function Xe(e) {
788
+ function Qe(e) {
789
789
  return typeof e == "string" ? e : "";
790
790
  }
791
- function Ze(e) {
791
+ function Yr(e) {
792
+ if (Array.isArray(e)) return e.map(String).filter(Boolean);
793
+ if (typeof e == "string" && e.trim())
794
+ try {
795
+ const t = JSON.parse(e);
796
+ if (Array.isArray(t)) return t.map(String).filter(Boolean);
797
+ } catch {
798
+ }
799
+ return [];
800
+ }
801
+ function Xe(e) {
792
802
  if (!e || typeof e != "object")
793
803
  return { flowUniqueIds: [], pageSize: 20 };
794
- const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, s = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, a = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, l = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
804
+ const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, s = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, a = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, l = Yr(t.flowUniqueIds);
795
805
  return { agentKind: o, agentUniqueId: i, flowType: s, category: a, flowUniqueIds: l, pageSize: r };
796
806
  }
797
- function et(e) {
807
+ function Ze(e) {
798
808
  var r;
799
809
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
800
810
  return t || n;
801
811
  }
802
- function Gr(e) {
812
+ function Qr(e) {
803
813
  return JSON.stringify(e);
804
814
  }
805
- const Wr = {
815
+ const Xr = {
806
816
  name: "SkoponCaseSelect",
807
817
  schema: h.object({
808
818
  label: h.any().optional(),
@@ -815,7 +825,7 @@ const Wr = {
815
825
  value: h.any().optional()
816
826
  }).passthrough()
817
827
  };
818
- function Yr({
828
+ function Zr({
819
829
  item: e,
820
830
  selected: t,
821
831
  disabled: n,
@@ -843,38 +853,38 @@ function Yr({
843
853
  }
844
854
  );
845
855
  }
846
- function Qr({ context: e }) {
847
- const { interactive: t } = se(), n = Jr(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
856
+ function eo({ context: e }) {
857
+ const { interactive: t } = se(), n = Wr(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
848
858
  component: "SkoponCaseSelect",
849
859
  changeAction: "click"
850
- }), l = e.componentModel.properties, c = Xe(l.label), m = Xe(l.placeholder), d = Xe(l.help), b = l.enableRefresh !== !1, g = Pe(l.minCount), S = Pe(l.maxCount), y = L(() => Ze(l.caseFilter), [l.caseFilter]), k = Gr(y), [p, f] = P(1), [v, x] = P(!1), [N, _] = P(""), [w, C] = P([]), [B, V] = P(0), [re, K] = P(y.pageSize ?? 20), $ = A(0), W = Q(o);
860
+ }), l = e.componentModel.properties, c = Qe(l.label), m = Qe(l.placeholder), d = Qe(l.help), b = l.enableRefresh !== !1, y = Re(l.minCount), S = Re(l.maxCount), g = L(() => Xe(l.caseFilter), [l.caseFilter]), k = Qr(g), [p, f] = w(1), [v, x] = w(!1), [N, _] = w(""), [z, C] = w([]), [B, V] = w(0), [re, K] = w(g.pageSize ?? 20), $ = A(0), W = Q(o);
851
861
  q(() => {
852
- const T = hn(W, S);
862
+ const T = gn(W, S);
853
863
  T !== null && s(T);
854
864
  }, [S, W, s]);
855
- const ee = L(() => n ? et(y) ? N || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, N, m]), te = j(
865
+ const ee = L(() => n ? Ze(g) ? N || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, N, m]), te = j(
856
866
  async (T) => {
857
- const D = Ze(JSON.parse(k)), z = ++$.current;
858
- if (!n || !et(D)) {
867
+ const D = Xe(JSON.parse(k)), U = ++$.current;
868
+ if (!n || !Ze(D)) {
859
869
  C([]), V(0), _(""), x(!1);
860
870
  return;
861
871
  }
862
872
  x(!0), _("");
863
873
  try {
864
- const I = await n({ filter: D, page: T });
865
- if (z !== $.current) return;
866
- C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
874
+ const F = await n({ filter: D, page: T });
875
+ if (U !== $.current) return;
876
+ C(F.list), V(F.total), f(F.page), K(F.pageSize), a && r(
867
877
  a,
868
- I.list.map((Y) => ({
878
+ F.list.map((Y) => ({
869
879
  value: Y.caseUniqueId,
870
880
  label: Y.name || Y.caseUniqueId
871
881
  }))
872
882
  );
873
- } catch (I) {
874
- if (z !== $.current) return;
875
- C([]), V(0), _(I instanceof Error ? I.message : "加载案例列表失败");
883
+ } catch (F) {
884
+ if (U !== $.current) return;
885
+ C([]), V(0), _(F instanceof Error ? F.message : "加载案例列表失败");
876
886
  } finally {
877
- z === $.current && x(!1);
887
+ U === $.current && x(!1);
878
888
  }
879
889
  },
880
890
  [n, k, a, r]
@@ -884,16 +894,16 @@ function Qr({ context: e }) {
884
894
  }, [k, te]);
885
895
  const E = (T) => {
886
896
  if (!t) return;
887
- const D = fn(
897
+ const D = pn(
888
898
  W,
889
899
  T,
890
- g,
900
+ y,
891
901
  S
892
902
  );
893
903
  D !== null && i(D);
894
- }, R = () => {
895
- const T = Ze(JSON.parse(k)), D = re || T.pageSize || 20, z = Math.max(1, Math.ceil(B / D)), I = p >= z ? 1 : p + 1;
896
- te(I);
904
+ }, P = () => {
905
+ const T = Xe(JSON.parse(k)), D = re || T.pageSize || 20, U = Math.max(1, Math.ceil(B / D)), F = p >= U ? 1 : p + 1;
906
+ te(F);
897
907
  };
898
908
  return /* @__PURE__ */ M(
899
909
  "div",
@@ -902,36 +912,36 @@ function Qr({ context: e }) {
902
912
  "data-skopon-field": a || void 0,
903
913
  children: [
904
914
  c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
905
- v && w.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
906
- /* @__PURE__ */ u(ft, { size: "small" }),
915
+ v && z.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
916
+ /* @__PURE__ */ u(dt, { size: "small" }),
907
917
  " 加载案例…"
908
918
  ] }) : null,
909
- !v && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: ee }) : null,
910
- w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
911
- Yr,
919
+ !v && z.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: ee }) : null,
920
+ z.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: z.map((T) => /* @__PURE__ */ u(
921
+ Zr,
912
922
  {
913
923
  item: T,
914
924
  selected: W.includes(T.caseUniqueId),
915
- disabled: pn(
925
+ disabled: hn(
916
926
  W,
917
927
  T.caseUniqueId,
918
928
  t,
919
- g,
929
+ y,
920
930
  S
921
931
  ),
922
932
  onToggle: () => E(T.caseUniqueId)
923
933
  },
924
934
  T.caseUniqueId
925
935
  )) }) : null,
926
- b && n && et(y) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
927
- Oe,
936
+ b && n && Ze(g) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
937
+ ze,
928
938
  {
929
939
  type: "default",
930
940
  size: "small",
931
941
  icon: /* @__PURE__ */ u(Yt, {}),
932
942
  loading: v,
933
943
  disabled: !t,
934
- onClick: R,
944
+ onClick: P,
935
945
  children: "换一批"
936
946
  }
937
947
  ) }) : null,
@@ -940,15 +950,15 @@ function Qr({ context: e }) {
940
950
  }
941
951
  );
942
952
  }
943
- const Xr = X(
944
- Wr,
945
- Qr
946
- ), Zr = {
953
+ const to = X(
954
+ Xr,
955
+ eo
956
+ ), no = {
947
957
  type: "case_multiselect",
948
958
  componentName: "SkoponCaseSelect",
949
- toComponent: zr,
950
- fromComponent: Or,
951
- catalogComponents: [Xr]
959
+ toComponent: qr,
960
+ fromComponent: Br,
961
+ catalogComponents: [to]
952
962
  };
953
963
  function Kt(e) {
954
964
  if (e == null) return;
@@ -956,7 +966,7 @@ function Kt(e) {
956
966
  if (!(!Number.isFinite(t) || t < 1))
957
967
  return Math.floor(t);
958
968
  }
959
- function eo(e, t) {
969
+ function ro(e, t) {
960
970
  var s, a, l, c;
961
971
  const { id: n, label: r, path: o, withData: i } = t;
962
972
  return i({
@@ -977,7 +987,7 @@ function eo(e, t) {
977
987
  value: { path: o }
978
988
  });
979
989
  }
980
- function to(e, t, n) {
990
+ function oo(e, t, n) {
981
991
  const r = n.nameFromValue(e.value), o = {
982
992
  ...t("resume_multiselect"),
983
993
  name: r,
@@ -999,29 +1009,29 @@ function to(e, t, n) {
999
1009
  const l = Kt(e.maxCount);
1000
1010
  return l !== void 0 && (o.resumeMaxCount = l), o;
1001
1011
  }
1002
- const yn = Se(null);
1003
- function ct({
1012
+ const vn = Ce(null);
1013
+ function lt({
1004
1014
  resumeSearch: e,
1005
1015
  children: t
1006
1016
  }) {
1007
- return /* @__PURE__ */ u(yn.Provider, { value: e ?? null, children: t });
1017
+ return /* @__PURE__ */ u(vn.Provider, { value: e ?? null, children: t });
1008
1018
  }
1009
- function no() {
1010
- return ke(yn);
1019
+ function io() {
1020
+ return Ae(vn);
1011
1021
  }
1012
- function tt(e) {
1022
+ function et(e) {
1013
1023
  return typeof e == "string" ? e : "";
1014
1024
  }
1015
- function nt(e) {
1025
+ function tt(e) {
1016
1026
  if (!e || typeof e != "object")
1017
1027
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
1018
1028
  const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], i = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), s = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
1019
1029
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
1020
1030
  }
1021
- function ro(e) {
1031
+ function so(e) {
1022
1032
  return JSON.stringify(e);
1023
1033
  }
1024
- const oo = {
1034
+ const ao = {
1025
1035
  name: "SkoponResumeSelect",
1026
1036
  schema: h.object({
1027
1037
  label: h.any().optional(),
@@ -1033,39 +1043,39 @@ const oo = {
1033
1043
  maxCount: h.any().optional(),
1034
1044
  value: h.any().optional()
1035
1045
  }).passthrough()
1036
- }, io = 3, so = 2;
1037
- function rt(e, t) {
1038
- const n = (t ?? []).filter(Boolean), r = n.slice(0, io), o = n.length - r.length;
1046
+ }, lo = 3, co = 2;
1047
+ function nt(e, t) {
1048
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, lo), o = n.length - r.length;
1039
1049
  return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags", children: [
1040
1050
  /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: e }),
1041
1051
  n.length > 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags-list", children: [
1042
- r.map((i) => /* @__PURE__ */ u(ge, { className: "skopon-resume-select-card-tag", children: i }, i)),
1043
- o > 0 ? /* @__PURE__ */ M(ge, { className: "skopon-resume-select-card-tag", children: [
1052
+ r.map((i) => /* @__PURE__ */ u(ve, { className: "skopon-resume-select-card-tag", children: i }, i)),
1053
+ o > 0 ? /* @__PURE__ */ M(ve, { className: "skopon-resume-select-card-tag", children: [
1044
1054
  "+",
1045
1055
  o
1046
1056
  ] }) : null
1047
1057
  ] }) : /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
1048
1058
  ] });
1049
1059
  }
1050
- function ao(e) {
1060
+ function uo(e) {
1051
1061
  return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-field", children: [
1052
1062
  /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
1053
1063
  /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
1054
1064
  ] });
1055
1065
  }
1056
- function lo({ work: e }) {
1066
+ function mo({ work: e }) {
1057
1067
  return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-work", children: [
1058
- /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ u(Yn, { className: "skopon-resume-select-card-work-placeholder" }) }),
1068
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ u(Xn, { className: "skopon-resume-select-card-work-placeholder" }) }),
1059
1069
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
1060
1070
  ] });
1061
1071
  }
1062
- function co({
1072
+ function fo({
1063
1073
  item: e,
1064
1074
  selected: t,
1065
1075
  disabled: n,
1066
1076
  onToggle: r
1067
1077
  }) {
1068
- const o = (e.works ?? []).slice(0, so);
1078
+ const o = (e.works ?? []).slice(0, co);
1069
1079
  return /* @__PURE__ */ M(
1070
1080
  "button",
1071
1081
  {
@@ -1075,61 +1085,61 @@ function co({
1075
1085
  onClick: r,
1076
1086
  children: [
1077
1087
  /* @__PURE__ */ u(
1078
- Ln,
1088
+ $n,
1079
1089
  {
1080
1090
  size: 48,
1081
1091
  src: e.avatarUrl || void 0,
1082
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Wn, {}),
1092
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Qn, {}),
1083
1093
  className: "skopon-resume-select-card-avatar"
1084
1094
  }
1085
1095
  ),
1086
1096
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
1087
1097
  /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-body", children: [
1088
- ao(e.satisfaction),
1089
- rt("性格", e.personality),
1090
- rt("专长", e.specialties),
1091
- rt("擅长领域", e.traits),
1098
+ uo(e.satisfaction),
1099
+ nt("性格", e.personality),
1100
+ nt("专长", e.specialties),
1101
+ nt("擅长领域", e.traits),
1092
1102
  /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-works", children: [
1093
1103
  /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
1094
- o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(lo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
1104
+ o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(mo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
1095
1105
  ] })
1096
1106
  ] })
1097
1107
  ]
1098
1108
  }
1099
1109
  );
1100
1110
  }
1101
- function uo({ context: e }) {
1102
- const { interactive: t } = se(), n = no(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
1111
+ function po({ context: e }) {
1112
+ const { interactive: t } = se(), n = io(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
1103
1113
  component: "SkoponResumeSelect",
1104
1114
  changeAction: "click"
1105
- }), l = e.componentModel.properties, c = tt(l.label), m = tt(l.placeholder), d = tt(l.help), b = l.enableRefresh !== !1, g = Pe(l.minCount), S = Pe(l.maxCount), y = L(() => nt(l.resumeFilter), [l.resumeFilter]), k = ro(y), [p, f] = P(1), [v, x] = P(!1), [N, _] = P(""), [w, C] = P([]), [B, V] = P(0), [re, K] = P(y.pageSize ?? 20), $ = A(0), W = Q(o);
1115
+ }), l = e.componentModel.properties, c = et(l.label), m = et(l.placeholder), d = et(l.help), b = l.enableRefresh !== !1, y = Re(l.minCount), S = Re(l.maxCount), g = L(() => tt(l.resumeFilter), [l.resumeFilter]), k = so(g), [p, f] = w(1), [v, x] = w(!1), [N, _] = w(""), [z, C] = w([]), [B, V] = w(0), [re, K] = w(g.pageSize ?? 20), $ = A(0), W = Q(o);
1106
1116
  q(() => {
1107
- const T = hn(W, S);
1117
+ const T = gn(W, S);
1108
1118
  T !== null && s(T);
1109
1119
  }, [S, W, s]);
1110
1120
  const ee = j(
1111
1121
  async (T) => {
1112
- const D = nt(JSON.parse(k)), z = ++$.current;
1122
+ const D = tt(JSON.parse(k)), U = ++$.current;
1113
1123
  if (!n) {
1114
1124
  C([]), V(0), _("未配置简历搜索服务"), x(!1);
1115
1125
  return;
1116
1126
  }
1117
1127
  x(!0), _("");
1118
1128
  try {
1119
- const I = await n({ filter: D, page: T });
1120
- if (z !== $.current) return;
1121
- C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
1129
+ const F = await n({ filter: D, page: T });
1130
+ if (U !== $.current) return;
1131
+ C(F.list), V(F.total), f(F.page), K(F.pageSize), a && r(
1122
1132
  a,
1123
- I.list.map((Y) => ({
1133
+ F.list.map((Y) => ({
1124
1134
  value: Y.resumeUniqueId,
1125
1135
  label: Y.name || Y.resumeUniqueId
1126
1136
  }))
1127
1137
  );
1128
- } catch (I) {
1129
- if (z !== $.current) return;
1130
- C([]), V(0), _(I instanceof Error ? I.message : "加载简历列表失败");
1138
+ } catch (F) {
1139
+ if (U !== $.current) return;
1140
+ C([]), V(0), _(F instanceof Error ? F.message : "加载简历列表失败");
1131
1141
  } finally {
1132
- z === $.current && x(!1);
1142
+ U === $.current && x(!1);
1133
1143
  }
1134
1144
  },
1135
1145
  [n, k, a, r]
@@ -1139,17 +1149,17 @@ function uo({ context: e }) {
1139
1149
  }, [k, ee]);
1140
1150
  const te = (T) => {
1141
1151
  if (!t) return;
1142
- const D = fn(
1152
+ const D = pn(
1143
1153
  W,
1144
1154
  T,
1145
- g,
1155
+ y,
1146
1156
  S
1147
1157
  );
1148
1158
  D !== null && i(D);
1149
1159
  }, E = () => {
1150
- const T = nt(JSON.parse(k)), D = re || T.pageSize || 20, z = Math.max(1, Math.ceil(B / D)), I = p >= z ? 1 : p + 1;
1151
- ee(I);
1152
- }, R = m || "暂无匹配的简历";
1160
+ const T = tt(JSON.parse(k)), D = re || T.pageSize || 20, U = Math.max(1, Math.ceil(B / D)), F = p >= U ? 1 : p + 1;
1161
+ ee(F);
1162
+ }, P = m || "暂无匹配的简历";
1153
1163
  return /* @__PURE__ */ M(
1154
1164
  "div",
1155
1165
  {
@@ -1157,22 +1167,22 @@ function uo({ context: e }) {
1157
1167
  "data-skopon-field": a || void 0,
1158
1168
  children: [
1159
1169
  c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
1160
- v && w.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
1161
- /* @__PURE__ */ u(ft, { size: "small" }),
1170
+ v && z.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
1171
+ /* @__PURE__ */ u(dt, { size: "small" }),
1162
1172
  " 加载简历…"
1163
1173
  ] }) : null,
1164
1174
  !v && N ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "skopon-resume-select-status", children: N }) : null,
1165
- !v && !N && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: R }) : null,
1166
- w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
1167
- co,
1175
+ !v && !N && z.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: P }) : null,
1176
+ z.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: z.map((T) => /* @__PURE__ */ u(
1177
+ fo,
1168
1178
  {
1169
1179
  item: T,
1170
1180
  selected: W.includes(T.resumeUniqueId),
1171
- disabled: pn(
1181
+ disabled: hn(
1172
1182
  W,
1173
1183
  T.resumeUniqueId,
1174
1184
  t,
1175
- g,
1185
+ y,
1176
1186
  S
1177
1187
  ),
1178
1188
  onToggle: () => te(T.resumeUniqueId)
@@ -1180,7 +1190,7 @@ function uo({ context: e }) {
1180
1190
  T.resumeUniqueId
1181
1191
  )) }) : null,
1182
1192
  b && n ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1183
- Oe,
1193
+ ze,
1184
1194
  {
1185
1195
  type: "default",
1186
1196
  size: "small",
@@ -1196,34 +1206,34 @@ function uo({ context: e }) {
1196
1206
  }
1197
1207
  );
1198
1208
  }
1199
- const mo = X(
1200
- oo,
1201
- uo
1202
- ), fo = {
1209
+ const ho = X(
1210
+ ao,
1211
+ po
1212
+ ), go = {
1203
1213
  type: "resume_multiselect",
1204
1214
  componentName: "SkoponResumeSelect",
1205
- toComponent: eo,
1206
- fromComponent: to,
1207
- catalogComponents: [mo]
1208
- }, Be = [fo, Zr], po = new Map(
1209
- Be.map((e) => [e.type, e])
1210
- ), ho = new Map(
1211
- Be.map((e) => [e.componentName, e])
1215
+ toComponent: ro,
1216
+ fromComponent: oo,
1217
+ catalogComponents: [ho]
1218
+ }, qe = [go, no], yo = new Map(
1219
+ qe.map((e) => [e.type, e])
1220
+ ), vo = new Map(
1221
+ qe.map((e) => [e.componentName, e])
1212
1222
  );
1213
- function go(e) {
1214
- return po.get(e);
1223
+ function bo(e) {
1224
+ return yo.get(e);
1215
1225
  }
1216
- function yo(e) {
1217
- return ho.get(e);
1226
+ function So(e) {
1227
+ return vo.get(e);
1218
1228
  }
1219
- function vo() {
1220
- return Be.flatMap((e) => e.catalogComponents);
1229
+ function ko() {
1230
+ return qe.flatMap((e) => e.catalogComponents);
1221
1231
  }
1222
- function bo() {
1223
- return Be.map((e) => e.componentName);
1232
+ function Co() {
1233
+ return qe.map((e) => e.componentName);
1224
1234
  }
1225
- const we = "root", ut = "__title__", mt = "__desc__", yt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1226
- function So(e) {
1235
+ const Pe = "root", ct = "__title__", ut = "__desc__", yt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1236
+ function Ao(e) {
1227
1237
  return `/${e}`;
1228
1238
  }
1229
1239
  function Jt(e) {
@@ -1232,27 +1242,27 @@ function Jt(e) {
1232
1242
  function H(e) {
1233
1243
  if (typeof e == "string") return e;
1234
1244
  }
1235
- function ko(e) {
1245
+ function _o(e) {
1236
1246
  const t = e.id || le("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1237
1247
  return {
1238
1248
  id: t,
1239
1249
  component: "SkoponMedia",
1240
1250
  mediaType: n,
1241
- urls: Cr(e),
1242
- mediaSize: _e(e.mediaSize),
1251
+ urls: _r(e),
1252
+ mediaSize: Te(e.mediaSize),
1243
1253
  label: e.label ?? "",
1244
1254
  help: e.help ?? "",
1245
1255
  placeholder: e.placeholder ?? ""
1246
1256
  };
1247
1257
  }
1248
- function Co(e) {
1258
+ function To(e) {
1249
1259
  if (Array.isArray(e.urls))
1250
1260
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
1251
1261
  const t = H(e.url);
1252
1262
  return t != null && t.trim() ? [t.trim()] : [];
1253
1263
  }
1254
- function Fe(e, t, n) {
1255
- const r = typeof e.id == "string" ? e.id : le("block-"), o = Co(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = _e(e.mediaSize);
1264
+ function Ie(e, t, n) {
1265
+ const r = typeof e.id == "string" ? e.id : le("block-"), o = To(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = Te(e.mediaSize);
1256
1266
  return {
1257
1267
  id: r,
1258
1268
  type: t,
@@ -1266,7 +1276,7 @@ function Fe(e, t, n) {
1266
1276
  function Gt(e) {
1267
1277
  switch (e.type) {
1268
1278
  case "toggle":
1269
- return Te(e.defaultValue);
1279
+ return xe(e.defaultValue);
1270
1280
  case "multiselect":
1271
1281
  case "checkbox":
1272
1282
  case "resume_multiselect":
@@ -1280,9 +1290,9 @@ function Gt(e) {
1280
1290
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
1281
1291
  }
1282
1292
  }
1283
- function Ao(e) {
1293
+ function xo(e) {
1284
1294
  var c;
1285
- const t = e.id || le("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? So(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: Gt(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = go(e.type);
1295
+ const t = e.id || le("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? Ao(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: Gt(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = bo(e.type);
1286
1296
  if (l)
1287
1297
  return l.toComponent(e, a);
1288
1298
  switch (e.type) {
@@ -1401,7 +1411,7 @@ function Ao(e) {
1401
1411
  case "image":
1402
1412
  case "video":
1403
1413
  case "audio":
1404
- return { node: ko(e) };
1414
+ return { node: _o(e) };
1405
1415
  case "file":
1406
1416
  return s({
1407
1417
  id: t,
@@ -1418,31 +1428,31 @@ function Ao(e) {
1418
1428
  return { node: null };
1419
1429
  }
1420
1430
  }
1421
- function dt(e) {
1431
+ function mt(e) {
1422
1432
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
1423
- const t = e.components.find((r) => r.id === we);
1433
+ const t = e.components.find((r) => r.id === Pe);
1424
1434
  if (!t) return e.components.length === 0;
1425
1435
  const n = t.children;
1426
1436
  return !Array.isArray(n) || n.length === 0;
1427
1437
  }
1428
- function vn(e, t) {
1438
+ function bn(e, t) {
1429
1439
  const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
1430
- i && s && (n.push({ id: ut, component: "Text", text: s, variant: "h2" }), r.push(ut)), i && a && (n.push({ id: mt, component: "Text", text: a, variant: "body" }), r.push(mt));
1440
+ i && s && (n.push({ id: ct, component: "Text", text: s, variant: "h2" }), r.push(ct)), i && a && (n.push({ id: ut, component: "Text", text: a, variant: "body" }), r.push(ut));
1431
1441
  for (const m of e.blocks ?? []) {
1432
- const { node: d, dataKey: b, dataValue: g } = Ao(m);
1433
- b && (o[b] = g), d && (n.push(d), r.push(d.id));
1442
+ const { node: d, dataKey: b, dataValue: y } = xo(m);
1443
+ b && (o[b] = y), d && (n.push(d), r.push(d.id));
1434
1444
  }
1435
- n.unshift({ id: we, component: "Column", children: r });
1436
- const l = { root: we, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
1445
+ n.unshift({ id: Pe, component: "Column", children: r });
1446
+ const l = { root: Pe, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
1437
1447
  return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
1438
1448
  }
1439
- function _o(e) {
1449
+ function Mo(e) {
1440
1450
  const t = /* @__PURE__ */ new Map();
1441
1451
  for (const n of e.components ?? [])
1442
1452
  n && typeof n.id == "string" && t.set(n.id, n);
1443
1453
  return t;
1444
1454
  }
1445
- function ot(e) {
1455
+ function rt(e) {
1446
1456
  const t = e.options;
1447
1457
  return Array.isArray(t) ? t.map((n) => {
1448
1458
  if (!n || typeof n != "object") return null;
@@ -1453,8 +1463,8 @@ function ot(e) {
1453
1463
  };
1454
1464
  }).filter((n) => !!n) : [];
1455
1465
  }
1456
- function To(e) {
1457
- const t = typeof e.id == "string" ? e.id : le("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Jt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = yo(n);
1466
+ function No(e) {
1467
+ const t = typeof e.id == "string" ? e.id : le("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Jt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = So(n);
1458
1468
  if (s)
1459
1469
  return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Jt });
1460
1470
  switch (n) {
@@ -1475,7 +1485,7 @@ function To(e) {
1475
1485
  const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
1476
1486
  ...i(l),
1477
1487
  name: o,
1478
- options: ot(e)
1488
+ options: rt(e)
1479
1489
  }, m = H(e.placeholder);
1480
1490
  return m && (c.placeholder = m), c;
1481
1491
  }
@@ -1485,12 +1495,12 @@ function To(e) {
1485
1495
  const m = {
1486
1496
  ...i(a),
1487
1497
  name: o,
1488
- options: ot(e)
1498
+ options: rt(e)
1489
1499
  }, d = H(e.placeholder);
1490
1500
  return d && (m.placeholder = d), m;
1491
1501
  }
1492
1502
  const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1493
- return { ...i(c), name: o, options: ot(e) };
1503
+ return { ...i(c), name: o, options: rt(e) };
1494
1504
  }
1495
1505
  case "DateTimeInput": {
1496
1506
  const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = H(e.placeholder);
@@ -1498,14 +1508,14 @@ function To(e) {
1498
1508
  }
1499
1509
  case "SkoponMedia": {
1500
1510
  const a = String(e.mediaType ?? "image");
1501
- return Fe(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
1511
+ return Ie(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
1502
1512
  }
1503
1513
  case "Image":
1504
- return Fe(e, "image", r);
1514
+ return Ie(e, "image", r);
1505
1515
  case "Video":
1506
- return Fe(e, "video", r);
1516
+ return Ie(e, "video", r);
1507
1517
  case "AudioPlayer":
1508
- return Fe(e, "audio", r);
1518
+ return Ie(e, "audio", r);
1509
1519
  case "FileUpload": {
1510
1520
  const a = H(e.accept) ?? "", l = { ...i("file"), name: o };
1511
1521
  return a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
@@ -1514,7 +1524,7 @@ function To(e) {
1514
1524
  return null;
1515
1525
  }
1516
1526
  }
1517
- function bn(e, t, n, r) {
1527
+ function Sn(e, t, n, r) {
1518
1528
  if (n.has(e)) return;
1519
1529
  n.add(e);
1520
1530
  const o = t.get(e);
@@ -1522,46 +1532,46 @@ function bn(e, t, n, r) {
1522
1532
  const i = String(o.component ?? "");
1523
1533
  if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
1524
1534
  for (const s of o.children)
1525
- typeof s == "string" && bn(s, t, n, r);
1535
+ typeof s == "string" && Sn(s, t, n, r);
1526
1536
  return;
1527
1537
  }
1528
1538
  r.push(o);
1529
1539
  }
1530
- function xo(e, t) {
1540
+ function Io(e, t) {
1531
1541
  return t ? e.map((n) => {
1532
1542
  var i;
1533
1543
  const r = (i = n.name) == null ? void 0 : i.trim();
1534
1544
  if (!r || !(r in t)) return n;
1535
1545
  const o = t[r];
1536
- return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Te(o) } : { ...n, defaultValue: o };
1546
+ return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: xe(o) } : { ...n, defaultValue: o };
1537
1547
  }) : e;
1538
1548
  }
1539
- function Mo(e) {
1549
+ function Fo(e) {
1540
1550
  if (!e || !Array.isArray(e.components))
1541
- return ye({ title: "", description: "", blocks: [] });
1542
- const t = _o(e), n = [];
1543
- bn(e.root ?? we, t, /* @__PURE__ */ new Set(), n);
1551
+ return be({ title: "", description: "", blocks: [] });
1552
+ const t = Mo(e), n = [];
1553
+ Sn(e.root ?? Pe, t, /* @__PURE__ */ new Set(), n);
1544
1554
  let r = "", o = "";
1545
1555
  const i = [];
1546
1556
  for (const s of n) {
1547
- if (s.id === ut) {
1557
+ if (s.id === ct) {
1548
1558
  r = H(s.text) ?? r;
1549
1559
  continue;
1550
1560
  }
1551
- if (s.id === mt) {
1561
+ if (s.id === ut) {
1552
1562
  o = H(s.text) ?? o;
1553
1563
  continue;
1554
1564
  }
1555
- const a = To(s);
1565
+ const a = No(s);
1556
1566
  a && i.push(a);
1557
1567
  }
1558
- return ye({
1568
+ return be({
1559
1569
  title: r,
1560
1570
  description: o,
1561
- blocks: xo(i, e.dataModel)
1571
+ blocks: Io(i, e.dataModel)
1562
1572
  });
1563
1573
  }
1564
- function No(e, t) {
1574
+ function Eo(e, t) {
1565
1575
  const { surfaceId: n, catalogId: r } = t, o = [
1566
1576
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1567
1577
  {
@@ -1574,25 +1584,25 @@ function No(e, t) {
1574
1584
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1575
1585
  }), o;
1576
1586
  }
1577
- function Sn(e) {
1587
+ function kn(e) {
1578
1588
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1579
1589
  }
1580
- function Io(e, t) {
1590
+ function Uo(e, t) {
1581
1591
  if (!e || typeof e != "object") return null;
1582
- const n = e, r = Sn(n.a2ui) ? n.a2ui : void 0;
1583
- if (r && !dt(r)) return r;
1592
+ const n = e, r = kn(n.a2ui) ? n.a2ui : void 0;
1593
+ if (r && !mt(r)) return r;
1584
1594
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1585
1595
  if (o.length === 0) return null;
1586
- const i = qe({
1596
+ const i = Oe({
1587
1597
  title: typeof n.title == "string" ? n.title : "",
1588
1598
  description: typeof n.description == "string" ? n.description : "",
1589
1599
  blocks: o,
1590
- jsonSchema: on(n.jsonSchema ?? n.json_schema)
1591
- }), s = vn(i, t);
1592
- return dt(s) ? null : s;
1600
+ jsonSchema: sn(n.jsonSchema ?? n.json_schema)
1601
+ }), s = bn(i, t);
1602
+ return mt(s) ? null : s;
1593
1603
  }
1594
- function Fo(e, t, n) {
1595
- return vn(
1604
+ function Ro(e, t, n) {
1605
+ return bn(
1596
1606
  {
1597
1607
  title: e.title,
1598
1608
  description: e.description,
@@ -1601,18 +1611,18 @@ function Fo(e, t, n) {
1601
1611
  n
1602
1612
  );
1603
1613
  }
1604
- function Eo(e) {
1614
+ function Po(e) {
1605
1615
  if (!e || typeof e != "object" || Array.isArray(e))
1606
1616
  return;
1607
1617
  const t = e;
1608
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Sn(t.a2ui) ? Mo(t.a2ui) : qe({
1618
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && kn(t.a2ui) ? Fo(t.a2ui) : Oe({
1609
1619
  title: typeof t.title == "string" ? t.title : "",
1610
1620
  description: typeof t.description == "string" ? t.description : "",
1611
1621
  blocks: Array.isArray(t.blocks) ? t.blocks : [],
1612
- jsonSchema: on(t.jsonSchema ?? t.json_schema)
1622
+ jsonSchema: sn(t.jsonSchema ?? t.json_schema)
1613
1623
  });
1614
1624
  }
1615
- function Uo(e, t, n) {
1625
+ function wo(e, t, n) {
1616
1626
  const r = e.model.surfacesMap.get(t);
1617
1627
  if (!r) return {};
1618
1628
  const o = {};
@@ -1622,18 +1632,18 @@ function Uo(e, t, n) {
1622
1632
  }
1623
1633
  return o;
1624
1634
  }
1625
- const Ro = /* @__PURE__ */ new Set(["type", "name", "id"]);
1635
+ const zo = /* @__PURE__ */ new Set(["type", "name", "id"]);
1626
1636
  function vt(e) {
1627
1637
  return e.type === "text" && e.hidden === !0;
1628
1638
  }
1629
1639
  function bt(e) {
1630
- return qe({
1640
+ return Oe({
1631
1641
  title: "",
1632
1642
  description: "",
1633
1643
  blocks: [e]
1634
1644
  }).blocks[0];
1635
1645
  }
1636
- function Po(e, t) {
1646
+ function Oo(e, t) {
1637
1647
  var o, i;
1638
1648
  const n = /* @__PURE__ */ new Map();
1639
1649
  for (const s of t) {
@@ -1642,7 +1652,7 @@ function Po(e, t) {
1642
1652
  }
1643
1653
  const r = [];
1644
1654
  for (const s of e.blocks) {
1645
- if (Ce(s.type)) {
1655
+ if (rn(s.type)) {
1646
1656
  r.push(bt(s));
1647
1657
  continue;
1648
1658
  }
@@ -1654,7 +1664,7 @@ function Po(e, t) {
1654
1664
  }
1655
1665
  return r;
1656
1666
  }
1657
- function wo(e, t, n) {
1667
+ function qo(e, t, n) {
1658
1668
  const r = e.rawBlocks;
1659
1669
  if (!(r != null && r.length)) return n;
1660
1670
  for (const o of r) {
@@ -1663,23 +1673,23 @@ function wo(e, t, n) {
1663
1673
  }
1664
1674
  return n;
1665
1675
  }
1666
- function zo(e, t) {
1676
+ function Bo(e, t) {
1667
1677
  var r;
1668
1678
  const n = { ...e };
1669
1679
  for (const o of Object.keys(t)) {
1670
- if (Ro.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1680
+ if (zo.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1671
1681
  const i = t[o];
1672
1682
  i !== void 0 && Object.assign(n, { [o]: i });
1673
1683
  }
1674
1684
  return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, bt(n);
1675
1685
  }
1676
- function Ve(e) {
1686
+ function Be(e) {
1677
1687
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1678
1688
  const t = e;
1679
1689
  if (!Array.isArray(t.blocks)) return null;
1680
1690
  const n = t.blocks.filter(
1681
1691
  (o) => !!o && typeof o == "object" && !Array.isArray(o)
1682
- ), r = qe({
1692
+ ), r = Oe({
1683
1693
  title: typeof t.title == "string" ? t.title : "",
1684
1694
  description: typeof t.description == "string" ? t.description : "",
1685
1695
  blocks: n
@@ -1691,7 +1701,7 @@ function Ve(e) {
1691
1701
  rawBlocks: n
1692
1702
  };
1693
1703
  }
1694
- function Oo(e, t) {
1704
+ function Vo(e, t) {
1695
1705
  var i, s, a, l, c, m;
1696
1706
  const n = /* @__PURE__ */ new Map();
1697
1707
  for (const d of (t == null ? void 0 : t.blocks) ?? [])
@@ -1701,36 +1711,36 @@ function Oo(e, t) {
1701
1711
  if (!Z(d.type)) continue;
1702
1712
  const b = (s = d.name) == null ? void 0 : s.trim();
1703
1713
  if (!b) continue;
1704
- const g = n.get(b);
1705
- if (g) {
1706
- const S = wo(e, b, d);
1707
- r.push(zo(g, S));
1714
+ const y = n.get(b);
1715
+ if (y) {
1716
+ const S = qo(e, b, d);
1717
+ r.push(Bo(y, S));
1708
1718
  } else
1709
1719
  o.push(bt(d));
1710
1720
  }
1711
1721
  return {
1712
1722
  matchedBlocks: r,
1713
1723
  extraBlocks: o,
1714
- renderBlocks: Po(e, r),
1724
+ renderBlocks: Oo(e, r),
1715
1725
  title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
1716
1726
  description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1717
1727
  };
1718
1728
  }
1719
- function kn(e) {
1729
+ function Cn(e) {
1720
1730
  const { type: t, defaultValue: n } = e;
1721
1731
  return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? [] : t === "number" ? null : "";
1722
1732
  }
1723
- function ze(e) {
1733
+ function we(e) {
1724
1734
  var n;
1725
1735
  const t = {};
1726
1736
  for (const r of e) {
1727
1737
  if (!Z(r.type)) continue;
1728
1738
  const o = (n = r.name) == null ? void 0 : n.trim();
1729
- o && (t[o] = kn(r));
1739
+ o && (t[o] = Cn(r));
1730
1740
  }
1731
1741
  return t;
1732
1742
  }
1733
- function qo(e) {
1743
+ function Lo(e) {
1734
1744
  return e.blocks.some(
1735
1745
  (t) => {
1736
1746
  var n;
@@ -1738,71 +1748,71 @@ function qo(e) {
1738
1748
  }
1739
1749
  );
1740
1750
  }
1741
- function Bo(e) {
1751
+ function jo(e) {
1742
1752
  return e.blocks.filter((t) => {
1743
1753
  var n;
1744
- return Ce(t.type) ? !0 : !Z(t.type) || !((n = t.name) != null && n.trim()) ? !1 : !vt(t);
1754
+ return rn(t.type) ? !0 : !Z(t.type) || !((n = t.name) != null && n.trim()) ? !1 : !vt(t);
1745
1755
  });
1746
1756
  }
1747
- function ys(e) {
1757
+ function bs(e) {
1748
1758
  return e.blocks.filter((t) => {
1749
1759
  var n;
1750
1760
  return Z(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1751
1761
  }).map((t) => t.name.trim());
1752
1762
  }
1753
- function Vo(e) {
1763
+ function $o(e) {
1754
1764
  var n;
1755
1765
  const t = {};
1756
1766
  for (const r of e.blocks) {
1757
1767
  if (!vt(r)) continue;
1758
1768
  const o = (n = r.name) == null ? void 0 : n.trim();
1759
- o && (t[o] = kn(r));
1769
+ o && (t[o] = Cn(r));
1760
1770
  }
1761
1771
  return t;
1762
1772
  }
1763
1773
  function St(e) {
1764
1774
  return e.replace(/'/g, "'\\''");
1765
1775
  }
1766
- function Cn(e) {
1776
+ function An(e) {
1767
1777
  var n;
1768
1778
  const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
1769
1779
  return t ? ` -H 'Authorization: ${St(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
1770
1780
  }
1771
- function An(e, t, n) {
1781
+ function _n(e, t, n) {
1772
1782
  const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
1773
1783
  return [
1774
1784
  `curl -X POST '${r}' \\`,
1775
1785
  " -H 'Content-Type: application/json' \\",
1776
- Cn(n),
1786
+ An(n),
1777
1787
  ` -d '${St(o)}'`
1778
1788
  ].join(`
1779
1789
  `);
1780
1790
  }
1781
- function Lo(e, t) {
1791
+ function Do(e, t) {
1782
1792
  return JSON.stringify({ ...e, ...t }, null, 2);
1783
1793
  }
1784
- function jo({
1794
+ function Ho({
1785
1795
  cardValues: e,
1786
1796
  extraValues: t = {},
1787
1797
  callbackUrl: n,
1788
1798
  headers: r
1789
1799
  }) {
1790
- const o = (n ?? "").trim() || "<callback_url>", i = Lo(e, t);
1800
+ const o = (n ?? "").trim() || "<callback_url>", i = Do(e, t);
1791
1801
  return [
1792
1802
  `curl -X POST '${o}' \\`,
1793
1803
  " -H 'Content-Type: application/json' \\",
1794
- Cn(r),
1804
+ An(r),
1795
1805
  ` -d '${St(i)}'`
1796
1806
  ].join(`
1797
1807
  `);
1798
1808
  }
1799
- function vs(e, t, n) {
1800
- const r = Ve(e);
1801
- if (!r) return An(e, t, n);
1802
- const o = ze(r.blocks);
1803
- return jo({ cardValues: o, callbackUrl: t, headers: n });
1809
+ function Ss(e, t, n) {
1810
+ const r = Be(e);
1811
+ if (!r) return _n(e, t, n);
1812
+ const o = we(r.blocks);
1813
+ return Ho({ cardValues: o, callbackUrl: t, headers: n });
1804
1814
  }
1805
- async function _n(e, t, n) {
1815
+ async function Tn(e, t, n) {
1806
1816
  const r = e.trim();
1807
1817
  if (!r)
1808
1818
  throw new Error("callback_url 为空");
@@ -1829,7 +1839,7 @@ async function _n(e, t, n) {
1829
1839
  }
1830
1840
  return { ok: i.ok, status: i.status, body: s };
1831
1841
  }
1832
- async function bs(e) {
1842
+ async function ks(e) {
1833
1843
  var n;
1834
1844
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1835
1845
  await navigator.clipboard.writeText(e);
@@ -1858,7 +1868,7 @@ async function kt(e) {
1858
1868
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1859
1869
  return t.data;
1860
1870
  }
1861
- const Ct = "auth_user", $o = "token", Do = "answer_agent_callback_url", Ho = "realtime_ws_url", Ko = "/api/v1/mock/ask_user_answer_mock";
1871
+ const Ct = "auth_user", Ko = "token", Jo = "answer_agent_callback_url", Go = "realtime_ws_url", Wo = "/api/v1/mock/ask_user_answer_mock";
1862
1872
  function At(e) {
1863
1873
  if (typeof window > "u") return null;
1864
1874
  try {
@@ -1875,24 +1885,24 @@ function _t(e) {
1875
1885
  return null;
1876
1886
  }
1877
1887
  }
1878
- function Jo(e, t) {
1888
+ function Yo(e, t) {
1879
1889
  const n = _t(e);
1880
1890
  if (!n) return "";
1881
1891
  const r = n[t];
1882
1892
  return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
1883
1893
  }
1884
- function Go(e = {}) {
1885
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.answerAgentCallbackUrlField ?? Do, o = At(t);
1894
+ function Qo(e = {}) {
1895
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.answerAgentCallbackUrlField ?? Jo, o = At(t);
1886
1896
  if (!o) return "";
1887
1897
  const i = o.getItem(n);
1888
1898
  if (!i) return "";
1889
1899
  const s = _t(i);
1890
1900
  if (!s) return "";
1891
1901
  const a = s[r];
1892
- return (typeof a == "string" ? a.trim() : "") || Ko;
1902
+ return (typeof a == "string" ? a.trim() : "") || Wo;
1893
1903
  }
1894
- function Wo(e = {}) {
1895
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.realtimeWsUrlField ?? Ho, o = At(t);
1904
+ function Xo(e = {}) {
1905
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.realtimeWsUrlField ?? Go, o = At(t);
1896
1906
  if (!o) return "";
1897
1907
  const i = o.getItem(n);
1898
1908
  if (!i) return "";
@@ -1903,22 +1913,22 @@ function Wo(e = {}) {
1903
1913
  }
1904
1914
  function Tt(e, t) {
1905
1915
  return {
1906
- ...Tn(t),
1916
+ ...xn(t),
1907
1917
  ...e ?? {}
1908
1918
  };
1909
1919
  }
1910
- function Tn(e = {}) {
1911
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.tokenField ?? $o, o = At(t);
1920
+ function xn(e = {}) {
1921
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.tokenField ?? Ko, o = At(t);
1912
1922
  if (!o) return {};
1913
1923
  const i = o.getItem(n);
1914
1924
  if (!i) return {};
1915
- const s = Jo(i, r);
1925
+ const s = Yo(i, r);
1916
1926
  return s ? { Authorization: `Bearer ${s}` } : {};
1917
1927
  }
1918
1928
  async function xt(e = {}) {
1919
- return e.getHeaders ? await e.getHeaders() ?? {} : Tn(e.authStorage);
1929
+ return e.getHeaders ? await e.getHeaders() ?? {} : xn(e.authStorage);
1920
1930
  }
1921
- function Yo(e = {}) {
1931
+ function Zo(e = {}) {
1922
1932
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1923
1933
  async function o(i) {
1924
1934
  const s = new URLSearchParams();
@@ -1931,18 +1941,18 @@ function Yo(e = {}) {
1931
1941
  const a = await xt(e), l = await r(`${t}${n}?${s.toString()}`, {
1932
1942
  method: "GET",
1933
1943
  headers: a
1934
- }), c = await kt(l), m = Eo(c.form_definition);
1944
+ }), c = await kt(l), m = Po(c.form_definition);
1935
1945
  return {
1936
1946
  formUniqueId: c.form_unique_id,
1937
1947
  formId: c.form_id,
1938
1948
  disabled: c.disabled === 1,
1939
1949
  formDefinition: m,
1940
- a2ui: Io(c.form_definition) ?? void 0
1950
+ a2ui: Uo(c.form_definition) ?? void 0
1941
1951
  };
1942
1952
  }
1943
1953
  return { fetchDetail: o };
1944
1954
  }
1945
- function Qo(e) {
1955
+ function ei(e) {
1946
1956
  if (!e || typeof e != "object" || Array.isArray(e))
1947
1957
  return e ?? null;
1948
1958
  const t = e;
@@ -1958,7 +1968,7 @@ function Mt({
1958
1968
  form: n,
1959
1969
  answer: r
1960
1970
  }) {
1961
- const o = Ve(t) ?? t, i = n ? Qo(n) : o;
1971
+ const o = Be(t) ?? t, i = n ? ei(n) : o;
1962
1972
  return {
1963
1973
  mission_id: e.missionId ?? null,
1964
1974
  tenant_id: e.tenantId ?? null,
@@ -1986,7 +1996,7 @@ function Nt(e) {
1986
1996
  const o = e.mission_id;
1987
1997
  return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
1988
1998
  }
1989
- function Ss(e) {
1999
+ function Cs(e) {
1990
2000
  return Nt(
1991
2001
  Mt({
1992
2002
  context: e,
@@ -1996,24 +2006,24 @@ function Ss(e) {
1996
2006
  );
1997
2007
  }
1998
2008
  const Wt = "answer_agent_callback_url 未配置,无法提交";
1999
- function Xo(e) {
2009
+ function ti(e) {
2000
2010
  if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
2001
2011
  const n = e.answerAgentCallbackUrl.trim();
2002
2012
  if (!n)
2003
2013
  throw new Error(Wt);
2004
2014
  return n;
2005
2015
  }
2006
- const t = Go(e == null ? void 0 : e.authStorage).trim();
2016
+ const t = Qo(e == null ? void 0 : e.authStorage).trim();
2007
2017
  if (!t)
2008
2018
  throw new Error(Wt);
2009
2019
  return t;
2010
2020
  }
2011
- function xn(e) {
2021
+ function Mn(e) {
2012
2022
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
2013
2023
  const n = e.data;
2014
2024
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
2015
2025
  }
2016
- function Zo(e, t) {
2026
+ function ni(e, t) {
2017
2027
  if (t && typeof t == "object" && t !== null && "message" in t) {
2018
2028
  const n = t.message;
2019
2029
  if (typeof n == "string" && n.trim())
@@ -2021,27 +2031,27 @@ function Zo(e, t) {
2021
2031
  }
2022
2032
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
2023
2033
  }
2024
- function ei(e) {
2034
+ function ri(e) {
2025
2035
  return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
2026
2036
  }
2027
- function Mn(e) {
2028
- const t = xn(e.body);
2029
- return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: ei(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2037
+ function Nn(e) {
2038
+ const t = Mn(e.body);
2039
+ return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: ri(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2030
2040
  type: "error",
2031
- message: Zo(e.status, e.body)
2041
+ message: ni(e.status, e.body)
2032
2042
  };
2033
2043
  }
2034
- async function Nn(e, t) {
2044
+ async function In(e, t) {
2035
2045
  const n = Nt(e);
2036
2046
  if (n)
2037
2047
  throw new Error(n);
2038
- const r = Xo(t), o = await _n(r, e, {
2048
+ const r = ti(t), o = await Tn(r, e, {
2039
2049
  ...t,
2040
2050
  headers: Tt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
2041
- }), i = xn(o.body);
2051
+ }), i = Mn(o.body);
2042
2052
  return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
2043
2053
  }
2044
- function ti(e) {
2054
+ function oi(e) {
2045
2055
  return {
2046
2056
  resumeUniqueId: e.resume_unique_id,
2047
2057
  resumeId: e.resume_id,
@@ -2062,7 +2072,7 @@ function ti(e) {
2062
2072
  }))
2063
2073
  };
2064
2074
  }
2065
- function ni(e, t, n) {
2075
+ function ii(e, t, n) {
2066
2076
  const r = new URLSearchParams();
2067
2077
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
2068
2078
  for (const o of e.names ?? [])
@@ -2075,27 +2085,27 @@ function ni(e, t, n) {
2075
2085
  r.append("published", String(o));
2076
2086
  return r;
2077
2087
  }
2078
- function ri(e = {}) {
2088
+ function si(e = {}) {
2079
2089
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
2080
2090
  return async ({ filter: i, page: s }) => {
2081
- const a = await xt(e), l = ni(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2091
+ const a = await xt(e), l = ii(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2082
2092
  method: "GET",
2083
2093
  headers: a
2084
2094
  }), m = await kt(c);
2085
2095
  return {
2086
- list: (m.list ?? []).map(ti),
2096
+ list: (m.list ?? []).map(oi),
2087
2097
  total: m.total ?? 0,
2088
2098
  page: m.page ?? s,
2089
2099
  pageSize: m.page_size ?? i.pageSize ?? 20
2090
2100
  };
2091
2101
  };
2092
2102
  }
2093
- function oi(e) {
2103
+ function ai(e) {
2094
2104
  var r, o, i, s;
2095
2105
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!((o = e.agentUniqueId) != null && o.trim() && ((i = e.flowType) != null && i.trim()) && ((s = e.category) != null && s.trim()));
2096
2106
  return t || n;
2097
2107
  }
2098
- function ii(e) {
2108
+ function li(e) {
2099
2109
  return {
2100
2110
  caseUniqueId: e.case_unique_id,
2101
2111
  caseId: e.case_id,
@@ -2106,7 +2116,7 @@ function ii(e) {
2106
2116
  description: e.description ?? void 0
2107
2117
  };
2108
2118
  }
2109
- function si(e, t, n) {
2119
+ function ci(e, t, n) {
2110
2120
  var o, i, s;
2111
2121
  const r = new URLSearchParams();
2112
2122
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("published", String(n)), (o = e.agentUniqueId) != null && o.trim() && r.set("agent_unique_id", e.agentUniqueId.trim()), (i = e.flowType) != null && i.trim() && r.set("flow_type", e.flowType.trim()), (s = e.category) != null && s.trim() && r.set("category_unique_id", e.category.trim());
@@ -2114,24 +2124,24 @@ function si(e, t, n) {
2114
2124
  a && r.append("flow_unique_ids", a);
2115
2125
  return r;
2116
2126
  }
2117
- function ai(e = {}) {
2127
+ function ui(e = {}) {
2118
2128
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
2119
2129
  return async ({ filter: i, page: s }) => {
2120
- if (!oi(i))
2130
+ if (!ai(i))
2121
2131
  return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
2122
- const a = await xt(e), l = si(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2132
+ const a = await xt(e), l = ci(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2123
2133
  method: "GET",
2124
2134
  headers: a
2125
2135
  }), m = await kt(c);
2126
2136
  return {
2127
- list: (m.list ?? []).map(ii),
2137
+ list: (m.list ?? []).map(li),
2128
2138
  total: m.total ?? 0,
2129
2139
  page: m.page ?? s,
2130
2140
  pageSize: m.page_size ?? i.pageSize ?? 20
2131
2141
  };
2132
2142
  };
2133
2143
  }
2134
- function ks(e = {}) {
2144
+ function As(e = {}) {
2135
2145
  var r, o, i, s, a;
2136
2146
  const t = {
2137
2147
  baseUrl: e.baseUrl,
@@ -2140,23 +2150,23 @@ function ks(e = {}) {
2140
2150
  authStorage: e.authStorage
2141
2151
  };
2142
2152
  return {
2143
- fetchDetail: Yo({
2153
+ fetchDetail: Zo({
2144
2154
  ...t,
2145
2155
  detailPath: (r = e.form) == null ? void 0 : r.detailPath
2146
2156
  }).fetchDetail,
2147
- resumeSearch: ri({
2157
+ resumeSearch: si({
2148
2158
  ...t,
2149
2159
  searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
2150
2160
  published: (i = e.resume) == null ? void 0 : i.published
2151
2161
  }),
2152
- caseSearch: ai({
2162
+ caseSearch: ui({
2153
2163
  ...t,
2154
2164
  listPath: (s = e.case) == null ? void 0 : s.listPath,
2155
2165
  published: (a = e.case) == null ? void 0 : a.published
2156
2166
  })
2157
2167
  };
2158
2168
  }
2159
- function In(e, t) {
2169
+ function Fn(e, t) {
2160
2170
  if (!t.trim()) return !0;
2161
2171
  try {
2162
2172
  return new RegExp(t).test(e);
@@ -2164,10 +2174,10 @@ function In(e, t) {
2164
2174
  return !0;
2165
2175
  }
2166
2176
  }
2167
- function Fn(e) {
2177
+ function En(e) {
2168
2178
  return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
2169
2179
  }
2170
- function li(e, t) {
2180
+ function mi(e, t) {
2171
2181
  switch (e.type) {
2172
2182
  case "multiselect":
2173
2183
  case "checkbox":
@@ -2176,32 +2186,32 @@ function li(e, t) {
2176
2186
  case "case_multiselect":
2177
2187
  return Q(t).length === 0;
2178
2188
  case "toggle":
2179
- return !Te(t);
2189
+ return !xe(t);
2180
2190
  case "number":
2181
2191
  return t == null || t === "";
2182
2192
  default:
2183
- return Fn(t);
2193
+ return En(t);
2184
2194
  }
2185
2195
  }
2186
- function it(e, t) {
2196
+ function ot(e, t) {
2187
2197
  return e.required === !0 || t > 0;
2188
2198
  }
2189
- function ci(e, t) {
2199
+ function di(e, t) {
2190
2200
  var n, r;
2191
2201
  for (const o of e) {
2192
2202
  const i = (n = o.name) == null ? void 0 : n.trim();
2193
- if (!i || Ce(o.type) || de(o.type)) continue;
2203
+ if (!i || ft(o.type) || pe(o.type)) continue;
2194
2204
  const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
2195
- if (o.required && li(o, s))
2205
+ if (o.required && mi(o, s))
2196
2206
  return { fieldName: i, label: a, message: `请填写「${a}」` };
2197
- if (o.type === "email" && !Fn(s)) {
2207
+ if (o.type === "email" && !En(s)) {
2198
2208
  const l = String(s).trim();
2199
- if (!In(l, yt))
2209
+ if (!Fn(l, yt))
2200
2210
  return { fieldName: i, label: a, message: `「${a}」格式不正确` };
2201
2211
  }
2202
2212
  if (o.type === "file") {
2203
2213
  const l = o.fileMinCount ?? 0, c = Q(s).length;
2204
- if (l > 0 && c < l && it(o, c))
2214
+ if (l > 0 && c < l && ot(o, c))
2205
2215
  return {
2206
2216
  fieldName: i,
2207
2217
  label: a,
@@ -2210,7 +2220,7 @@ function ci(e, t) {
2210
2220
  }
2211
2221
  if (o.type === "resume_multiselect") {
2212
2222
  const l = o.resumeMinCount, c = Q(s).length;
2213
- if (l !== void 0 && c < l && it(o, c))
2223
+ if (l !== void 0 && c < l && ot(o, c))
2214
2224
  return {
2215
2225
  fieldName: i,
2216
2226
  label: a,
@@ -2219,7 +2229,7 @@ function ci(e, t) {
2219
2229
  }
2220
2230
  if (o.type === "case_multiselect") {
2221
2231
  const l = o.caseMinCount, c = Q(s).length;
2222
- if (l !== void 0 && c < l && it(o, c))
2232
+ if (l !== void 0 && c < l && ot(o, c))
2223
2233
  return {
2224
2234
  fieldName: i,
2225
2235
  label: a,
@@ -2229,20 +2239,20 @@ function ci(e, t) {
2229
2239
  }
2230
2240
  return null;
2231
2241
  }
2232
- const ui = {
2233
- video: er,
2234
- audio: Zn,
2235
- image: Xn,
2242
+ const fi = {
2243
+ video: nr,
2244
+ audio: tr,
2245
+ image: er,
2236
2246
  file: Xt,
2237
- spreadsheet: Qn,
2247
+ spreadsheet: Zn,
2238
2248
  document: Qt
2239
2249
  };
2240
- function mi({
2250
+ function pi({
2241
2251
  type: e,
2242
2252
  size: t = 40,
2243
2253
  className: n
2244
2254
  }) {
2245
- const r = ui[e] ?? Xt;
2255
+ const r = fi[e] ?? Xt;
2246
2256
  return /* @__PURE__ */ u(
2247
2257
  r,
2248
2258
  {
@@ -2252,7 +2262,7 @@ function mi({
2252
2262
  }
2253
2263
  );
2254
2264
  }
2255
- const En = "skopon-form-v0_9", di = /* @__PURE__ */ new Set([
2265
+ const Un = "skopon-form-v0_9", hi = /* @__PURE__ */ new Set([
2256
2266
  "SkoponMedia",
2257
2267
  "SkoponSelect",
2258
2268
  "Image",
@@ -2264,24 +2274,24 @@ const En = "skopon-form-v0_9", di = /* @__PURE__ */ new Set([
2264
2274
  "FileUpload",
2265
2275
  "TextField",
2266
2276
  "Text",
2267
- ...bo()
2268
- ]), fi = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2269
- function xe(e) {
2270
- const t = [...Ue.components.values()].find((n) => n.name === e);
2277
+ ...Co()
2278
+ ]), gi = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2279
+ function Me(e) {
2280
+ const t = [...Ee.components.values()].find((n) => n.name === e);
2271
2281
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
2272
2282
  return t.schema;
2273
2283
  }
2274
- function U(e) {
2284
+ function R(e) {
2275
2285
  return typeof e == "string" ? e : "";
2276
2286
  }
2277
- function Un(e) {
2287
+ function Rn(e) {
2278
2288
  return Array.isArray(e) ? e.map((t) => {
2279
2289
  if (!t || typeof t != "object") return null;
2280
2290
  const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
2281
2291
  return { value: r, label: o };
2282
2292
  }).filter((t) => !!t) : [];
2283
2293
  }
2284
- function Le({
2294
+ function Ve({
2285
2295
  mediaType: e,
2286
2296
  urls: t,
2287
2297
  mediaSize: n,
@@ -2289,7 +2299,7 @@ function Le({
2289
2299
  help: o,
2290
2300
  placeholder: i
2291
2301
  }) {
2292
- const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = _r(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2302
+ const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = xr(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2293
2303
  return /* @__PURE__ */ M("div", { className: "form-block-preview", children: [
2294
2304
  s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2295
2305
  t.length === 0 ? /* @__PURE__ */ u("div", { className: "form-media-preview form-media-preview--empty", children: c }) : /* @__PURE__ */ u("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ u(
@@ -2320,18 +2330,18 @@ function Le({
2320
2330
  a ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2321
2331
  ] });
2322
2332
  }
2323
- function je(e, t) {
2324
- const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : U(e.url).trim() ? [U(e.url).trim()] : [];
2333
+ function Le(e, t) {
2334
+ const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : R(e.url).trim() ? [R(e.url).trim()] : [];
2325
2335
  return {
2326
2336
  mediaType: t,
2327
2337
  urls: n,
2328
- mediaSize: _e(e.mediaSize),
2329
- label: U(e.label) || U(e.description),
2330
- help: U(e.help),
2331
- placeholder: U(e.placeholder)
2338
+ mediaSize: Te(e.mediaSize),
2339
+ label: R(e.label) || R(e.description),
2340
+ help: R(e.help),
2341
+ placeholder: R(e.placeholder)
2332
2342
  };
2333
2343
  }
2334
- const pi = {
2344
+ const yi = {
2335
2345
  name: "SkoponMedia",
2336
2346
  schema: h.object({
2337
2347
  mediaType: h.any().optional(),
@@ -2341,19 +2351,19 @@ const pi = {
2341
2351
  help: h.any().optional(),
2342
2352
  placeholder: h.any().optional()
2343
2353
  }).passthrough()
2344
- }, hi = X(pi, ({ context: e }) => {
2345
- const t = e.componentModel.properties, n = U(t.mediaType);
2346
- return /* @__PURE__ */ u(Le, { ...je(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2347
- }), gi = X(
2348
- { name: "Image", schema: xe("Image") },
2349
- ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "image") })
2350
- ), yi = X(
2351
- { name: "Video", schema: xe("Video") },
2352
- ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "video") })
2353
- ), vi = X(
2354
- { name: "AudioPlayer", schema: xe("AudioPlayer") },
2355
- ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "audio") })
2356
- ), bi = {
2354
+ }, vi = X(yi, ({ context: e }) => {
2355
+ const t = e.componentModel.properties, n = R(t.mediaType);
2356
+ return /* @__PURE__ */ u(Ve, { ...Le(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2357
+ }), bi = X(
2358
+ { name: "Image", schema: Me("Image") },
2359
+ ({ context: e }) => /* @__PURE__ */ u(Ve, { ...Le(e.componentModel.properties, "image") })
2360
+ ), Si = X(
2361
+ { name: "Video", schema: Me("Video") },
2362
+ ({ context: e }) => /* @__PURE__ */ u(Ve, { ...Le(e.componentModel.properties, "video") })
2363
+ ), ki = X(
2364
+ { name: "AudioPlayer", schema: Me("AudioPlayer") },
2365
+ ({ context: e }) => /* @__PURE__ */ u(Ve, { ...Le(e.componentModel.properties, "audio") })
2366
+ ), Ci = {
2357
2367
  name: "SkoponSelect",
2358
2368
  schema: h.object({
2359
2369
  label: h.any().optional(),
@@ -2363,18 +2373,18 @@ const pi = {
2363
2373
  value: h.any().optional()
2364
2374
  }).passthrough()
2365
2375
  };
2366
- function Si({ context: e }) {
2376
+ function Ai({ context: e }) {
2367
2377
  const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
2368
2378
  component: "SkoponSelect",
2369
2379
  changeAction: "select"
2370
- }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = Un(s.options), m = U(s.mode) === "multiple";
2380
+ }), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = Rn(s.options), m = R(s.mode) === "multiple";
2371
2381
  return q(() => {
2372
- const d = dn(n, m);
2382
+ const d = fn(n, m);
2373
2383
  d !== null && o(d);
2374
2384
  }, [m, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2375
2385
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2376
2386
  /* @__PURE__ */ u(
2377
- st,
2387
+ it,
2378
2388
  {
2379
2389
  mode: m ? "multiple" : void 0,
2380
2390
  disabled: !t,
@@ -2383,28 +2393,28 @@ function Si({ context: e }) {
2383
2393
  style: { width: "100%" },
2384
2394
  placeholder: l || (m ? "请选择多项" : "请选择"),
2385
2395
  options: c,
2386
- value: m ? Q(n) : ve(n),
2396
+ value: m ? Q(n) : Se(n),
2387
2397
  onChange: (d) => r(m ? d ?? [] : d ?? "")
2388
2398
  }
2389
2399
  )
2390
2400
  ] });
2391
2401
  }
2392
- const ki = X(
2393
- bi,
2394
- Si
2402
+ const _i = X(
2403
+ Ci,
2404
+ Ai
2395
2405
  );
2396
- function Ci({ context: e }) {
2406
+ function Ti({ context: e }) {
2397
2407
  const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
2398
2408
  component: "ChoicePicker",
2399
2409
  changeAction: "select"
2400
- }), s = e.componentModel.properties, a = U(s.label), l = U(s.variant) || "mutuallyExclusive", c = U(s.skoponPickerType), m = U(s.placeholder), d = Un(s.options), g = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", S = g === "multiselect" || g === "checkbox";
2410
+ }), s = e.componentModel.properties, a = R(s.label), l = R(s.variant) || "mutuallyExclusive", c = R(s.skoponPickerType), m = R(s.placeholder), d = Rn(s.options), y = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", S = y === "multiselect" || y === "checkbox";
2401
2411
  return q(() => {
2402
- const y = dn(n, S);
2403
- y !== null && o(y);
2412
+ const g = fn(n, S);
2413
+ g !== null && o(g);
2404
2414
  }, [S, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2405
2415
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2406
- g === "select" ? /* @__PURE__ */ u(
2407
- st,
2416
+ y === "select" ? /* @__PURE__ */ u(
2417
+ it,
2408
2418
  {
2409
2419
  disabled: !t,
2410
2420
  allowClear: !0,
@@ -2412,11 +2422,11 @@ function Ci({ context: e }) {
2412
2422
  style: { width: "100%" },
2413
2423
  placeholder: m || "请选择",
2414
2424
  options: d,
2415
- value: ve(n),
2416
- onChange: (y) => r(y ?? "")
2425
+ value: Se(n),
2426
+ onChange: (g) => r(g ?? "")
2417
2427
  }
2418
- ) : g === "multiselect" ? /* @__PURE__ */ u(
2419
- st,
2428
+ ) : y === "multiselect" ? /* @__PURE__ */ u(
2429
+ it,
2420
2430
  {
2421
2431
  mode: "multiple",
2422
2432
  disabled: !t,
@@ -2426,30 +2436,30 @@ function Ci({ context: e }) {
2426
2436
  placeholder: m || "请选择多项",
2427
2437
  options: d,
2428
2438
  value: Q(n),
2429
- onChange: (y) => r(y ?? [])
2439
+ onChange: (g) => r(g ?? [])
2430
2440
  }
2431
- ) : g === "checkbox" ? /* @__PURE__ */ u(
2432
- jn.Group,
2441
+ ) : y === "checkbox" ? /* @__PURE__ */ u(
2442
+ Dn.Group,
2433
2443
  {
2434
2444
  disabled: !t,
2435
2445
  className: "form-block-preview-control",
2436
2446
  options: d,
2437
2447
  value: Q(n),
2438
- onChange: (y) => r(y)
2448
+ onChange: (g) => r(g)
2439
2449
  }
2440
2450
  ) : /* @__PURE__ */ u(
2441
- $n.Group,
2451
+ Hn.Group,
2442
2452
  {
2443
2453
  disabled: !t,
2444
2454
  className: "form-block-preview-control",
2445
2455
  options: d,
2446
- value: ve(n),
2447
- onChange: (y) => r(y.target.value)
2456
+ value: Se(n),
2457
+ onChange: (g) => r(g.target.value)
2448
2458
  }
2449
2459
  )
2450
2460
  ] });
2451
2461
  }
2452
- const Ai = X(
2462
+ const xi = X(
2453
2463
  {
2454
2464
  name: "ChoicePicker",
2455
2465
  schema: h.object({
@@ -2461,32 +2471,32 @@ const Ai = X(
2461
2471
  placeholder: h.any().optional()
2462
2472
  }).passthrough()
2463
2473
  },
2464
- Ci
2474
+ Ti
2465
2475
  );
2466
- function _i({ context: e }) {
2476
+ function Mi({ context: e }) {
2467
2477
  const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
2468
2478
  component: "CheckBox",
2469
2479
  changeAction: "change"
2470
- }), i = e.componentModel.properties, s = U(i.label);
2480
+ }), i = e.componentModel.properties, s = R(i.label);
2471
2481
  return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2472
2482
  s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2473
2483
  /* @__PURE__ */ u(
2474
- Dn,
2484
+ Kn,
2475
2485
  {
2476
2486
  disabled: !t,
2477
2487
  className: "form-block-preview-control",
2478
- checked: Te(n),
2488
+ checked: xe(n),
2479
2489
  onChange: (a) => r(a)
2480
2490
  }
2481
2491
  )
2482
2492
  ] });
2483
2493
  }
2484
- const Ti = X(
2485
- { name: "CheckBox", schema: xe("CheckBox") },
2486
- _i
2494
+ const Ni = X(
2495
+ { name: "CheckBox", schema: Me("CheckBox") },
2496
+ Mi
2487
2497
  );
2488
- function xi(e, t, n) {
2489
- const r = ve(e);
2498
+ function Ii(e, t, n) {
2499
+ const r = Se(e);
2490
2500
  if (!r) return;
2491
2501
  if (!t && n) {
2492
2502
  const i = jt(r, "HH:mm", !0);
@@ -2495,29 +2505,29 @@ function xi(e, t, n) {
2495
2505
  const o = jt(r);
2496
2506
  return o.isValid() ? o : void 0;
2497
2507
  }
2498
- function Mi({ context: e }) {
2508
+ function Fi({ context: e }) {
2499
2509
  const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
2500
2510
  component: "DateTimeInput",
2501
2511
  changeAction: "change"
2502
- }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = xi(n, c, m), b = (g) => {
2503
- if (!g) {
2512
+ }), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = Ii(n, c, m), b = (y) => {
2513
+ if (!y) {
2504
2514
  r("");
2505
2515
  return;
2506
2516
  }
2507
2517
  if (!c && m) {
2508
- r(g.format("HH:mm"));
2518
+ r(y.format("HH:mm"));
2509
2519
  return;
2510
2520
  }
2511
2521
  if (c && m) {
2512
- r(g.format("YYYY-MM-DDTHH:mm"));
2522
+ r(y.format("YYYY-MM-DDTHH:mm"));
2513
2523
  return;
2514
2524
  }
2515
- r(g.format("YYYY-MM-DD"));
2525
+ r(y.format("YYYY-MM-DD"));
2516
2526
  };
2517
2527
  return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2518
2528
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2519
2529
  !c && m ? /* @__PURE__ */ u(
2520
- Hn,
2530
+ Jn,
2521
2531
  {
2522
2532
  disabled: !t,
2523
2533
  className: "form-block-preview-control",
@@ -2528,7 +2538,7 @@ function Mi({ context: e }) {
2528
2538
  onFocus: i
2529
2539
  }
2530
2540
  ) : /* @__PURE__ */ u(
2531
- Kn,
2541
+ Gn,
2532
2542
  {
2533
2543
  showTime: c && m,
2534
2544
  disabled: !t,
@@ -2542,7 +2552,7 @@ function Mi({ context: e }) {
2542
2552
  )
2543
2553
  ] });
2544
2554
  }
2545
- const Ni = X(
2555
+ const Ei = X(
2546
2556
  {
2547
2557
  name: "DateTimeInput",
2548
2558
  schema: h.object({
@@ -2555,8 +2565,8 @@ const Ni = X(
2555
2565
  max: h.any().optional()
2556
2566
  }).passthrough()
2557
2567
  },
2558
- Mi
2559
- ), Ii = {
2568
+ Fi
2569
+ ), Ui = {
2560
2570
  name: "FileUpload",
2561
2571
  schema: h.object({
2562
2572
  label: h.any().optional(),
@@ -2568,41 +2578,41 @@ const Ni = X(
2568
2578
  value: h.any().optional()
2569
2579
  }).passthrough()
2570
2580
  };
2571
- function Fi({ context: e }) {
2581
+ function Ri({ context: e }) {
2572
2582
  const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
2573
2583
  component: "FileUpload",
2574
2584
  changeAction: "change"
2575
- }), i = e.componentModel.properties, s = U(i.label), a = U(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, m = yr(l, c), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2585
+ }), i = e.componentModel.properties, s = R(i.label), a = R(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, m = br(l, c), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2576
2586
  i.filePlaceholderIcon
2577
- ) ? i.filePlaceholderIcon : "document", b = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, g = typeof i.maxCount == "number" ? i.maxCount : 1, S = g > 0, y = Q(n), k = S && y.length >= g, p = y.length < b;
2587
+ ) ? i.filePlaceholderIcon : "document", b = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, y = typeof i.maxCount == "number" ? i.maxCount : 1, S = y > 0, g = Q(n), k = S && g.length >= y, p = g.length < b;
2578
2588
  return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2579
2589
  s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2580
2590
  /* @__PURE__ */ M(
2581
- Ye.Dragger,
2591
+ We.Dragger,
2582
2592
  {
2583
2593
  disabled: !t || k,
2584
- accept: gr(l, c),
2594
+ accept: vr(l, c),
2585
2595
  className: "form-file-upload-preview",
2586
- showUploadList: t && y.length > 0,
2587
- fileList: t ? y.map((f, v) => ({
2596
+ showUploadList: t && g.length > 0,
2597
+ fileList: t ? g.map((f, v) => ({
2588
2598
  uid: `${v}-${f}`,
2589
2599
  name: f,
2590
2600
  status: "done"
2591
2601
  })) : [],
2592
2602
  beforeUpload: (f) => {
2593
- if (!t) return Ye.LIST_IGNORE;
2603
+ if (!t) return We.LIST_IGNORE;
2594
2604
  const v = Q(Ht(e));
2595
- if (S && v.length >= g) return Ye.LIST_IGNORE;
2596
- const x = S ? [...v, f.name].slice(0, g) : [...v, f.name];
2605
+ if (S && v.length >= y) return We.LIST_IGNORE;
2606
+ const x = S ? [...v, f.name].slice(0, y) : [...v, f.name];
2597
2607
  return r(x), !1;
2598
2608
  },
2599
2609
  onRemove: (f) => {
2600
- const v = Q(Ht(e)), x = /^(\d+)-/.exec(f.uid ?? ""), N = x ? Number(x[1]) : -1, _ = N >= 0 && N < v.length ? v.filter((w, C) => C !== N) : v.filter((w) => w !== f.name);
2610
+ const v = Q(Ht(e)), x = /^(\d+)-/.exec(f.uid ?? ""), N = x ? Number(x[1]) : -1, _ = N >= 0 && N < v.length ? v.filter((z, C) => C !== N) : v.filter((z) => z !== f.name);
2601
2611
  if (_.length < b) return !1;
2602
2612
  r(_);
2603
2613
  },
2604
2614
  children: [
2605
- /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(mi, { type: d, size: 40 }) }),
2615
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(pi, { type: d, size: 40 }) }),
2606
2616
  /* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2607
2617
  ]
2608
2618
  }
@@ -2611,55 +2621,55 @@ function Fi({ context: e }) {
2611
2621
  "允许:",
2612
2622
  m ?? "全部类型",
2613
2623
  b > 0 ? `;至少 ${b} 个文件` : "",
2614
- S ? `;最多 ${g} 个文件` : "",
2624
+ S ? `;最多 ${y} 个文件` : "",
2615
2625
  ";当前仅收集文件名(不含文件内容,需宿主另行上传)",
2616
- p && t ? `(当前 ${y.length} 个,未达下限)` : ""
2626
+ p && t ? `(当前 ${g.length} 个,未达下限)` : ""
2617
2627
  ] })
2618
2628
  ] });
2619
2629
  }
2620
- const Ei = X(
2621
- Ii,
2622
- Fi
2630
+ const Pi = X(
2631
+ Ui,
2632
+ Ri
2623
2633
  );
2624
- function Ui({ context: e }) {
2634
+ function wi({ context: e }) {
2625
2635
  const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
2626
2636
  component: "TextField",
2627
2637
  changeAction: "change",
2628
2638
  debounceChange: !0
2629
- }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = U(s.variant) || "shortText", m = U(s.validationRegexp), d = ve(n) ?? "", b = !t, [g, S] = P(""), y = (f) => {
2639
+ }), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = R(s.variant) || "shortText", m = R(s.validationRegexp), d = Se(n) ?? "", b = !t, [y, S] = w(""), g = (f) => {
2630
2640
  if (!m || !f.trim()) {
2631
2641
  S("");
2632
2642
  return;
2633
2643
  }
2634
- S(In(f, m) ? "" : "格式不正确");
2644
+ S(Fn(f, m) ? "" : "格式不正确");
2635
2645
  };
2636
2646
  q(() => {
2637
- y(d);
2647
+ g(d);
2638
2648
  }, [m, d]);
2639
2649
  const k = "form-block-preview-control";
2640
2650
  let p;
2641
2651
  if (c === "longText")
2642
2652
  p = /* @__PURE__ */ u(
2643
- Qe.TextArea,
2653
+ Ye.TextArea,
2644
2654
  {
2645
2655
  disabled: b,
2646
2656
  className: k,
2647
2657
  placeholder: l || "长文本回答...",
2648
2658
  autoSize: { minRows: 2, maxRows: 6 },
2649
2659
  value: d,
2650
- status: g ? "error" : void 0,
2660
+ status: y ? "error" : void 0,
2651
2661
  onChange: (f) => {
2652
2662
  const v = f.target.value;
2653
- r(v), y(v);
2663
+ r(v), g(v);
2654
2664
  },
2655
2665
  onFocus: i,
2656
- onBlur: (f) => y(f.target.value)
2666
+ onBlur: (f) => g(f.target.value)
2657
2667
  }
2658
2668
  );
2659
2669
  else if (c === "number") {
2660
2670
  const f = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
2661
2671
  p = /* @__PURE__ */ u(
2662
- Jn,
2672
+ Wn,
2663
2673
  {
2664
2674
  disabled: b,
2665
2675
  className: k,
@@ -2671,7 +2681,7 @@ function Ui({ context: e }) {
2671
2681
  }
2672
2682
  );
2673
2683
  } else c === "obscured" ? p = /* @__PURE__ */ u(
2674
- Qe.Password,
2684
+ Ye.Password,
2675
2685
  {
2676
2686
  disabled: b,
2677
2687
  className: k,
@@ -2681,28 +2691,28 @@ function Ui({ context: e }) {
2681
2691
  onFocus: i
2682
2692
  }
2683
2693
  ) : p = /* @__PURE__ */ u(
2684
- Qe,
2694
+ Ye,
2685
2695
  {
2686
2696
  disabled: b,
2687
2697
  className: k,
2688
2698
  placeholder: l,
2689
2699
  value: d,
2690
- status: g ? "error" : void 0,
2700
+ status: y ? "error" : void 0,
2691
2701
  onChange: (f) => {
2692
2702
  const v = f.target.value;
2693
- r(v), y(v);
2703
+ r(v), g(v);
2694
2704
  },
2695
2705
  onFocus: i,
2696
- onBlur: (f) => y(f.target.value)
2706
+ onBlur: (f) => g(f.target.value)
2697
2707
  }
2698
2708
  );
2699
2709
  return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2700
2710
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2701
2711
  p,
2702
- g ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
2712
+ y ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "form-block-preview-help", children: y }) : null
2703
2713
  ] });
2704
2714
  }
2705
- const Ri = X(
2715
+ const zi = X(
2706
2716
  {
2707
2717
  name: "TextField",
2708
2718
  schema: h.object({
@@ -2713,35 +2723,35 @@ const Ri = X(
2713
2723
  value: h.any().optional()
2714
2724
  }).passthrough()
2715
2725
  },
2716
- Ui
2726
+ wi
2717
2727
  );
2718
- function Pi({ context: e }) {
2719
- const t = e.componentModel.properties, n = U(t.text), r = U(t.variant) || "body";
2720
- return fi.has(r) ? r === "caption" ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(ne.Paragraph, { className: "form-block-preview-paragraph", children: n });
2728
+ function Oi({ context: e }) {
2729
+ const t = e.componentModel.properties, n = R(t.text), r = R(t.variant) || "body";
2730
+ return gi.has(r) ? r === "caption" ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(ne.Paragraph, { className: "form-block-preview-paragraph", children: n });
2721
2731
  }
2722
- const wi = X(
2723
- { name: "Text", schema: xe("Text") },
2724
- Pi
2732
+ const qi = X(
2733
+ { name: "Text", schema: Me("Text") },
2734
+ Oi
2725
2735
  );
2726
- function Rn() {
2736
+ function Pn() {
2727
2737
  const t = [
2728
- ...[...Ue.components.values()].filter(
2729
- (r) => !di.has(r.name)
2738
+ ...[...Ee.components.values()].filter(
2739
+ (r) => !hi.has(r.name)
2730
2740
  ),
2731
- hi,
2732
- ki,
2733
- gi,
2734
- yi,
2735
2741
  vi,
2736
- Ai,
2737
- Ti,
2742
+ _i,
2743
+ bi,
2744
+ Si,
2745
+ ki,
2746
+ xi,
2738
2747
  Ni,
2739
2748
  Ei,
2740
- Ri,
2741
- wi,
2742
- ...vo()
2743
- ], n = [...Ue.functions.values()];
2744
- return new tr(En, t, n, Ue.themeSchema);
2749
+ Pi,
2750
+ zi,
2751
+ qi,
2752
+ ...ko()
2753
+ ], n = [...Ee.functions.values()];
2754
+ return new rr(Un, t, n, Ee.themeSchema);
2745
2755
  }
2746
2756
  const ie = {
2747
2757
  jade9: "#29a383",
@@ -2755,7 +2765,7 @@ const ie = {
2755
2765
  primaryHover: "#26997b",
2756
2766
  primaryActive: "#1d3b31",
2757
2767
  onPrimary: "#ffffff"
2758
- }, zi = {
2768
+ }, Bi = {
2759
2769
  cssVar: { key: "vidtempl" },
2760
2770
  token: {
2761
2771
  colorPrimary: ie.primarySolid,
@@ -2840,14 +2850,14 @@ const ie = {
2840
2850
  }
2841
2851
  }
2842
2852
  };
2843
- function be({
2853
+ function ke({
2844
2854
  children: e,
2845
2855
  locale: t,
2846
2856
  theme: n
2847
2857
  }) {
2848
- return /* @__PURE__ */ u(Gn, { theme: n ?? zi, locale: t, children: e });
2858
+ return /* @__PURE__ */ u(Yn, { theme: n ?? Bi, locale: t, children: e });
2849
2859
  }
2850
- const Oi = Bn(
2860
+ const Vi = Ln(
2851
2861
  function({
2852
2862
  doc: t,
2853
2863
  surfaceId: n = "skopon-form",
@@ -2864,19 +2874,19 @@ const Oi = Bn(
2864
2874
  const m = A(null), d = A(i);
2865
2875
  d.current = i;
2866
2876
  const b = L(() => {
2867
- if (dt(t)) return "";
2877
+ if (mt(t)) return "";
2868
2878
  try {
2869
2879
  return JSON.stringify(t);
2870
2880
  } catch {
2871
2881
  return String(t);
2872
2882
  }
2873
- }, [t]), g = L(() => {
2883
+ }, [t]), y = L(() => {
2874
2884
  if (!b)
2875
2885
  return { surfaces: [], processor: null };
2876
2886
  try {
2877
- const p = JSON.parse(b), f = new en([Rn()]), v = No(p, {
2887
+ const p = JSON.parse(b), f = new en([Pn()]), v = Eo(p, {
2878
2888
  surfaceId: n,
2879
- catalogId: En
2889
+ catalogId: Un
2880
2890
  });
2881
2891
  return f.processMessages(v), {
2882
2892
  surfaces: Array.from(f.model.surfacesMap.values()),
@@ -2885,15 +2895,15 @@ const Oi = Bn(
2885
2895
  } catch (p) {
2886
2896
  return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", p), { surfaces: [], processor: null };
2887
2897
  }
2888
- }, [b, n]), { surfaces: S, processor: y } = g;
2889
- if (m.current = y, Vn(
2898
+ }, [b, n]), { surfaces: S, processor: g } = y;
2899
+ if (m.current = g, jn(
2890
2900
  c,
2891
2901
  () => ({
2892
2902
  getValues(p) {
2893
2903
  const f = m.current;
2894
2904
  if (!f) return {};
2895
2905
  const v = (p ?? d.current).map((x) => x.trim()).filter(Boolean);
2896
- return Uo(f, n, v);
2906
+ return wo(f, n, v);
2897
2907
  },
2898
2908
  setValues(p) {
2899
2909
  const f = m.current;
@@ -2908,17 +2918,17 @@ const Oi = Bn(
2908
2918
  }),
2909
2919
  [n]
2910
2920
  ), S.length === 0) {
2911
- const p = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: r }) }) });
2912
- return l ? /* @__PURE__ */ u(be, { children: p }) : p;
2921
+ const p = /* @__PURE__ */ u(lt, { resumeSearch: s, children: /* @__PURE__ */ u(at, { caseSearch: a, children: /* @__PURE__ */ u(st, { interactive: o, children: r }) }) });
2922
+ return l ? /* @__PURE__ */ u(ke, { children: p }) : p;
2913
2923
  }
2914
- const k = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) });
2915
- return l ? /* @__PURE__ */ u(be, { children: k }) : k;
2924
+ const k = /* @__PURE__ */ u(lt, { resumeSearch: s, children: /* @__PURE__ */ u(at, { caseSearch: a, children: /* @__PURE__ */ u(st, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) });
2925
+ return l ? /* @__PURE__ */ u(ke, { children: k }) : k;
2916
2926
  }
2917
2927
  );
2918
- function Ee() {
2919
- return new en([Rn()]);
2928
+ function Fe() {
2929
+ return new en([Pn()]);
2920
2930
  }
2921
- function Cs({
2931
+ function _s({
2922
2932
  messages: e,
2923
2933
  surfaceId: t = "skopon-form-stream",
2924
2934
  emptyHint: n = null,
@@ -2930,7 +2940,7 @@ function Cs({
2930
2940
  nn(), tn();
2931
2941
  }, []);
2932
2942
  const s = A(null);
2933
- s.current === null && (s.current = Ee());
2943
+ s.current === null && (s.current = Fe());
2934
2944
  const a = A(0), l = A(""), c = A(!0), m = A(t);
2935
2945
  function d(p, f) {
2936
2946
  s.current = p, a.current = f.length, l.current = JSON.stringify(f), c.current && (S(p), k(Array.from(p.model.surfacesMap.values())));
@@ -2946,9 +2956,9 @@ function Cs({
2946
2956
  return !0;
2947
2957
  }
2948
2958
  }
2949
- const [g, S] = P(
2959
+ const [y, S] = w(
2950
2960
  () => s.current
2951
- ), [y, k] = P(
2961
+ ), [g, k] = w(
2952
2962
  () => Array.from(
2953
2963
  s.current.model.surfacesMap.values()
2954
2964
  )
@@ -2956,26 +2966,26 @@ function Cs({
2956
2966
  return q(() => (c.current = !0, () => {
2957
2967
  c.current = !1;
2958
2968
  }), []), q(() => {
2959
- s.current = g;
2960
- }, [g]), q(() => {
2969
+ s.current = y;
2970
+ }, [y]), q(() => {
2961
2971
  const p = () => {
2962
- c.current && k(Array.from(g.model.surfacesMap.values()));
2963
- }, f = g.onSurfaceCreated(p), v = g.onSurfaceDeleted(p);
2972
+ c.current && k(Array.from(y.model.surfacesMap.values()));
2973
+ }, f = y.onSurfaceCreated(p), v = y.onSurfaceDeleted(p);
2964
2974
  return () => {
2965
2975
  f.unsubscribe(), v.unsubscribe();
2966
2976
  };
2967
- }, [g]), q(() => {
2977
+ }, [y]), q(() => {
2968
2978
  let p = !1;
2969
2979
  const f = m.current !== t;
2970
2980
  if (m.current = t, f) {
2971
- const _ = Ee();
2981
+ const _ = Fe();
2972
2982
  return Array.isArray(e) && e.length > 0 ? (_.processMessages(e), p || d(_, e)) : (s.current = _, a.current = 0, l.current = "", p || (S(_), k([]))), () => {
2973
2983
  p = !0;
2974
2984
  };
2975
2985
  }
2976
2986
  if (!Array.isArray(e) || e.length === 0) {
2977
2987
  if (a.current > 0) {
2978
- const _ = Ee();
2988
+ const _ = Fe();
2979
2989
  s.current = _, a.current = 0, l.current = "", p || (S(_), k([]));
2980
2990
  }
2981
2991
  return () => {
@@ -2984,7 +2994,7 @@ function Cs({
2984
2994
  }
2985
2995
  const v = s.current, x = a.current;
2986
2996
  if (e.length < x || b(e, x)) {
2987
- const _ = Ee();
2997
+ const _ = Fe();
2988
2998
  return _.processMessages(e), p || d(_, e), () => {
2989
2999
  p = !0;
2990
3000
  };
@@ -2995,15 +3005,15 @@ function Cs({
2995
3005
  } : (v.processMessages(N), a.current = e.length, l.current = JSON.stringify(e), p || k(Array.from(v.model.surfacesMap.values())), () => {
2996
3006
  p = !0;
2997
3007
  });
2998
- }, [e, t]), y.length === 0 ? /* @__PURE__ */ u(be, { children: n }) : /* @__PURE__ */ u(be, { children: /* @__PURE__ */ u(ct, { resumeSearch: o, children: /* @__PURE__ */ u(lt, { caseSearch: i, children: /* @__PURE__ */ u(at, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: y.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) }) });
3008
+ }, [e, t]), g.length === 0 ? /* @__PURE__ */ u(ke, { children: n }) : /* @__PURE__ */ u(ke, { children: /* @__PURE__ */ u(lt, { resumeSearch: o, children: /* @__PURE__ */ u(at, { caseSearch: i, children: /* @__PURE__ */ u(st, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: g.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) }) });
2999
3009
  }
3000
- const qi = 100, Bi = 3e4, Vi = 1500, me = /* @__PURE__ */ new Map();
3001
- function Li(e) {
3010
+ const Li = 100, ji = 3e4, $i = 1500, fe = /* @__PURE__ */ new Map();
3011
+ function Di(e) {
3002
3012
  const t = e.trim();
3003
- let n = me.get(t);
3004
- return n || (n = new ji(t), me.set(t, n)), n.acquire(), n;
3013
+ let n = fe.get(t);
3014
+ return n || (n = new Hi(t), fe.set(t, n)), n.acquire(), n;
3005
3015
  }
3006
- class ji {
3016
+ class Hi {
3007
3017
  constructor(t) {
3008
3018
  G(this, "url");
3009
3019
  G(this, "ws", null);
@@ -3021,12 +3031,12 @@ class ji {
3021
3031
  }
3022
3032
  release() {
3023
3033
  this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
3024
- this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), me.get(this.url) === this && me.delete(this.url));
3025
- }, Vi));
3034
+ this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), fe.get(this.url) === this && fe.delete(this.url));
3035
+ }, $i));
3026
3036
  }
3027
3037
  /** 强制关闭(测试用),跳过宽限期。 */
3028
3038
  forceClose() {
3029
- this.refCount = 0, this.teardown(), me.get(this.url) === this && me.delete(this.url);
3039
+ this.refCount = 0, this.teardown(), fe.get(this.url) === this && fe.delete(this.url);
3030
3040
  }
3031
3041
  subscribe(t, n) {
3032
3042
  const r = t.trim();
@@ -3095,7 +3105,7 @@ class ji {
3095
3105
  }
3096
3106
  }
3097
3107
  enqueue(t) {
3098
- for (this.sendQueue.push(t); this.sendQueue.length > qi; )
3108
+ for (this.sendQueue.push(t); this.sendQueue.length > Li; )
3099
3109
  this.sendQueue.shift();
3100
3110
  }
3101
3111
  flushQueue() {
@@ -3109,7 +3119,7 @@ class ji {
3109
3119
  if (!this.connectRequested || this.refCount <= 0) return;
3110
3120
  this.clearReconnectTimer();
3111
3121
  const t = Math.min(
3112
- Bi,
3122
+ ji,
3113
3123
  1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
3114
3124
  );
3115
3125
  this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
@@ -3147,13 +3157,13 @@ class ji {
3147
3157
  }
3148
3158
  }
3149
3159
  }
3150
- class $i {
3160
+ class Ki {
3151
3161
  constructor(t) {
3152
3162
  G(this, "askUserMessageId");
3153
3163
  G(this, "connection");
3154
3164
  G(this, "unsubscribe");
3155
3165
  G(this, "closed", !1);
3156
- this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Li(t.url);
3166
+ this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Di(t.url);
3157
3167
  const n = t.onAutoControl;
3158
3168
  this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
3159
3169
  };
@@ -3168,24 +3178,24 @@ class $i {
3168
3178
  this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
3169
3179
  }
3170
3180
  }
3171
- function Pn(e) {
3181
+ function wn(e) {
3172
3182
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3173
3183
  }
3174
- function Di(e, t) {
3184
+ function Ji(e, t) {
3175
3185
  if (!e) return !1;
3176
- const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
3186
+ const n = e.querySelector(`[data-skopon-field="${wn(t)}"]`);
3177
3187
  return n instanceof HTMLElement ? ((n.querySelector(
3178
3188
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
3179
3189
  ) ?? n).focus(), !0) : !1;
3180
3190
  }
3181
- function Hi(e, t) {
3191
+ function Gi(e, t) {
3182
3192
  if (!e) return !1;
3183
- const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
3193
+ const n = e.querySelector(`[data-skopon-field="${wn(t)}"]`);
3184
3194
  return n instanceof HTMLElement ? ((n.querySelector(
3185
3195
  'button, [role="button"], .skopon-resume-select-card, input, label'
3186
3196
  ) ?? n).click(), !0) : !1;
3187
3197
  }
3188
- function Ki(e, t, n) {
3198
+ function Wi(e, t, n) {
3189
3199
  const r = e.action;
3190
3200
  if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
3191
3201
  console.warn("[FormAutoControl] unknown action", r);
@@ -3215,47 +3225,47 @@ function Ki(e, t, n) {
3215
3225
  return;
3216
3226
  }
3217
3227
  if (r === "focus") {
3218
- Di(t.rootElement, o), n.reportEvent({
3228
+ Ji(t.rootElement, o), n.reportEvent({
3219
3229
  action: "focus",
3220
3230
  component: i,
3221
3231
  field: o
3222
3232
  });
3223
3233
  return;
3224
3234
  }
3225
- Hi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3235
+ Gi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3226
3236
  });
3227
3237
  }
3228
- function Ji(e) {
3238
+ function Yi(e) {
3229
3239
  const t = {};
3230
3240
  for (const [n, r] of Object.entries(e))
3231
3241
  r !== void 0 && (t[n] = r);
3232
3242
  return t;
3233
3243
  }
3234
- function Gi(e, t) {
3244
+ function Qi(e, t) {
3235
3245
  var o;
3236
3246
  const n = (o = e.name) == null ? void 0 : o.trim();
3237
3247
  if (!n || !t) return { ...e };
3238
3248
  const r = t.get(n);
3239
3249
  return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
3240
3250
  }
3241
- function Wi(e) {
3251
+ function Xi(e) {
3242
3252
  var i, s;
3243
3253
  const n = {
3244
3254
  blocks: (e.blocks ?? []).map(
3245
- (a) => Gi(a, e.liveOptions)
3255
+ (a) => Qi(a, e.liveOptions)
3246
3256
  )
3247
3257
  }, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
3248
3258
  return r && (n.title = r), o && (n.description = o), {
3249
3259
  form_schema: n,
3250
- form_values: Ji(e.values ?? {}),
3260
+ form_values: Yi(e.values ?? {}),
3251
3261
  form_change: [...e.formChange ?? []]
3252
3262
  };
3253
3263
  }
3254
- function Yi(e) {
3255
- const t = Ve(e);
3256
- return t ? ze(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3264
+ function Zi(e) {
3265
+ const t = Be(e);
3266
+ return t ? we(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3257
3267
  }
3258
- function Qi({
3268
+ function es({
3259
3269
  payload: e,
3260
3270
  callbackUrl: t,
3261
3271
  title: n,
@@ -3265,7 +3275,7 @@ function Qi({
3265
3275
  submitHeaders: s,
3266
3276
  onNotify: a
3267
3277
  }) {
3268
- const [l, c] = P(!1), m = A(!0);
3278
+ const [l, c] = w(!1), m = A(!0);
3269
3279
  q(() => (m.current = !0, () => {
3270
3280
  m.current = !1;
3271
3281
  }), []);
@@ -3273,9 +3283,9 @@ function Qi({
3273
3283
  () => Tt(s),
3274
3284
  [s]
3275
3285
  ), b = L(
3276
- () => An(e, t, d),
3286
+ () => _n(e, t, d),
3277
3287
  [e, t, d]
3278
- ), g = L(
3288
+ ), y = L(
3279
3289
  () => ({
3280
3290
  ...i,
3281
3291
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
@@ -3286,19 +3296,19 @@ function Qi({
3286
3296
  if (!l) {
3287
3297
  c(!0);
3288
3298
  try {
3289
- const y = Yi(e), k = Mt({
3290
- context: g,
3299
+ const g = Zi(e), k = Mt({
3300
+ context: y,
3291
3301
  payload: e,
3292
- answer: y
3293
- }), p = await Nn(k, {
3302
+ answer: g
3303
+ }), p = await In(k, {
3294
3304
  headers: d
3295
3305
  });
3296
3306
  if (!m.current) return;
3297
- const f = Mn(p);
3307
+ const f = Nn(p);
3298
3308
  a == null || a(f.type, f.message);
3299
- } catch (y) {
3309
+ } catch (g) {
3300
3310
  if (!m.current) return;
3301
- const k = y instanceof Error ? y.message : "提交失败";
3311
+ const k = g instanceof Error ? g.message : "提交失败";
3302
3312
  a == null || a("error", k);
3303
3313
  } finally {
3304
3314
  m.current && c(!1);
@@ -3309,11 +3319,11 @@ function Qi({
3309
3319
  /* @__PURE__ */ M("div", { className: "ask-user-curl-card-header", children: [
3310
3320
  /* @__PURE__ */ M("div", { className: "ask-user-curl-card-header-title", children: [
3311
3321
  /* @__PURE__ */ u(ne.Text, { type: "secondary", children: n ?? "curl 命令" }),
3312
- r ? /* @__PURE__ */ u(he, { title: r, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3313
- o ? /* @__PURE__ */ u(he, { title: o, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3322
+ r ? /* @__PURE__ */ u(ye, { title: r, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3323
+ o ? /* @__PURE__ */ u(ye, { title: o, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3314
3324
  ] }),
3315
- /* @__PURE__ */ u(he, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ u(
3316
- Oe,
3325
+ /* @__PURE__ */ u(ye, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ u(
3326
+ ze,
3317
3327
  {
3318
3328
  size: "small",
3319
3329
  type: "text",
@@ -3327,8 +3337,8 @@ function Qi({
3327
3337
  /* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: b })
3328
3338
  ] });
3329
3339
  }
3330
- const Xi = 80;
3331
- function Zi(e, t) {
3340
+ const ts = 80;
3341
+ function ns(e, t) {
3332
3342
  if (t && typeof t == "object" && t !== null && "message" in t) {
3333
3343
  const n = t.message;
3334
3344
  if (typeof n == "string" && n.trim())
@@ -3336,7 +3346,7 @@ function Zi(e, t) {
3336
3346
  }
3337
3347
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
3338
3348
  }
3339
- function es({
3349
+ function rs({
3340
3350
  payload: e,
3341
3351
  formUniqueId: t,
3342
3352
  askUserMessageId: n,
@@ -3351,9 +3361,9 @@ function es({
3351
3361
  onSurfaceReadyChange: d,
3352
3362
  onAutoControlReady: b
3353
3363
  }) {
3354
- const [g, S] = P(null), [y, k] = P(!1), [p, f] = P(!0), [v, x] = P(!1), N = A(null), _ = A(null), w = A(!0), C = A(l);
3364
+ const [y, S] = w(null), [g, k] = w(!1), [p, f] = w(!0), [v, x] = w(!1), N = A(null), _ = A(null), z = A(!0), C = A(l);
3355
3365
  C.current = l;
3356
- const B = un(), V = gt(), re = A(""), K = A(null), $ = (t == null ? void 0 : t.trim()) ?? "", W = (n == null ? void 0 : n.trim()) ?? "", ee = L(
3366
+ const B = mn(), V = gt(), re = A(""), K = A(null), $ = (t == null ? void 0 : t.trim()) ?? "", W = (n == null ? void 0 : n.trim()) ?? "", ee = L(
3357
3367
  () => Tt(s),
3358
3368
  [s]
3359
3369
  ), te = L(
@@ -3363,103 +3373,103 @@ function es({
3363
3373
  }),
3364
3374
  [i, r]
3365
3375
  );
3366
- q(() => (w.current = !0, () => {
3367
- w.current = !1, K.current != null && (clearTimeout(K.current), K.current = null);
3376
+ q(() => (z.current = !0, () => {
3377
+ z.current = !1, K.current != null && (clearTimeout(K.current), K.current = null);
3368
3378
  }), []), q(() => {
3369
- let F = !1;
3379
+ let I = !1;
3370
3380
  return $ ? (f(!0), k(!1), a({ formUniqueId: $ }).then((O) => {
3371
- F || (k(!!O.disabled), S(O.formDefinition ?? null));
3381
+ I || (k(!!O.disabled), S(O.formDefinition ?? null));
3372
3382
  }).catch((O) => {
3373
3383
  var J;
3374
- if (!F) {
3384
+ if (!I) {
3375
3385
  k(!1), S(null);
3376
- const Ie = O instanceof Error ? O.message : "获取表单定义失败";
3377
- (J = C.current) == null || J.call(C, "error", Ie);
3386
+ const Ne = O instanceof Error ? O.message : "获取表单定义失败";
3387
+ (J = C.current) == null || J.call(C, "error", Ne);
3378
3388
  }
3379
3389
  }).finally(() => {
3380
- F || f(!1);
3390
+ I || f(!1);
3381
3391
  }), () => {
3382
- F = !0;
3392
+ I = !0;
3383
3393
  }) : (f(!1), k(!1), S(null), () => {
3384
- F = !0;
3394
+ I = !0;
3385
3395
  });
3386
3396
  }, [$, a]);
3387
- const E = L(() => Ve(e), [e]), R = L(() => E ? Oo(E, g ?? void 0) : null, [E, g]), T = (R == null ? void 0 : R.matchedBlocks) ?? [], D = !!(E && qo(E) && T.length === 0), z = L(() => D && E ? Bo(E) : R && R.renderBlocks.length > 0 ? R.renderBlocks : [], [R, D, E]), I = L(() => {
3397
+ const E = L(() => Be(e), [e]), P = L(() => E ? Vo(E, y ?? void 0) : null, [E, y]), T = (P == null ? void 0 : P.matchedBlocks) ?? [], D = !!(E && Lo(E) && T.length === 0), U = L(() => D && E ? jo(E) : P && P.renderBlocks.length > 0 ? P.renderBlocks : [], [P, D, E]), F = L(() => {
3388
3398
  if (D && E)
3389
- return Vo(E);
3390
- const F = ze((R == null ? void 0 : R.extraBlocks) ?? []);
3391
- return { ...ze(
3392
- ((R == null ? void 0 : R.matchedBlocks) ?? []).filter(
3399
+ return $o(E);
3400
+ const I = we((P == null ? void 0 : P.extraBlocks) ?? []);
3401
+ return { ...we(
3402
+ ((P == null ? void 0 : P.matchedBlocks) ?? []).filter(
3393
3403
  (J) => J.type === "text" && J.hidden === !0
3394
3404
  )
3395
- ), ...F };
3396
- }, [D, E, R]), Y = L(
3397
- () => z.filter((F) => {
3405
+ ), ...I };
3406
+ }, [D, E, P]), Y = L(
3407
+ () => U.filter((I) => {
3398
3408
  var O;
3399
- return (O = F.name) == null ? void 0 : O.trim();
3400
- }).map((F) => F.name.trim()),
3401
- [z]
3402
- ), Me = (R == null ? void 0 : R.title) ?? (E == null ? void 0 : E.title) ?? "", Ne = (R == null ? void 0 : R.description) ?? (E == null ? void 0 : E.description) ?? "", ce = L(() => z.length === 0 ? null : Fo(
3403
- { title: Me, description: Ne },
3404
- z
3405
- ), [Me, Ne, z]), $e = L(() => {
3406
- if (!ce) return "";
3409
+ return Z(I.type) && ((O = I.name) == null ? void 0 : O.trim());
3410
+ }).map((I) => I.name.trim()),
3411
+ [U]
3412
+ ), ce = (P == null ? void 0 : P.title) ?? (E == null ? void 0 : E.title) ?? "", ue = (P == null ? void 0 : P.description) ?? (E == null ? void 0 : E.description) ?? "", me = L(() => U.length === 0 ? null : Ro(
3413
+ { title: ce, description: ue },
3414
+ U
3415
+ ), [ce, ue, U]), je = L(() => {
3416
+ if (!me) return "";
3407
3417
  try {
3408
- return JSON.stringify(ce);
3418
+ return JSON.stringify(me);
3409
3419
  } catch {
3410
- return String(ce);
3420
+ return String(me);
3411
3421
  }
3412
- }, [ce]), De = $ ? `ask-user-${$}` : "ask-user-payload", oe = !!(!p && E && z.length > 0 && ce);
3422
+ }, [me]), $e = $ ? `ask-user-${$}` : "ask-user-payload", oe = !!(!p && E && U.length > 0 && me);
3413
3423
  q(() => (d(oe), () => d(!1)), [oe, d]);
3414
3424
  const It = j(() => {
3415
3425
  var O;
3416
- return { ...((O = N.current) == null ? void 0 : O.getValues(Y)) ?? {}, ...I };
3417
- }, [Y, I]), Ft = A(V.liveOptions);
3426
+ return { ...((O = N.current) == null ? void 0 : O.getValues(Y)) ?? {}, ...F };
3427
+ }, [Y, F]), Ft = A(V.liveOptions);
3418
3428
  Ft.current = V.liveOptions;
3419
- const He = A(V.pendingChangeFields);
3420
- He.current = V.pendingChangeFields;
3421
- const fe = j(
3422
- (F) => {
3423
- const O = Wi({
3424
- title: Me,
3425
- description: Ne,
3426
- blocks: z,
3429
+ const De = A(V.pendingChangeFields);
3430
+ De.current = V.pendingChangeFields;
3431
+ const he = j(
3432
+ (I) => {
3433
+ const O = Xi({
3434
+ title: ce,
3435
+ description: ue,
3436
+ blocks: U,
3427
3437
  values: It(),
3428
3438
  liveOptions: Ft.current,
3429
- formChange: F
3439
+ formChange: I
3430
3440
  });
3431
3441
  B.reportData(O);
3432
3442
  },
3433
- [Me, Ne, z, It, B]
3434
- ), Ke = A(fe);
3435
- Ke.current = fe, q(() => {
3443
+ [ce, ue, U, It, B]
3444
+ ), He = A(he);
3445
+ He.current = he, q(() => {
3436
3446
  if (!oe) {
3437
3447
  re.current = "";
3438
3448
  return;
3439
3449
  }
3440
- if (!$e) return;
3441
- const F = `${De}::${$e}`;
3442
- if (re.current === F) return;
3450
+ if (!je) return;
3451
+ const I = `${$e}::${je}`;
3452
+ if (re.current === I) return;
3443
3453
  const O = setTimeout(() => {
3444
- w.current && re.current !== F && (re.current = F, Ke.current([]));
3454
+ z.current && re.current !== I && (re.current = I, He.current([]));
3445
3455
  }, 0);
3446
3456
  return () => clearTimeout(O);
3447
- }, [oe, De, $e]), q(() => {
3448
- if (!(!oe || V.version === 0) && He.current.length !== 0)
3457
+ }, [oe, $e, je]), q(() => {
3458
+ if (!(!oe || V.version === 0) && De.current.length !== 0)
3449
3459
  return K.current != null && clearTimeout(K.current), K.current = setTimeout(() => {
3450
- if (K.current = null, !w.current) return;
3451
- const F = [...He.current];
3452
- V.clearPendingChangeFields(), F.length !== 0 && Ke.current(F);
3453
- }, Xi), () => {
3460
+ if (K.current = null, !z.current) return;
3461
+ const I = [...De.current];
3462
+ V.clearPendingChangeFields(), I.length !== 0 && He.current(I);
3463
+ }, ts), () => {
3454
3464
  K.current != null && (clearTimeout(K.current), K.current = null);
3455
3465
  };
3456
3466
  }, [oe, V.version, V.clearPendingChangeFields]);
3457
- const Je = j(async () => {
3458
- var F, O, J, Ie, Rt, Pt, wt, zt;
3467
+ const Ke = j(async () => {
3468
+ var I, O, J, Ne, Rt, Pt, wt, zt;
3459
3469
  if (!v) {
3460
3470
  x(!0);
3461
3471
  try {
3462
- const pe = { ...((F = N.current) == null ? void 0 : F.getValues(Y)) ?? {}, ...I }, Ot = ci(z, pe);
3472
+ const ge = { ...((I = N.current) == null ? void 0 : I.getValues(Y)) ?? {}, ...F }, Ot = di(U, ge);
3463
3473
  if (Ot) {
3464
3474
  (O = C.current) == null || O.call(C, "error", Ot.message);
3465
3475
  return;
@@ -3470,65 +3480,70 @@ function es({
3470
3480
  (J = C.current) == null || J.call(C, "error", "callback_url 为空,无法提交");
3471
3481
  return;
3472
3482
  }
3473
- fe([]), B.reportEvent({
3483
+ he([]), B.reportEvent({
3474
3484
  action: "submit",
3475
3485
  component: "SubmitButton"
3476
3486
  });
3477
- const We = await _n(Lt, pe, {
3487
+ const Ge = await Tn(Lt, ge, {
3478
3488
  headers: ee
3479
3489
  });
3480
- if (!w.current) return;
3481
- We.ok ? (Ie = C.current) == null || Ie.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", Zi(We.status, We.body));
3490
+ if (!z.current) return;
3491
+ Ge.ok ? (Ne = C.current) == null || Ne.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", ns(Ge.status, Ge.body));
3482
3492
  return;
3483
3493
  }
3484
- const qt = Mt({
3494
+ const zn = U.length > 0 ? {
3495
+ title: ce,
3496
+ description: ue,
3497
+ blocks: U
3498
+ } : E ?? void 0, qt = Mt({
3485
3499
  context: te,
3486
3500
  payload: e,
3487
- form: g ?? E,
3488
- answer: pe
3501
+ form: zn,
3502
+ answer: ge
3489
3503
  }), Bt = Nt(qt);
3490
3504
  if (Bt) {
3491
3505
  (Pt = C.current) == null || Pt.call(C, "error", Bt);
3492
3506
  return;
3493
3507
  }
3494
- fe([]), B.reportEvent({
3508
+ he([]), B.reportEvent({
3495
3509
  action: "submit",
3496
3510
  component: "SubmitButton"
3497
3511
  });
3498
- const wn = await Nn(qt, {
3512
+ const On = await In(qt, {
3499
3513
  headers: ee
3500
3514
  });
3501
- if (!w.current) return;
3502
- const Vt = Mn(wn);
3515
+ if (!z.current) return;
3516
+ const Vt = Nn(On);
3503
3517
  (wt = C.current) == null || wt.call(C, Vt.type, Vt.message);
3504
- } catch (Ge) {
3505
- if (!w.current) return;
3506
- const pe = Ge instanceof Error ? Ge.message : "提交失败";
3507
- (zt = C.current) == null || zt.call(C, "error", pe);
3518
+ } catch (Je) {
3519
+ if (!z.current) return;
3520
+ const ge = Je instanceof Error ? Je.message : "提交失败";
3521
+ (zt = C.current) == null || zt.call(C, "error", ge);
3508
3522
  } finally {
3509
- w.current && x(!1);
3523
+ z.current && x(!1);
3510
3524
  }
3511
3525
  }
3512
3526
  }, [
3513
3527
  v,
3514
3528
  Y,
3515
- z,
3516
- I,
3517
- fe,
3529
+ U,
3530
+ ce,
3531
+ ue,
3532
+ F,
3533
+ he,
3518
3534
  B,
3519
3535
  o,
3520
3536
  r,
3521
3537
  ee,
3522
3538
  te,
3523
3539
  e,
3524
- g,
3525
3540
  E
3526
- ]), Et = A(Je);
3527
- Et.current = Je;
3541
+ ]), Et = A(Ke);
3542
+ Et.current = Ke;
3528
3543
  const Ut = j(
3529
- (F) => {
3530
- Ki(
3531
- F,
3544
+ (I) => {
3545
+ Wi(
3546
+ I,
3532
3547
  {
3533
3548
  setValues: (O) => {
3534
3549
  var J;
@@ -3555,14 +3570,14 @@ function es({
3555
3570
  return;
3556
3571
  }
3557
3572
  return b(Ut), () => b(null);
3558
- }, [oe, Ut, b]), p ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(ft, { size: "small" }) }) : !E || z.length === 0 ? /* @__PURE__ */ u(
3559
- Qi,
3573
+ }, [oe, Ut, b]), p ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(dt, { size: "small" }) }) : !E || U.length === 0 ? /* @__PURE__ */ u(
3574
+ es,
3560
3575
  {
3561
3576
  payload: e,
3562
3577
  callbackUrl: r,
3563
3578
  answerAgentContext: te,
3564
3579
  submitHeaders: s,
3565
- unpublishedFormId: y && $ ? $ : void 0,
3580
+ unpublishedFormId: g && $ ? $ : void 0,
3566
3581
  onNotify: l
3567
3582
  }
3568
3583
  ) : /* @__PURE__ */ M(
@@ -3572,13 +3587,13 @@ function es({
3572
3587
  ref: _,
3573
3588
  "data-ask-user-message-id": W || void 0,
3574
3589
  children: [
3575
- y && $ ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(he, { title: $, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3590
+ g && $ ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(ye, { title: $, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3576
3591
  /* @__PURE__ */ u(
3577
- Oi,
3592
+ Vi,
3578
3593
  {
3579
3594
  ref: N,
3580
- doc: ce,
3581
- surfaceId: De,
3595
+ doc: me,
3596
+ surfaceId: $e,
3582
3597
  fieldNames: Y,
3583
3598
  interactive: !0,
3584
3599
  wrapProvider: !1,
@@ -3587,17 +3602,17 @@ function es({
3587
3602
  }
3588
3603
  ),
3589
3604
  /* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
3590
- he,
3605
+ ye,
3591
3606
  {
3592
3607
  title: o === "post" ? "提交 JSON 到 callback_url" : "提交到 answer_agent_callback_url",
3593
3608
  children: /* @__PURE__ */ u(
3594
- Oe,
3609
+ ze,
3595
3610
  {
3596
3611
  type: "primary",
3597
3612
  size: "small",
3598
3613
  loading: v,
3599
3614
  disabled: v,
3600
- onClick: () => void Je(),
3615
+ onClick: () => void Ke(),
3601
3616
  children: "提交"
3602
3617
  }
3603
3618
  )
@@ -3607,16 +3622,16 @@ function es({
3607
3622
  }
3608
3623
  );
3609
3624
  }
3610
- function As(e) {
3625
+ function Ts(e) {
3611
3626
  var c;
3612
- const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = L(() => Wo(), []), [r, o] = P(!1), i = A(null), s = j((m) => {
3627
+ const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = L(() => Xo(), []), [r, o] = w(!1), i = A(null), s = j((m) => {
3613
3628
  o(m);
3614
3629
  }, []), a = j(
3615
3630
  (m) => {
3616
3631
  i.current = m;
3617
3632
  },
3618
3633
  []
3619
- ), l = L(() => !n || !t ? null : new $i({
3634
+ ), l = L(() => !n || !t ? null : new Ki({
3620
3635
  url: n,
3621
3636
  askUserMessageId: t,
3622
3637
  onAutoControl: (m) => {
@@ -3631,8 +3646,8 @@ function As(e) {
3631
3646
  };
3632
3647
  }, [l]), q(() => {
3633
3648
  !l || !r || l.connect();
3634
- }, [l, r]), /* @__PURE__ */ u(be, { children: /* @__PURE__ */ u(Dr, { client: l, children: /* @__PURE__ */ u(Vr, { children: /* @__PURE__ */ u(
3635
- es,
3649
+ }, [l, r]), /* @__PURE__ */ u(ke, { children: /* @__PURE__ */ u(Kr, { client: l, children: /* @__PURE__ */ u(jr, { children: /* @__PURE__ */ u(
3650
+ rs,
3636
3651
  {
3637
3652
  ...e,
3638
3653
  onSurfaceReadyChange: s,
@@ -3641,71 +3656,71 @@ function As(e) {
3641
3656
  ) }) }) });
3642
3657
  }
3643
3658
  export {
3644
- ds as A2UI_PROTOCOL_VERSION,
3645
- As as AskUserFormCard,
3646
- lt as CaseSearchProvider,
3647
- Qi as CurlSubmitBlock,
3648
- Ko as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3649
- Do as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3650
- Ho as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3659
+ hs as A2UI_PROTOCOL_VERSION,
3660
+ Ts as AskUserFormCard,
3661
+ at as CaseSearchProvider,
3662
+ es as CurlSubmitBlock,
3663
+ Wo as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3664
+ Jo as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3665
+ Go as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3651
3666
  Ct as DEFAULT_AUTH_STORAGE_KEY,
3652
- $o as DEFAULT_AUTH_TOKEN_FIELD,
3653
- nr as FORM_MEDIA_SIZES,
3654
- ct as ResumeSearchProvider,
3655
- Cs as SkoponA2uiStreamRenderer,
3656
- be as SkoponFormProvider,
3657
- Oi as SkoponFormRenderer,
3658
- Mo as a2uiToBlocks,
3659
- vn as blocksToA2ui,
3660
- Pr as blocksToJsonSchema,
3667
+ Ko as DEFAULT_AUTH_TOKEN_FIELD,
3668
+ or as FORM_MEDIA_SIZES,
3669
+ lt as ResumeSearchProvider,
3670
+ _s as SkoponA2uiStreamRenderer,
3671
+ ke as SkoponFormProvider,
3672
+ Vi as SkoponFormRenderer,
3673
+ Fo as a2uiToBlocks,
3674
+ bn as blocksToA2ui,
3675
+ zr as blocksToJsonSchema,
3661
3676
  Mt as buildAnswerAgentBody,
3662
- Lo as buildAskUserCurlBodyJson,
3663
- jo as buildAskUserCurlStatement,
3664
- vs as buildAskUserSubmitCurlFromPayload,
3665
- Fo as buildAskUserSurface,
3666
- An as buildCurlStatement,
3667
- Te as coerceToggleValue,
3668
- bs as copyTextToClipboard,
3669
- ai as createCaseSearchClient,
3670
- gs as createEmptyBlock,
3671
- hs as createEmptyFormDefinition,
3672
- Yo as createFormClient,
3673
- ri as createResumeSearchClient,
3674
- ks as createSkoponSdkClients,
3675
- ze as extractExtraBlockValues,
3676
- Uo as extractSurfaceValues,
3677
- Mn as formatAnswerAgentSubmitMessage,
3678
- Vo as getPayloadHiddenBlockValues,
3679
- ys as getPayloadInputFieldNames,
3680
- Bo as getPayloadRenderableBlocks,
3681
- Oo as intersectPayloadBlocksWithForm,
3682
- dt as isA2uiSurfaceEmpty,
3683
- fs as isDisplayBlockType,
3677
+ Do as buildAskUserCurlBodyJson,
3678
+ Ho as buildAskUserCurlStatement,
3679
+ Ss as buildAskUserSubmitCurlFromPayload,
3680
+ Ro as buildAskUserSurface,
3681
+ _n as buildCurlStatement,
3682
+ xe as coerceToggleValue,
3683
+ ks as copyTextToClipboard,
3684
+ ui as createCaseSearchClient,
3685
+ vs as createEmptyBlock,
3686
+ ys as createEmptyFormDefinition,
3687
+ Zo as createFormClient,
3688
+ si as createResumeSearchClient,
3689
+ As as createSkoponSdkClients,
3690
+ we as extractExtraBlockValues,
3691
+ wo as extractSurfaceValues,
3692
+ Nn as formatAnswerAgentSubmitMessage,
3693
+ $o as getPayloadHiddenBlockValues,
3694
+ bs as getPayloadInputFieldNames,
3695
+ jo as getPayloadRenderableBlocks,
3696
+ Vo as intersectPayloadBlocksWithForm,
3697
+ mt as isA2uiSurfaceEmpty,
3698
+ rn as isDisplayBlockType,
3684
3699
  Z as isInputBlockType,
3685
- Ce as isLayoutBlockType,
3686
- de as isMediaBlockType,
3687
- rr as isOptionsBlockType,
3688
- Eo as mapFormDefinitionFromDto,
3689
- qe as normalizeFormDefinition,
3690
- ue as normalizeMultiselectCount,
3691
- Ve as parsePayloadBlocksJson,
3692
- qo as payloadHasInputBlocks,
3693
- Go as resolveAnswerAgentCallbackUrl,
3700
+ ft as isLayoutBlockType,
3701
+ pe as isMediaBlockType,
3702
+ ir as isOptionsBlockType,
3703
+ Po as mapFormDefinitionFromDto,
3704
+ Oe as normalizeFormDefinition,
3705
+ de as normalizeMultiselectCount,
3706
+ Be as parsePayloadBlocksJson,
3707
+ Lo as payloadHasInputBlocks,
3708
+ Qo as resolveAnswerAgentCallbackUrl,
3694
3709
  xt as resolveClientHeaders,
3695
- Wo as resolveRealtimeWsUrl,
3696
- Ur as resolveSchemaDefaultValue,
3697
- Tn as resolveSkoponAuthHeaders,
3710
+ Xo as resolveRealtimeWsUrl,
3711
+ Pr as resolveSchemaDefaultValue,
3712
+ xn as resolveSkoponAuthHeaders,
3698
3713
  Tt as resolveSubmitAuthHeaders,
3699
- Io as resolveSurfaceFromFormDefinition,
3700
- zi as skoponAntdTheme,
3714
+ Uo as resolveSurfaceFromFormDefinition,
3715
+ Bi as skoponAntdTheme,
3701
3716
  ie as skoponBrandColors,
3702
- Nn as submitAnswerAgent,
3703
- _n as submitFormJson,
3704
- ps as supportsDefaultValue,
3705
- No as surfaceDocToMessages,
3706
- ye as syncFormDefinition,
3707
- Jr as useCaseSearch,
3708
- no as useResumeSearch,
3717
+ In as submitAnswerAgent,
3718
+ Tn as submitFormJson,
3719
+ gs as supportsDefaultValue,
3720
+ Eo as surfaceDocToMessages,
3721
+ be as syncFormDefinition,
3722
+ Wr as useCaseSearch,
3723
+ io as useResumeSearch,
3709
3724
  Nt as validateAnswerAgentBody,
3710
- Ss as validateAnswerAgentContext
3725
+ Cs as validateAnswerAgentContext
3711
3726
  };