@skopon-cool/form-sdk 0.6.0 → 0.6.1

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,18 +1,18 @@
1
1
  import './form-sdk.css';
2
- var Xn = Object.defineProperty;
3
- var Zn = (e, t, n) => t in e ? Xn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var X = (e, t, n) => Zn(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { jsx as c, jsxs as U } from "react/jsx-runtime";
6
- import { useRef as x, useState as w, useCallback as L, useMemo as $, createContext as be, useContext as Se, useEffect as z, useSyncExternalStore as er, forwardRef as tr, useImperativeHandle as nr } from "react";
7
- import { Spin as kt, Button as Ne, Typography as re, Avatar as rr, Tag as Ae, Tooltip as ve, Modal as or, Select as dt, Checkbox as ir, Radio as sr, Switch as ar, TimePicker as lr, DatePicker as cr, Upload as nt, Input as rt, InputNumber as ur, ConfigProvider as mr } from "antd";
8
- import { ReloadOutlined as cn, FileTextOutlined as un, UserOutlined as dr, FileImageOutlined as fr, FullscreenOutlined as pr, FileExcelOutlined as hr, FileOutlined as mn, PictureOutlined as gr, SoundOutlined as yr, VideoCameraOutlined as vr } from "@ant-design/icons";
9
- import { createBinderlessComponentImplementation as Z, basicCatalog as Be, A2uiSurface as dn } from "@a2ui/react/v0_9";
2
+ var er = Object.defineProperty;
3
+ var tr = (e, t, n) => t in e ? er(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var X = (e, t, n) => tr(e, typeof t != "symbol" ? t + "" : t, n);
5
+ import { jsx as u, jsxs as U } from "react/jsx-runtime";
6
+ import { useRef as x, useState as w, useCallback as q, useMemo as j, createContext as be, useContext as Se, useEffect as z, useSyncExternalStore as nr, forwardRef as rr, useImperativeHandle as or } from "react";
7
+ import { Spin as xt, Button as Ie, Typography as re, Avatar as ir, Tag as Ae, Tooltip as ve, Modal as sr, Select as yt, Checkbox as ar, Radio as lr, Switch as cr, TimePicker as ur, DatePicker as mr, Upload as st, Input as at, InputNumber as dr, ConfigProvider as fr } from "antd";
8
+ import { ReloadOutlined as mn, FileTextOutlined as dn, UserOutlined as pr, FileImageOutlined as hr, FullscreenOutlined as gr, FileExcelOutlined as yr, FileOutlined as fn, PictureOutlined as vr, SoundOutlined as br, VideoCameraOutlined as Sr } from "@ant-design/icons";
9
+ import { createBinderlessComponentImplementation as Z, basicCatalog as Le, A2uiSurface as pn } from "@a2ui/react/v0_9";
10
10
  import { z as f } from "zod";
11
- import { Catalog as br, MessageProcessor as fn } from "@a2ui/web_core/v0_9";
12
- import { injectBasicCatalogStyles as pn } from "@a2ui/web_core/v0_9/basic_catalog";
13
- import { injectStyles as hn } from "@a2ui/react/styles";
14
- import Qt from "dayjs";
15
- const Ks = "v0.9", Sr = [
11
+ import { Catalog as kr, MessageProcessor as hn } from "@a2ui/web_core/v0_9";
12
+ import { injectBasicCatalogStyles as gn } from "@a2ui/web_core/v0_9/basic_catalog";
13
+ import { injectStyles as yn } from "@a2ui/react/styles";
14
+ import Zt from "dayjs";
15
+ const Ys = "v0.9", Cr = [
16
16
  "huge",
17
17
  "large",
18
18
  "medium",
@@ -25,32 +25,32 @@ function _e(e) {
25
25
  function Te(e) {
26
26
  return e === "web";
27
27
  }
28
- function gn(e) {
28
+ function vn(e) {
29
29
  return e === "heading" || e === "paragraph";
30
30
  }
31
31
  function ee(e) {
32
- return !gn(e) && !_e(e) && !Te(e);
32
+ return !vn(e) && !_e(e) && !Te(e);
33
33
  }
34
- function yn(e) {
35
- return gn(e) || _e(e) || Te(e);
34
+ function bn(e) {
35
+ return vn(e) || _e(e) || Te(e);
36
36
  }
37
- function vn(e) {
37
+ function Sn(e) {
38
38
  return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
39
39
  }
40
- function Ws(e) {
40
+ function Qs(e) {
41
41
  return ee(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
42
42
  }
43
- const ft = 360, kr = 200, Cr = 1200;
44
- function Ie(e) {
43
+ const vt = 360, Ar = 200, _r = 1200;
44
+ function Ne(e) {
45
45
  if (e == null || e === "")
46
- return ft;
46
+ return vt;
47
47
  const t = typeof e == "number" ? e : Number(e);
48
48
  return Number.isFinite(t) ? Math.min(
49
- Cr,
50
- Math.max(kr, Math.floor(t))
51
- ) : ft;
49
+ _r,
50
+ Math.max(Ar, Math.floor(t))
51
+ ) : vt;
52
52
  }
53
- function Ar(e) {
53
+ function Tr(e) {
54
54
  if (typeof e != "string") return !1;
55
55
  const t = e.trim();
56
56
  if (!t) return !1;
@@ -64,7 +64,7 @@ function Ar(e) {
64
64
  return !1;
65
65
  }
66
66
  }
67
- function _r() {
67
+ function xr() {
68
68
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
69
69
  return crypto.randomUUID();
70
70
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -79,10 +79,10 @@ function _r() {
79
79
  });
80
80
  }
81
81
  function de(e) {
82
- const t = _r().replace(/-/g, "").slice(0, 8);
82
+ const t = xr().replace(/-/g, "").slice(0, 8);
83
83
  return `${e}${t}`;
84
84
  }
85
- const bn = [
85
+ const kn = [
86
86
  { value: "image/*", label: "图片" },
87
87
  { value: "video/*", label: "视频" },
88
88
  { value: "audio/*", label: "音频" },
@@ -93,7 +93,7 @@ const bn = [
93
93
  { value: "text/plain", label: "纯文本" },
94
94
  { value: "application/zip", label: "ZIP 压缩包" },
95
95
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
96
- ], Tr = {
96
+ ], Fr = {
97
97
  "image/*": ["image/*"],
98
98
  "video/*": ["video/*"],
99
99
  "audio/*": ["audio/*"],
@@ -113,7 +113,7 @@ const bn = [
113
113
  "text/plain": ["text/plain"],
114
114
  "application/zip": ["application/zip"],
115
115
  "application/x-rar-compressed": ["application/x-rar-compressed"]
116
- }, xr = {
116
+ }, Mr = {
117
117
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
118
118
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
119
119
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -124,14 +124,14 @@ const bn = [
124
124
  "text/plain": [".txt"],
125
125
  "application/zip": [".zip", ".7z"],
126
126
  "application/x-rar-compressed": [".rar"]
127
- }, Mr = {
127
+ }, Ir = {
128
128
  "application/msword": "office/word",
129
129
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
130
130
  "application/vnd.ms-excel": "office/excel",
131
131
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
132
132
  "application/vnd.ms-powerpoint": "office/ppt",
133
133
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
134
- }, Ct = [
134
+ }, Ft = [
135
135
  { value: ".jpg", label: ".jpg" },
136
136
  { value: ".jpeg", label: ".jpeg" },
137
137
  { value: ".png", label: ".png" },
@@ -157,18 +157,18 @@ const bn = [
157
157
  { value: ".zip", label: ".zip" },
158
158
  { value: ".rar", label: ".rar" },
159
159
  { value: ".7z", label: ".7z" }
160
- ], Fr = Object.fromEntries(
161
- bn.map((e) => [e.value, e.label])
162
- ), Nr = Object.fromEntries(
163
- Ct.map((e) => [e.value, e.label])
164
- ), Ir = new Set(bn.map((e) => e.value)), Er = new Set(
165
- Ct.map((e) => e.value)
160
+ ], Nr = Object.fromEntries(
161
+ kn.map((e) => [e.value, e.label])
162
+ ), Er = Object.fromEntries(
163
+ Ft.map((e) => [e.value, e.label])
164
+ ), Ur = new Set(kn.map((e) => e.value)), wr = new Set(
165
+ Ft.map((e) => e.value)
166
166
  );
167
- function Ur(e) {
167
+ function Rr(e) {
168
168
  const t = e.trim();
169
- return t ? Ir.has(t) ? t : Mr[t] ?? null : null;
169
+ return t ? Ur.has(t) ? t : Ir[t] ?? null : null;
170
170
  }
171
- function wr(e) {
171
+ function Pr(e) {
172
172
  return Array.isArray(e) ? e.map((t) => {
173
173
  const n = t.trim().toLowerCase();
174
174
  return n ? n.startsWith(".") ? n : `.${n}` : "";
@@ -178,80 +178,80 @@ function Ee(e) {
178
178
  if (!Array.isArray(e)) return [];
179
179
  const t = [], n = /* @__PURE__ */ new Set();
180
180
  for (const r of e) {
181
- const o = Ur(r);
181
+ const o = Rr(r);
182
182
  o && !n.has(o) && (n.add(o), t.push(o));
183
183
  }
184
184
  return t;
185
185
  }
186
- function Rr(e) {
186
+ function zr(e) {
187
187
  const t = Ee(e), n = [];
188
188
  for (const r of t)
189
- n.push(...Tr[r] ?? [r]);
189
+ n.push(...Fr[r] ?? [r]);
190
190
  return n;
191
191
  }
192
- function Pr(e) {
192
+ function Or(e) {
193
193
  const t = Ee(e);
194
194
  if (t.length === 0) return [];
195
195
  const n = /* @__PURE__ */ new Set();
196
196
  for (const r of t)
197
- for (const o of xr[r] ?? [])
197
+ for (const o of Mr[r] ?? [])
198
198
  n.add(o);
199
- return Ct.filter((r) => n.has(r.value));
199
+ return Ft.filter((r) => n.has(r.value));
200
200
  }
201
- function At(e, t) {
202
- const n = wr(t), r = Ee(e);
201
+ function Mt(e, t) {
202
+ const n = Pr(t), r = Ee(e);
203
203
  if (r.length === 0)
204
- return n.filter((i) => Er.has(i));
204
+ return n.filter((i) => wr.has(i));
205
205
  const o = new Set(
206
- Pr(r).map((i) => i.value)
206
+ Or(r).map((i) => i.value)
207
207
  );
208
208
  return n.filter((i) => o.has(i));
209
209
  }
210
- function zr(e, t) {
211
- const n = Rr(e), r = At(e, t), o = [...n, ...r];
210
+ function Br(e, t) {
211
+ const n = zr(e), r = Mt(e, t), o = [...n, ...r];
212
212
  return o.length > 0 ? o.join(",") : void 0;
213
213
  }
214
- function Or(e, t) {
215
- const n = Ee(e), r = At(
214
+ function Lr(e, t) {
215
+ const n = Ee(e), r = Mt(
216
216
  n,
217
217
  t
218
218
  ), o = [
219
- ...n.map((i) => Fr[i] ?? i),
220
- ...r.map((i) => Nr[i] ?? i)
219
+ ...n.map((i) => Nr[i] ?? i),
220
+ ...r.map((i) => Er[i] ?? i)
221
221
  ];
222
222
  return o.length === 0 ? null : o.join("、");
223
223
  }
224
- const Br = [
224
+ const qr = [
225
225
  "video",
226
226
  "audio",
227
227
  "image",
228
228
  "file",
229
229
  "spreadsheet",
230
230
  "document"
231
- ], qr = new Set(Br);
232
- function Lr(e) {
233
- return e && qr.has(e) ? e : "file";
231
+ ], Vr = new Set(qr);
232
+ function $r(e) {
233
+ return e && Vr.has(e) ? e : "file";
234
234
  }
235
235
  function Ue(e) {
236
- return typeof e == "string" && Sr.includes(e) ? e : "medium";
236
+ return typeof e == "string" && Cr.includes(e) ? e : "medium";
237
237
  }
238
- function Vr(e, t) {
238
+ function jr(e, t) {
239
239
  var o;
240
240
  const n = Math.max(1, t);
241
241
  let r = [];
242
242
  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);
243
243
  }
244
- function jr(e) {
244
+ function Dr(e) {
245
245
  var t;
246
246
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
247
247
  }
248
- function $r(e) {
248
+ function Hr(e) {
249
249
  return `form-media-size-${Ue(e)}`;
250
250
  }
251
- function Dr(e) {
252
- return `form-media-preview form-media-list ${$r(e)}`;
251
+ function Kr(e) {
252
+ return `form-media-preview form-media-list ${Hr(e)}`;
253
253
  }
254
- function Xt(e) {
254
+ function en(e) {
255
255
  if (typeof e == "number")
256
256
  return Number.isFinite(e) ? String(e) : void 0;
257
257
  if (typeof e != "string") return;
@@ -264,16 +264,16 @@ function ce(e) {
264
264
  const t = [];
265
265
  for (const n of e) {
266
266
  if (!n || typeof n != "object" || Array.isArray(n)) continue;
267
- const r = n, o = Xt(r.value), i = Xt(r.label);
267
+ const r = n, o = en(r.value), i = en(r.label);
268
268
  o === void 0 || i === void 0 || t.push({ value: o, label: i });
269
269
  }
270
270
  return t;
271
271
  }
272
272
  function fe(e) {
273
- return !vn(e.type) || ce(e.options).length > 0;
273
+ return !Sn(e.type) || ce(e.options).length > 0;
274
274
  }
275
- const Hr = 10;
276
- function Sn(e) {
275
+ const Wr = 10;
276
+ function Cn(e) {
277
277
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
278
278
  }
279
279
  function we(e) {
@@ -287,10 +287,10 @@ function ge(e, t = 1) {
287
287
  const n = typeof e == "number" ? e : Number(e);
288
288
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
289
289
  }
290
- function kn(e, t) {
290
+ function An(e, t) {
291
291
  return t == null ? void 0 : e === "toggle" ? we(t) : e === "multiselect" || e === "checkbox" || e === "file" || 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;
292
292
  }
293
- function Kr(e) {
293
+ function Gr(e) {
294
294
  if (Array.isArray(e)) return e.map(String).filter(Boolean);
295
295
  if (typeof e == "string" && e.trim())
296
296
  try {
@@ -300,11 +300,11 @@ function Kr(e) {
300
300
  }
301
301
  return [];
302
302
  }
303
- function Wr(e) {
304
- 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 = Kr(e == null ? void 0 : e.flowUniqueIds);
303
+ function Jr(e) {
304
+ 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 = Gr(e == null ? void 0 : e.flowUniqueIds);
305
305
  return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
306
306
  }
307
- function Gr(e) {
307
+ function Yr(e) {
308
308
  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;
309
309
  return {
310
310
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -314,14 +314,14 @@ function Gr(e) {
314
314
  pageSize: n
315
315
  };
316
316
  }
317
- function Jr(e) {
317
+ function Qr(e) {
318
318
  if (e.type !== "case_singleselect") return e;
319
319
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
320
320
  return { ...e, type: "case_multiselect", defaultValue: t };
321
321
  }
322
- function Yr(e) {
322
+ function Xr(e) {
323
323
  var o, i, s, a, l;
324
- const t = Jr(e), n = Ee(t.fileAcceptTypes), r = t.type;
324
+ const t = Qr(e), n = Ee(t.fileAcceptTypes), r = t.type;
325
325
  return {
326
326
  id: ((o = t.id) == null ? void 0 : o.trim()) || de("block-"),
327
327
  type: r,
@@ -330,19 +330,19 @@ function Yr(e) {
330
330
  placeholder: t.placeholder ?? "",
331
331
  help: t.help ?? "",
332
332
  required: t.required === !0,
333
- mediaUrls: _e(r) ? Vr(t, Hr) : void 0,
333
+ mediaUrls: _e(r) ? jr(t, Wr) : void 0,
334
334
  mediaSize: _e(r) ? Ue(t.mediaSize) : void 0,
335
335
  webUrl: Te(r) ? ((s = t.webUrl) == null ? void 0 : s.trim()) ?? "" : void 0,
336
- webHeight: Te(r) ? Ie(t.webHeight) : void 0,
336
+ webHeight: Te(r) ? Ne(t.webHeight) : void 0,
337
337
  fileAcceptTypes: n,
338
- fileAcceptExtensions: At(
338
+ fileAcceptExtensions: Mt(
339
339
  n,
340
340
  t.fileAcceptExtensions
341
341
  ),
342
- filePlaceholderIcon: Lr(t.filePlaceholderIcon),
342
+ filePlaceholderIcon: $r(t.filePlaceholderIcon),
343
343
  fileMinCount: r === "file" ? qe(t.fileMinCount, 1) : void 0,
344
344
  fileMaxCount: r === "file" ? qe(t.fileMaxCount, 1) : void 0,
345
- defaultValue: kn(r, t.defaultValue),
345
+ defaultValue: An(r, t.defaultValue),
346
346
  jsonSchemaDescription: ((a = t.jsonSchemaDescription) == null ? void 0 : a.trim()) ?? "",
347
347
  hidden: r === "text" ? t.hidden === !0 : void 0,
348
348
  needLLM: t.needLLM === !0 ? !0 : void 0,
@@ -355,27 +355,27 @@ function Yr(e) {
355
355
  resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
356
356
  resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? ge(t.resumeMinCount, 1) : void 0,
357
357
  resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? ge(t.resumeMaxCount, 1) : void 0,
358
- resumeFilter: r === "resume_multiselect" ? Gr(t.resumeFilter) : void 0,
358
+ resumeFilter: r === "resume_multiselect" ? Yr(t.resumeFilter) : void 0,
359
359
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
360
360
  caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? ge(t.caseMinCount, 1) : void 0,
361
361
  caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? ge(t.caseMaxCount, 1) : void 0,
362
- caseFilter: r === "case_multiselect" ? Wr(t.caseFilter) : void 0
362
+ caseFilter: r === "case_multiselect" ? Jr(t.caseFilter) : void 0
363
363
  };
364
364
  }
365
- function Qr(e) {
365
+ function Zr(e) {
366
366
  return new Set(ce(e.options).map((t) => t.value));
367
367
  }
368
- function Zt(e, t) {
368
+ function tn(e, t) {
369
369
  const n = {
370
370
  type: "array",
371
371
  items: { type: "string" }
372
372
  };
373
373
  return e !== void 0 && (n.minItems = ge(e, 1)), t !== void 0 && (n.maxItems = ge(t, 1)), n;
374
374
  }
375
- function Xr(e) {
376
- const t = kn(e.type, e.defaultValue);
375
+ function eo(e) {
376
+ const t = An(e.type, e.defaultValue);
377
377
  if (t === void 0) return;
378
- const n = Qr(e);
378
+ const n = Zr(e);
379
379
  switch (e.type) {
380
380
  case "toggle":
381
381
  return t;
@@ -406,7 +406,7 @@ function Xr(e) {
406
406
  return t;
407
407
  }
408
408
  }
409
- function Zr(e) {
409
+ function to(e) {
410
410
  var i, s;
411
411
  if (!((i = e.name) == null ? void 0 : i.trim()) || !ee(e.type)) return null;
412
412
  let n;
@@ -444,10 +444,10 @@ function Zr(e) {
444
444
  break;
445
445
  }
446
446
  case "resume_multiselect":
447
- n = Zt(e.resumeMinCount, e.resumeMaxCount);
447
+ n = tn(e.resumeMinCount, e.resumeMaxCount);
448
448
  break;
449
449
  case "case_multiselect":
450
- n = Zt(e.caseMinCount, e.caseMaxCount);
450
+ n = tn(e.caseMinCount, e.caseMaxCount);
451
451
  break;
452
452
  case "text":
453
453
  n = { type: "string" }, e.hidden && (n["x-hidden"] = !0);
@@ -458,17 +458,17 @@ function Zr(e) {
458
458
  }
459
459
  const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
460
460
  r && (n.$comment = r);
461
- const o = Xr(e);
461
+ const o = eo(e);
462
462
  return o !== void 0 && (n.default = o), n;
463
463
  }
464
- function eo(e, t, n) {
464
+ function no(e, t, n) {
465
465
  var l;
466
466
  const r = {}, o = [];
467
- for (const u of e) {
468
- const m = (l = u.name) == null ? void 0 : l.trim();
469
- if (!m || !ee(u.type) || !fe(u)) continue;
470
- const d = Zr(u);
471
- d && (r[m] = d, u.required && o.push(m));
467
+ for (const c of e) {
468
+ const m = (l = c.name) == null ? void 0 : l.trim();
469
+ if (!m || !ee(c.type) || !fe(c)) continue;
470
+ const d = to(c);
471
+ d && (r[m] = d, c.required && o.push(m));
472
472
  }
473
473
  const i = {
474
474
  type: "object",
@@ -484,29 +484,29 @@ function xe(e) {
484
484
  title: t,
485
485
  description: n,
486
486
  blocks: e.blocks,
487
- jsonSchema: eo(e.blocks, t, n)
487
+ jsonSchema: no(e.blocks, t, n)
488
488
  };
489
489
  }
490
- function $e(e) {
490
+ function De(e) {
491
491
  if (!e || !Array.isArray(e.blocks))
492
492
  return xe({ title: "", description: "", blocks: [] });
493
- const t = e.blocks.map(Yr);
493
+ const t = e.blocks.map(Xr);
494
494
  return xe({
495
495
  title: typeof e.title == "string" ? e.title : "",
496
496
  description: typeof e.description == "string" ? e.description : "",
497
497
  blocks: t
498
498
  });
499
499
  }
500
- function Gs() {
500
+ function Xs() {
501
501
  return xe({ title: "", description: "", blocks: [] });
502
502
  }
503
- function Js(e) {
503
+ function Zs(e) {
504
504
  const t = {
505
505
  id: de("block-"),
506
506
  type: e,
507
507
  label: e
508
508
  };
509
- return ee(e) && (t.label = "", t.name = de("field_"), t.placeholder = "", t.required = !1), _e(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), Te(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = ft), vn(e) && (t.options = [
509
+ return ee(e) && (t.label = "", t.name = de("field_"), t.placeholder = "", t.required = !1), _e(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), Te(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = vt), Sn(e) && (t.options = [
510
510
  { value: "option_1", label: "选项 1" },
511
511
  { value: "option_2", label: "选项 2" }
512
512
  ]), 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 = {
@@ -516,7 +516,7 @@ function Js(e) {
516
516
  pageSize: 20
517
517
  }, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
518
518
  }
519
- function to(e) {
519
+ function ro(e) {
520
520
  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) : [];
521
521
  return {
522
522
  agentKind: n,
@@ -527,14 +527,14 @@ function to(e) {
527
527
  pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
528
528
  };
529
529
  }
530
- function en(e) {
530
+ function nn(e) {
531
531
  if (e == null) return;
532
532
  const t = typeof e == "number" ? e : Number(e);
533
533
  if (!(!Number.isFinite(t) || t < 1))
534
534
  return Math.floor(t);
535
535
  }
536
- function no(e, t) {
537
- var s, a, l, u, m, d;
536
+ function oo(e, t) {
537
+ var s, a, l, c, m, d;
538
538
  const { id: n, label: r, path: o, withData: i } = t;
539
539
  return i({
540
540
  id: n,
@@ -547,7 +547,7 @@ function no(e, t) {
547
547
  agentKind: (s = e.caseFilter) == null ? void 0 : s.agentKind,
548
548
  agentUniqueId: (a = e.caseFilter) == null ? void 0 : a.agentUniqueId,
549
549
  flowType: (l = e.caseFilter) == null ? void 0 : l.flowType,
550
- category: (u = e.caseFilter) == null ? void 0 : u.category,
550
+ category: (c = e.caseFilter) == null ? void 0 : c.category,
551
551
  flowUniqueIds: ((m = e.caseFilter) == null ? void 0 : m.flowUniqueIds) ?? [],
552
552
  pageSize: ((d = e.caseFilter) == null ? void 0 : d.pageSize) ?? 20
553
553
  },
@@ -556,7 +556,7 @@ function no(e, t) {
556
556
  value: { path: o }
557
557
  });
558
558
  }
559
- function ro(e, t, n) {
559
+ function io(e, t, n) {
560
560
  const r = n.nameFromValue(e.value), o = {
561
561
  ...t("case_multiselect"),
562
562
  name: r,
@@ -564,23 +564,23 @@ function ro(e, t, n) {
564
564
  }, i = n.asLiteral(e.placeholder);
565
565
  i && (o.placeholder = i);
566
566
  const s = n.asLiteral(e.help);
567
- s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = to(e.caseFilter));
568
- const a = en(e.minCount);
567
+ s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = ro(e.caseFilter));
568
+ const a = nn(e.minCount);
569
569
  a !== void 0 && (o.caseMinCount = a);
570
- const l = en(e.maxCount);
570
+ const l = nn(e.maxCount);
571
571
  return l !== void 0 && (o.caseMaxCount = l), o;
572
572
  }
573
- const Cn = be(
573
+ const _n = be(
574
574
  null
575
575
  );
576
- function oo(e) {
576
+ function so(e) {
577
577
  try {
578
578
  return JSON.stringify(e);
579
579
  } catch {
580
580
  return String(e.length);
581
581
  }
582
582
  }
583
- const io = {
583
+ const ao = {
584
584
  publishLiveOptions: () => {
585
585
  },
586
586
  liveOptions: /* @__PURE__ */ new Map(),
@@ -589,23 +589,23 @@ const io = {
589
589
  clearPendingChangeFields: () => {
590
590
  }
591
591
  };
592
- function so({ children: e }) {
593
- const t = x(/* @__PURE__ */ new Map()), n = x(/* @__PURE__ */ new Map()), r = x([]), [o, i] = w(0), [s, a] = w(() => /* @__PURE__ */ new Map()), [l, u] = w(
592
+ function lo({ children: e }) {
593
+ const t = x(/* @__PURE__ */ new Map()), n = x(/* @__PURE__ */ new Map()), r = x([]), [o, i] = w(0), [s, a] = w(() => /* @__PURE__ */ new Map()), [l, c] = w(
594
594
  []
595
- ), m = L(
595
+ ), m = q(
596
596
  (y, T) => {
597
597
  const g = y.trim();
598
598
  if (!g) return;
599
599
  const C = T.map((p) => ({
600
600
  value: String(p.value ?? ""),
601
601
  label: String(p.label ?? p.value ?? "")
602
- })), v = oo(C);
603
- n.current.get(g) !== v && (n.current.set(g, v), t.current.set(g, C), r.current.includes(g) || (r.current = [...r.current, g]), a(new Map(t.current)), u(r.current), i((p) => p + 1));
602
+ })), v = so(C);
603
+ n.current.get(g) !== v && (n.current.set(g, v), t.current.set(g, C), r.current.includes(g) || (r.current = [...r.current, g]), a(new Map(t.current)), c(r.current), i((p) => p + 1));
604
604
  },
605
605
  []
606
- ), d = L(() => {
607
- r.current = [], u([]);
608
- }, []), k = $(
606
+ ), d = q(() => {
607
+ r.current = [], c([]);
608
+ }, []), S = j(
609
609
  () => ({
610
610
  publishLiveOptions: m,
611
611
  liveOptions: s,
@@ -621,26 +621,26 @@ function so({ children: e }) {
621
621
  d
622
622
  ]
623
623
  );
624
- return /* @__PURE__ */ c(Cn.Provider, { value: k, children: e });
624
+ return /* @__PURE__ */ u(_n.Provider, { value: S, children: e });
625
625
  }
626
- function _t() {
627
- return Se(Cn) ?? io;
626
+ function It() {
627
+ return Se(_n) ?? ao;
628
628
  }
629
- const An = be({ interactive: !0 });
630
- function pt({
629
+ const Tn = be({ interactive: !0 });
630
+ function bt({
631
631
  interactive: e,
632
632
  children: t
633
633
  }) {
634
- return /* @__PURE__ */ c(An.Provider, { value: { interactive: e }, children: t });
634
+ return /* @__PURE__ */ u(Tn.Provider, { value: { interactive: e }, children: t });
635
635
  }
636
636
  function ue() {
637
- return Se(An);
637
+ return Se(Tn);
638
638
  }
639
- const _n = be(null);
640
- function ao(e) {
639
+ const xn = be(null);
640
+ function co(e) {
641
641
  return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
642
642
  }
643
- const lo = {
643
+ const uo = {
644
644
  reportEvent: () => {
645
645
  },
646
646
  reportData: () => {
@@ -648,7 +648,7 @@ const lo = {
648
648
  runAutoControl: (e) => e(),
649
649
  isAutoControl: () => !1
650
650
  };
651
- function co(e) {
651
+ function mo(e) {
652
652
  const t = {};
653
653
  for (const [n, r] of Object.entries(e.form_values ?? {}))
654
654
  r !== void 0 && (t[n] = r);
@@ -658,40 +658,40 @@ function co(e) {
658
658
  form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
659
659
  };
660
660
  }
661
- function uo({
661
+ function fo({
662
662
  client: e,
663
663
  children: t
664
664
  }) {
665
665
  const n = x(0), r = x(e);
666
666
  r.current = e;
667
- const o = L((u) => {
667
+ const o = q((c) => {
668
668
  const m = r.current;
669
669
  if (!m) return;
670
670
  const d = {
671
- action: u.action,
672
- component: u.component
671
+ action: c.action,
672
+ component: c.component
673
673
  };
674
- u.field !== void 0 && (d.field = u.field), u.value !== void 0 && (d.value = u.value);
675
- const k = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
676
- m.send(k, d);
677
- }, []), i = L((u) => {
674
+ c.field !== void 0 && (d.field = c.field), c.value !== void 0 && (d.value = c.value);
675
+ const S = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
676
+ m.send(S, d);
677
+ }, []), i = q((c) => {
678
678
  const m = r.current;
679
- m && m.send("form_runtime_data", co(u));
680
- }, []), s = L((u) => {
679
+ m && m.send("form_runtime_data", mo(c));
680
+ }, []), s = q((c) => {
681
681
  n.current += 1;
682
682
  let m;
683
683
  try {
684
- m = u();
684
+ m = c();
685
685
  } catch (d) {
686
686
  throw n.current = Math.max(0, n.current - 1), d;
687
687
  }
688
- return ao(m) ? Promise.resolve(m).finally(() => {
688
+ return co(m) ? Promise.resolve(m).finally(() => {
689
689
  n.current = Math.max(0, n.current - 1);
690
690
  }) : (n.current = Math.max(0, n.current - 1), m);
691
- }, []), a = L(
691
+ }, []), a = q(
692
692
  () => n.current > 0,
693
693
  []
694
- ), l = $(
694
+ ), l = j(
695
695
  () => ({
696
696
  reportEvent: o,
697
697
  reportData: i,
@@ -700,30 +700,30 @@ function uo({
700
700
  }),
701
701
  [o, i, s, a]
702
702
  );
703
- return /* @__PURE__ */ c(_n.Provider, { value: l, children: t });
703
+ return /* @__PURE__ */ u(xn.Provider, { value: l, children: t });
704
704
  }
705
- function Tn() {
706
- return Se(_n) ?? lo;
705
+ function Fn() {
706
+ return Se(xn) ?? uo;
707
707
  }
708
- const mo = 300;
709
- function fo(e) {
708
+ const po = 300;
709
+ function ho(e) {
710
710
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
711
711
  }
712
- function po(e) {
712
+ function go(e) {
713
713
  if (!e) return;
714
714
  const t = e.trim();
715
715
  if (t)
716
716
  return t.startsWith("/") ? t.slice(1) : t;
717
717
  }
718
718
  function me(e, t = "value", n = {}) {
719
- const o = e.componentModel.properties[t], i = fo(o), s = po(i), a = Tn(), {
719
+ const o = e.componentModel.properties[t], i = ho(o), s = go(i), a = Fn(), {
720
720
  component: l = "Unknown",
721
- changeAction: u = "change",
721
+ changeAction: c = "change",
722
722
  debounceChange: m = !1
723
- } = n, d = x(null), k = x(void 0), y = x(!1), T = x(a);
723
+ } = n, d = x(null), S = x(void 0), y = x(!1), T = x(a);
724
724
  T.current = a;
725
- const g = x(u);
726
- g.current = u;
725
+ const g = x(c);
726
+ g.current = c;
727
727
  const C = x(l);
728
728
  C.current = l;
729
729
  const v = x(s);
@@ -732,51 +732,51 @@ function me(e, t = "value", n = {}) {
732
732
  action: g.current,
733
733
  component: C.current,
734
734
  field: v.current,
735
- value: k.current
735
+ value: S.current
736
736
  }));
737
737
  }, []);
738
- const p = L(
739
- (I) => {
738
+ const p = q(
739
+ (N) => {
740
740
  if (!i || o === void 0) return () => {
741
741
  };
742
- const A = e.dataContext.subscribeDynamicValue(o, () => I());
742
+ const A = e.dataContext.subscribeDynamicValue(o, () => N());
743
743
  return () => A.unsubscribe();
744
744
  },
745
745
  [e, o, i]
746
- ), S = L(() => {
746
+ ), k = q(() => {
747
747
  if (!(!i || o === void 0))
748
748
  return e.dataContext.resolveDynamicValue(o);
749
- }, [e, o, i]), N = er(p, S, S), O = L(
750
- (I) => {
749
+ }, [e, o, i]), I = nr(p, k, k), O = q(
750
+ (N) => {
751
751
  if (!s) return;
752
752
  const A = () => {
753
753
  y.current = !1, T.current.reportEvent({
754
- action: u,
754
+ action: c,
755
755
  component: l,
756
756
  field: s,
757
- value: I
757
+ value: N
758
758
  });
759
759
  };
760
760
  if (!m) {
761
761
  A();
762
762
  return;
763
763
  }
764
- k.current = I, y.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
764
+ S.current = N, y.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
765
765
  d.current = null, A();
766
- }, mo);
766
+ }, po);
767
767
  },
768
- [s, u, l, m]
769
- ), F = L(
770
- (I) => {
771
- !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), I);
768
+ [s, c, l, m]
769
+ ), M = q(
770
+ (N) => {
771
+ !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), N);
772
772
  },
773
773
  [e, o, i]
774
- ), j = L(
775
- (I) => {
776
- F(I), O(I);
774
+ ), $ = q(
775
+ (N) => {
776
+ M(N), O(N);
777
777
  },
778
- [F, O]
779
- ), H = L(() => {
778
+ [M, O]
779
+ ), H = q(() => {
780
780
  s && T.current.reportEvent({
781
781
  action: "focus",
782
782
  component: l,
@@ -784,54 +784,54 @@ function me(e, t = "value", n = {}) {
784
784
  });
785
785
  }, [s, l]);
786
786
  return {
787
- value: N,
788
- setValue: j,
787
+ value: I,
788
+ setValue: $,
789
789
  /** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
790
- setValueSilent: F,
790
+ setValueSilent: M,
791
791
  hasBinding: !!i,
792
792
  fieldName: s,
793
793
  reportFocus: H
794
794
  };
795
795
  }
796
- function Me(e) {
796
+ function Fe(e) {
797
797
  if (typeof e == "string") return e || void 0;
798
798
  if (typeof e == "number") return String(e);
799
799
  }
800
800
  function ne(e) {
801
801
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
802
802
  }
803
- function xn(e, t) {
803
+ function Mn(e, t) {
804
804
  return t ? Array.isArray(e) ? null : ne(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
805
805
  }
806
- function Le(e) {
806
+ function Ve(e) {
807
807
  if (e == null) return;
808
808
  const t = typeof e == "number" ? e : Number(e);
809
809
  if (!(!Number.isFinite(t) || t < 1))
810
810
  return Math.floor(t);
811
811
  }
812
- function Mn(e, t, n, r) {
812
+ function In(e, t, n, r) {
813
813
  return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
814
814
  }
815
- function Fn(e, t, n, r, o) {
815
+ function Nn(e, t, n, r, o) {
816
816
  return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
817
817
  }
818
- function Nn(e, t) {
818
+ function En(e, t) {
819
819
  return t === void 0 || e.length <= t ? null : e.slice(0, t);
820
820
  }
821
- const In = be(null);
822
- function ht({
821
+ const Un = be(null);
822
+ function St({
823
823
  caseSearch: e,
824
824
  children: t
825
825
  }) {
826
- return /* @__PURE__ */ c(In.Provider, { value: e ?? null, children: t });
826
+ return /* @__PURE__ */ u(Un.Provider, { value: e ?? null, children: t });
827
827
  }
828
- function ho() {
829
- return Se(In);
828
+ function yo() {
829
+ return Se(Un);
830
830
  }
831
- function ot(e) {
831
+ function lt(e) {
832
832
  return typeof e == "string" ? e : "";
833
833
  }
834
- function go(e) {
834
+ function vo(e) {
835
835
  if (Array.isArray(e)) return e.map(String).filter(Boolean);
836
836
  if (typeof e == "string" && e.trim())
837
837
  try {
@@ -841,21 +841,21 @@ function go(e) {
841
841
  }
842
842
  return [];
843
843
  }
844
- function it(e) {
844
+ function ct(e) {
845
845
  if (!e || typeof e != "object")
846
846
  return { flowUniqueIds: [], pageSize: 20 };
847
- 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 = go(t.flowUniqueIds);
847
+ 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 = vo(t.flowUniqueIds);
848
848
  return { agentKind: o, agentUniqueId: i, flowType: s, category: a, flowUniqueIds: l, pageSize: r };
849
849
  }
850
- function st(e) {
850
+ function ut(e) {
851
851
  var r;
852
852
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
853
853
  return t || n;
854
854
  }
855
- function yo(e) {
855
+ function bo(e) {
856
856
  return JSON.stringify(e);
857
857
  }
858
- const vo = {
858
+ const So = {
859
859
  name: "SkoponCaseSelect",
860
860
  schema: f.object({
861
861
  label: f.any().optional(),
@@ -868,7 +868,7 @@ const vo = {
868
868
  value: f.any().optional()
869
869
  }).passthrough()
870
870
  };
871
- function bo({
871
+ function ko({
872
872
  item: e,
873
873
  selected: t,
874
874
  disabled: n,
@@ -882,10 +882,10 @@ function bo({
882
882
  disabled: n,
883
883
  onClick: r,
884
884
  children: [
885
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ c(un, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
885
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(dn, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
886
886
  /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-body", children: [
887
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name }),
888
- e.description ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
887
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
888
+ e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
889
889
  /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-meta", children: [
890
890
  e.caseUniqueId,
891
891
  e.platform ? ` · ${e.platform}` : "",
@@ -896,38 +896,38 @@ function bo({
896
896
  }
897
897
  );
898
898
  }
899
- function So({ context: e }) {
900
- const { interactive: t } = ue(), n = ho(), { publishLiveOptions: r } = _t(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = me(e, "value", {
899
+ function Co({ context: e }) {
900
+ const { interactive: t } = ue(), n = yo(), { publishLiveOptions: r } = It(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = me(e, "value", {
901
901
  component: "SkoponCaseSelect",
902
902
  changeAction: "click"
903
- }), l = e.componentModel.properties, u = ot(l.label), m = ot(l.placeholder), d = ot(l.help), k = l.enableRefresh !== !1, y = Le(l.minCount), T = Le(l.maxCount), g = $(() => it(l.caseFilter), [l.caseFilter]), C = yo(g), [v, p] = w(1), [S, N] = w(!1), [O, F] = w(""), [j, H] = w([]), [I, A] = w(0), [Y, G] = w(g.pageSize ?? 20), W = x(0), q = ne(o);
903
+ }), l = e.componentModel.properties, c = lt(l.label), m = lt(l.placeholder), d = lt(l.help), S = l.enableRefresh !== !1, y = Ve(l.minCount), T = Ve(l.maxCount), g = j(() => ct(l.caseFilter), [l.caseFilter]), C = bo(g), [v, p] = w(1), [k, I] = w(!1), [O, M] = w(""), [$, H] = w([]), [N, A] = w(0), [Y, G] = w(g.pageSize ?? 20), W = x(0), L = ne(o);
904
904
  z(() => {
905
- const h = Nn(q, T);
905
+ const h = En(L, T);
906
906
  h !== null && s(h);
907
- }, [T, q, s]);
908
- const D = $(() => n ? st(g) ? O || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, O, m]), ie = L(
907
+ }, [T, L, s]);
908
+ const D = j(() => n ? ut(g) ? O || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, O, m]), ie = q(
909
909
  async (h) => {
910
- const b = it(JSON.parse(C)), R = ++W.current;
911
- if (!n || !st(b)) {
912
- H([]), A(0), F(""), N(!1);
910
+ const b = ct(JSON.parse(C)), R = ++W.current;
911
+ if (!n || !ut(b)) {
912
+ H([]), A(0), M(""), I(!1);
913
913
  return;
914
914
  }
915
- N(!0), F("");
915
+ I(!0), M("");
916
916
  try {
917
- const M = await n({ filter: b, page: h });
917
+ const F = await n({ filter: b, page: h });
918
918
  if (R !== W.current) return;
919
- H(M.list), A(M.total), p(M.page), G(M.pageSize), a && r(
919
+ H(F.list), A(F.total), p(F.page), G(F.pageSize), a && r(
920
920
  a,
921
- M.list.map((E) => ({
921
+ F.list.map((E) => ({
922
922
  value: E.caseUniqueId,
923
923
  label: E.name || E.caseUniqueId
924
924
  }))
925
925
  );
926
- } catch (M) {
926
+ } catch (F) {
927
927
  if (R !== W.current) return;
928
- H([]), A(0), F(M instanceof Error ? M.message : "加载案例列表失败");
928
+ H([]), A(0), M(F instanceof Error ? F.message : "加载案例列表失败");
929
929
  } finally {
930
- R === W.current && N(!1);
930
+ R === W.current && I(!1);
931
931
  }
932
932
  },
933
933
  [n, C, a, r]
@@ -937,16 +937,16 @@ function So({ context: e }) {
937
937
  }, [C, ie]);
938
938
  const oe = (h) => {
939
939
  if (!t) return;
940
- const b = Mn(
941
- q,
940
+ const b = In(
941
+ L,
942
942
  h,
943
943
  y,
944
944
  T
945
945
  );
946
946
  b !== null && i(b);
947
947
  }, _ = () => {
948
- const h = it(JSON.parse(C)), b = Y || h.pageSize || 20, R = Math.max(1, Math.ceil(I / b)), M = v >= R ? 1 : v + 1;
949
- ie(M);
948
+ const h = ct(JSON.parse(C)), b = Y || h.pageSize || 20, R = Math.max(1, Math.ceil(N / b)), F = v >= R ? 1 : v + 1;
949
+ ie(F);
950
950
  };
951
951
  return /* @__PURE__ */ U(
952
952
  "div",
@@ -954,19 +954,19 @@ function So({ context: e }) {
954
954
  className: "form-block-preview skopon-resume-select",
955
955
  "data-skopon-field": a || void 0,
956
956
  children: [
957
- u ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: u }) : null,
958
- S && j.length === 0 ? /* @__PURE__ */ U("div", { className: "skopon-resume-select-status", children: [
959
- /* @__PURE__ */ c(kt, { size: "small" }),
957
+ c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
958
+ k && $.length === 0 ? /* @__PURE__ */ U("div", { className: "skopon-resume-select-status", children: [
959
+ /* @__PURE__ */ u(xt, { size: "small" }),
960
960
  " 加载案例…"
961
961
  ] }) : null,
962
- !S && j.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: D }) : null,
963
- j.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: j.map((h) => /* @__PURE__ */ c(
964
- bo,
962
+ !k && $.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: D }) : null,
963
+ $.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: $.map((h) => /* @__PURE__ */ u(
964
+ ko,
965
965
  {
966
966
  item: h,
967
- selected: q.includes(h.caseUniqueId),
968
- disabled: Fn(
969
- q,
967
+ selected: L.includes(h.caseUniqueId),
968
+ disabled: Nn(
969
+ L,
970
970
  h.caseUniqueId,
971
971
  t,
972
972
  y,
@@ -976,41 +976,41 @@ function So({ context: e }) {
976
976
  },
977
977
  h.caseUniqueId
978
978
  )) }) : null,
979
- k && n && st(g) ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
980
- Ne,
979
+ S && n && ut(g) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
980
+ Ie,
981
981
  {
982
982
  type: "default",
983
983
  size: "small",
984
- icon: /* @__PURE__ */ c(cn, {}),
985
- loading: S,
984
+ icon: /* @__PURE__ */ u(mn, {}),
985
+ loading: k,
986
986
  disabled: !t,
987
987
  onClick: _,
988
988
  children: "换一批"
989
989
  }
990
990
  ) }) : null,
991
- d ? /* @__PURE__ */ c(re.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
991
+ d ? /* @__PURE__ */ u(re.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
992
992
  ]
993
993
  }
994
994
  );
995
995
  }
996
- const ko = Z(
997
- vo,
998
- So
999
- ), Co = {
996
+ const Ao = Z(
997
+ So,
998
+ Co
999
+ ), _o = {
1000
1000
  type: "case_multiselect",
1001
1001
  componentName: "SkoponCaseSelect",
1002
- toComponent: no,
1003
- fromComponent: ro,
1004
- catalogComponents: [ko]
1002
+ toComponent: oo,
1003
+ fromComponent: io,
1004
+ catalogComponents: [Ao]
1005
1005
  };
1006
- function tn(e) {
1006
+ function rn(e) {
1007
1007
  if (e == null) return;
1008
1008
  const t = typeof e == "number" ? e : Number(e);
1009
1009
  if (!(!Number.isFinite(t) || t < 1))
1010
1010
  return Math.floor(t);
1011
1011
  }
1012
- function Ao(e, t) {
1013
- var s, a, l, u;
1012
+ function To(e, t) {
1013
+ var s, a, l, c;
1014
1014
  const { id: n, label: r, path: o, withData: i } = t;
1015
1015
  return i({
1016
1016
  id: n,
@@ -1023,14 +1023,14 @@ function Ao(e, t) {
1023
1023
  names: ((s = e.resumeFilter) == null ? void 0 : s.names) ?? [],
1024
1024
  agentUniqueIds: ((a = e.resumeFilter) == null ? void 0 : a.agentUniqueIds) ?? [],
1025
1025
  resumeUniqueIds: ((l = e.resumeFilter) == null ? void 0 : l.resumeUniqueIds) ?? [],
1026
- pageSize: ((u = e.resumeFilter) == null ? void 0 : u.pageSize) ?? 20
1026
+ pageSize: ((c = e.resumeFilter) == null ? void 0 : c.pageSize) ?? 20
1027
1027
  },
1028
1028
  ...e.resumeMinCount !== void 0 ? { minCount: e.resumeMinCount } : {},
1029
1029
  ...e.resumeMaxCount !== void 0 ? { maxCount: e.resumeMaxCount } : {},
1030
1030
  value: { path: o }
1031
1031
  });
1032
1032
  }
1033
- function _o(e, t, n) {
1033
+ function xo(e, t, n) {
1034
1034
  const r = n.nameFromValue(e.value), o = {
1035
1035
  ...t("resume_multiselect"),
1036
1036
  name: r,
@@ -1039,42 +1039,42 @@ function _o(e, t, n) {
1039
1039
  i && (o.placeholder = i);
1040
1040
  const s = n.asLiteral(e.help);
1041
1041
  if (s && (o.help = s), e.resumeFilter && typeof e.resumeFilter == "object") {
1042
- const u = e.resumeFilter;
1042
+ const c = e.resumeFilter;
1043
1043
  o.resumeFilter = {
1044
- names: Array.isArray(u.names) ? u.names.map(String) : [],
1045
- agentUniqueIds: Array.isArray(u.agentUniqueIds) ? u.agentUniqueIds.map(String) : [],
1046
- resumeUniqueIds: Array.isArray(u.resumeUniqueIds) ? u.resumeUniqueIds.map(String) : [],
1047
- pageSize: typeof u.pageSize == "number" ? u.pageSize : 20
1044
+ names: Array.isArray(c.names) ? c.names.map(String) : [],
1045
+ agentUniqueIds: Array.isArray(c.agentUniqueIds) ? c.agentUniqueIds.map(String) : [],
1046
+ resumeUniqueIds: Array.isArray(c.resumeUniqueIds) ? c.resumeUniqueIds.map(String) : [],
1047
+ pageSize: typeof c.pageSize == "number" ? c.pageSize : 20
1048
1048
  };
1049
1049
  }
1050
- const a = tn(e.minCount);
1050
+ const a = rn(e.minCount);
1051
1051
  a !== void 0 && (o.resumeMinCount = a);
1052
- const l = tn(e.maxCount);
1052
+ const l = rn(e.maxCount);
1053
1053
  return l !== void 0 && (o.resumeMaxCount = l), o;
1054
1054
  }
1055
- const En = be(null);
1056
- function gt({
1055
+ const wn = be(null);
1056
+ function kt({
1057
1057
  resumeSearch: e,
1058
1058
  children: t
1059
1059
  }) {
1060
- return /* @__PURE__ */ c(En.Provider, { value: e ?? null, children: t });
1060
+ return /* @__PURE__ */ u(wn.Provider, { value: e ?? null, children: t });
1061
1061
  }
1062
- function To() {
1063
- return Se(En);
1062
+ function Fo() {
1063
+ return Se(wn);
1064
1064
  }
1065
- function at(e) {
1065
+ function mt(e) {
1066
1066
  return typeof e == "string" ? e : "";
1067
1067
  }
1068
- function lt(e) {
1068
+ function dt(e) {
1069
1069
  if (!e || typeof e != "object")
1070
1070
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
1071
1071
  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;
1072
1072
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
1073
1073
  }
1074
- function xo(e) {
1074
+ function Mo(e) {
1075
1075
  return JSON.stringify(e);
1076
1076
  }
1077
- const Mo = {
1077
+ const Io = {
1078
1078
  name: "SkoponResumeSelect",
1079
1079
  schema: f.object({
1080
1080
  label: f.any().optional(),
@@ -1086,39 +1086,39 @@ const Mo = {
1086
1086
  maxCount: f.any().optional(),
1087
1087
  value: f.any().optional()
1088
1088
  }).passthrough()
1089
- }, Fo = 3, No = 2;
1090
- function ct(e, t) {
1091
- const n = (t ?? []).filter(Boolean), r = n.slice(0, Fo), o = n.length - r.length;
1089
+ }, No = 3, Eo = 2;
1090
+ function ft(e, t) {
1091
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, No), o = n.length - r.length;
1092
1092
  return /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-tags", children: [
1093
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: e }),
1093
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: e }),
1094
1094
  n.length > 0 ? /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-tags-list", children: [
1095
- r.map((i) => /* @__PURE__ */ c(Ae, { className: "skopon-resume-select-card-tag", children: i }, i)),
1095
+ r.map((i) => /* @__PURE__ */ u(Ae, { className: "skopon-resume-select-card-tag", children: i }, i)),
1096
1096
  o > 0 ? /* @__PURE__ */ U(Ae, { className: "skopon-resume-select-card-tag", children: [
1097
1097
  "+",
1098
1098
  o
1099
1099
  ] }) : null
1100
- ] }) : /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
1100
+ ] }) : /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
1101
1101
  ] });
1102
1102
  }
1103
- function Io(e) {
1103
+ function Uo(e) {
1104
1104
  return /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-field", children: [
1105
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
1106
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
1105
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
1106
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
1107
1107
  ] });
1108
1108
  }
1109
- function Eo({ work: e }) {
1109
+ function wo({ work: e }) {
1110
1110
  return /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-work", children: [
1111
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ c("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ c(fr, { className: "skopon-resume-select-card-work-placeholder" }) }),
1112
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
1111
+ /* @__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(hr, { className: "skopon-resume-select-card-work-placeholder" }) }),
1112
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
1113
1113
  ] });
1114
1114
  }
1115
- function Uo({
1115
+ function Ro({
1116
1116
  item: e,
1117
1117
  selected: t,
1118
1118
  disabled: n,
1119
1119
  onToggle: r
1120
1120
  }) {
1121
- const o = (e.works ?? []).slice(0, No);
1121
+ const o = (e.works ?? []).slice(0, Eo);
1122
1122
  return /* @__PURE__ */ U(
1123
1123
  "button",
1124
1124
  {
@@ -1127,62 +1127,62 @@ function Uo({
1127
1127
  disabled: n,
1128
1128
  onClick: r,
1129
1129
  children: [
1130
- /* @__PURE__ */ c(
1131
- rr,
1130
+ /* @__PURE__ */ u(
1131
+ ir,
1132
1132
  {
1133
1133
  size: 48,
1134
1134
  src: e.avatarUrl || void 0,
1135
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ c(dr, {}),
1135
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(pr, {}),
1136
1136
  className: "skopon-resume-select-card-avatar"
1137
1137
  }
1138
1138
  ),
1139
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
1139
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
1140
1140
  /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-body", children: [
1141
- Io(e.satisfaction),
1142
- ct("性格", e.personality),
1143
- ct("专长", e.specialties),
1144
- ct("擅长领域", e.traits),
1141
+ Uo(e.satisfaction),
1142
+ ft("性格", e.personality),
1143
+ ft("专长", e.specialties),
1144
+ ft("擅长领域", e.traits),
1145
1145
  /* @__PURE__ */ U("div", { className: "skopon-resume-select-card-works", children: [
1146
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
1147
- o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ c(Eo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
1146
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
1147
+ o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(wo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
1148
1148
  ] })
1149
1149
  ] })
1150
1150
  ]
1151
1151
  }
1152
1152
  );
1153
1153
  }
1154
- function wo({ context: e }) {
1155
- const { interactive: t } = ue(), n = To(), { publishLiveOptions: r } = _t(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = me(e, "value", {
1154
+ function Po({ context: e }) {
1155
+ const { interactive: t } = ue(), n = Fo(), { publishLiveOptions: r } = It(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = me(e, "value", {
1156
1156
  component: "SkoponResumeSelect",
1157
1157
  changeAction: "click"
1158
- }), l = e.componentModel.properties, u = at(l.label), m = at(l.placeholder), d = at(l.help), k = l.enableRefresh !== !1, y = Le(l.minCount), T = Le(l.maxCount), g = $(() => lt(l.resumeFilter), [l.resumeFilter]), C = xo(g), [v, p] = w(1), [S, N] = w(!1), [O, F] = w(""), [j, H] = w([]), [I, A] = w(0), [Y, G] = w(g.pageSize ?? 20), W = x(0), q = ne(o);
1158
+ }), l = e.componentModel.properties, c = mt(l.label), m = mt(l.placeholder), d = mt(l.help), S = l.enableRefresh !== !1, y = Ve(l.minCount), T = Ve(l.maxCount), g = j(() => dt(l.resumeFilter), [l.resumeFilter]), C = Mo(g), [v, p] = w(1), [k, I] = w(!1), [O, M] = w(""), [$, H] = w([]), [N, A] = w(0), [Y, G] = w(g.pageSize ?? 20), W = x(0), L = ne(o);
1159
1159
  z(() => {
1160
- const h = Nn(q, T);
1160
+ const h = En(L, T);
1161
1161
  h !== null && s(h);
1162
- }, [T, q, s]);
1163
- const D = L(
1162
+ }, [T, L, s]);
1163
+ const D = q(
1164
1164
  async (h) => {
1165
- const b = lt(JSON.parse(C)), R = ++W.current;
1165
+ const b = dt(JSON.parse(C)), R = ++W.current;
1166
1166
  if (!n) {
1167
- H([]), A(0), F("未配置简历搜索服务"), N(!1);
1167
+ H([]), A(0), M("未配置简历搜索服务"), I(!1);
1168
1168
  return;
1169
1169
  }
1170
- N(!0), F("");
1170
+ I(!0), M("");
1171
1171
  try {
1172
- const M = await n({ filter: b, page: h });
1172
+ const F = await n({ filter: b, page: h });
1173
1173
  if (R !== W.current) return;
1174
- H(M.list), A(M.total), p(M.page), G(M.pageSize), a && r(
1174
+ H(F.list), A(F.total), p(F.page), G(F.pageSize), a && r(
1175
1175
  a,
1176
- M.list.map((E) => ({
1176
+ F.list.map((E) => ({
1177
1177
  value: E.resumeUniqueId,
1178
1178
  label: E.name || E.resumeUniqueId
1179
1179
  }))
1180
1180
  );
1181
- } catch (M) {
1181
+ } catch (F) {
1182
1182
  if (R !== W.current) return;
1183
- H([]), A(0), F(M instanceof Error ? M.message : "加载简历列表失败");
1183
+ H([]), A(0), M(F instanceof Error ? F.message : "加载简历列表失败");
1184
1184
  } finally {
1185
- R === W.current && N(!1);
1185
+ R === W.current && I(!1);
1186
1186
  }
1187
1187
  },
1188
1188
  [n, C, a, r]
@@ -1192,16 +1192,16 @@ function wo({ context: e }) {
1192
1192
  }, [C, D]);
1193
1193
  const ie = (h) => {
1194
1194
  if (!t) return;
1195
- const b = Mn(
1196
- q,
1195
+ const b = In(
1196
+ L,
1197
1197
  h,
1198
1198
  y,
1199
1199
  T
1200
1200
  );
1201
1201
  b !== null && i(b);
1202
1202
  }, oe = () => {
1203
- const h = lt(JSON.parse(C)), b = Y || h.pageSize || 20, R = Math.max(1, Math.ceil(I / b)), M = v >= R ? 1 : v + 1;
1204
- D(M);
1203
+ const h = dt(JSON.parse(C)), b = Y || h.pageSize || 20, R = Math.max(1, Math.ceil(N / b)), F = v >= R ? 1 : v + 1;
1204
+ D(F);
1205
1205
  }, _ = m || "暂无匹配的简历";
1206
1206
  return /* @__PURE__ */ U(
1207
1207
  "div",
@@ -1209,20 +1209,20 @@ function wo({ context: e }) {
1209
1209
  className: "form-block-preview skopon-resume-select",
1210
1210
  "data-skopon-field": a || void 0,
1211
1211
  children: [
1212
- u ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: u }) : null,
1213
- S && j.length === 0 ? /* @__PURE__ */ U("div", { className: "skopon-resume-select-status", children: [
1214
- /* @__PURE__ */ c(kt, { size: "small" }),
1212
+ c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
1213
+ k && $.length === 0 ? /* @__PURE__ */ U("div", { className: "skopon-resume-select-status", children: [
1214
+ /* @__PURE__ */ u(xt, { size: "small" }),
1215
1215
  " 加载简历…"
1216
1216
  ] }) : null,
1217
- !S && O ? /* @__PURE__ */ c(re.Text, { type: "danger", className: "skopon-resume-select-status", children: O }) : null,
1218
- !S && !O && j.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: _ }) : null,
1219
- j.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: j.map((h) => /* @__PURE__ */ c(
1220
- Uo,
1217
+ !k && O ? /* @__PURE__ */ u(re.Text, { type: "danger", className: "skopon-resume-select-status", children: O }) : null,
1218
+ !k && !O && $.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: _ }) : null,
1219
+ $.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: $.map((h) => /* @__PURE__ */ u(
1220
+ Ro,
1221
1221
  {
1222
1222
  item: h,
1223
- selected: q.includes(h.resumeUniqueId),
1224
- disabled: Fn(
1225
- q,
1223
+ selected: L.includes(h.resumeUniqueId),
1224
+ disabled: Nn(
1225
+ L,
1226
1226
  h.resumeUniqueId,
1227
1227
  t,
1228
1228
  y,
@@ -1232,64 +1232,64 @@ function wo({ context: e }) {
1232
1232
  },
1233
1233
  h.resumeUniqueId
1234
1234
  )) }) : null,
1235
- k && n ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
1236
- Ne,
1235
+ S && n ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1236
+ Ie,
1237
1237
  {
1238
1238
  type: "default",
1239
1239
  size: "small",
1240
- icon: /* @__PURE__ */ c(cn, {}),
1241
- loading: S,
1240
+ icon: /* @__PURE__ */ u(mn, {}),
1241
+ loading: k,
1242
1242
  disabled: !t,
1243
1243
  onClick: oe,
1244
1244
  children: "换一批"
1245
1245
  }
1246
1246
  ) }) : null,
1247
- d ? /* @__PURE__ */ c(re.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1247
+ d ? /* @__PURE__ */ u(re.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1248
1248
  ]
1249
1249
  }
1250
1250
  );
1251
1251
  }
1252
- const Ro = Z(
1253
- Mo,
1254
- wo
1255
- ), Po = {
1252
+ const zo = Z(
1253
+ Io,
1254
+ Po
1255
+ ), Oo = {
1256
1256
  type: "resume_multiselect",
1257
1257
  componentName: "SkoponResumeSelect",
1258
- toComponent: Ao,
1259
- fromComponent: _o,
1260
- catalogComponents: [Ro]
1258
+ toComponent: To,
1259
+ fromComponent: xo,
1260
+ catalogComponents: [zo]
1261
1261
  };
1262
- function zo(e, t) {
1262
+ function Bo(e, t) {
1263
1263
  var n;
1264
1264
  return {
1265
1265
  node: {
1266
1266
  id: t.id,
1267
1267
  component: "SkoponWeb",
1268
1268
  url: ((n = e.webUrl) == null ? void 0 : n.trim()) ?? "",
1269
- height: Ie(e.webHeight),
1269
+ height: Ne(e.webHeight),
1270
1270
  label: t.label,
1271
1271
  help: e.help ?? ""
1272
1272
  }
1273
1273
  };
1274
1274
  }
1275
- function Oo(e, t, n) {
1275
+ function Lo(e, t, n) {
1276
1276
  var o, i;
1277
1277
  const r = (o = n.asLiteral(e.help)) == null ? void 0 : o.trim();
1278
1278
  return {
1279
1279
  ...t("web"),
1280
1280
  webUrl: ((i = n.asLiteral(e.url)) == null ? void 0 : i.trim()) ?? "",
1281
- webHeight: Ie(e.height),
1281
+ webHeight: Ne(e.height),
1282
1282
  ...r ? { help: r } : {}
1283
1283
  };
1284
1284
  }
1285
- function nn({
1285
+ function on({
1286
1286
  url: e,
1287
1287
  title: t,
1288
1288
  className: n,
1289
1289
  height: r,
1290
1290
  frameRef: o
1291
1291
  }) {
1292
- return /* @__PURE__ */ c(
1292
+ return /* @__PURE__ */ u(
1293
1293
  "iframe",
1294
1294
  {
1295
1295
  ref: o,
@@ -1303,38 +1303,38 @@ function nn({
1303
1303
  }
1304
1304
  );
1305
1305
  }
1306
- function Bo({
1306
+ function qo({
1307
1307
  url: e = "",
1308
1308
  height: t,
1309
1309
  label: n,
1310
1310
  help: r
1311
1311
  }) {
1312
- const [o, i] = w(!1), [s, a] = w(!0), l = x(null), u = e.trim(), m = Ar(u) ? u : null, d = Ie(t), k = (n == null ? void 0 : n.trim()) || "网页展示", y = r == null ? void 0 : r.trim(), T = u ? "网页 URL 无效" : "未设置网页 URL";
1312
+ const [o, i] = w(!1), [s, a] = w(!0), l = x(null), c = e.trim(), m = Tr(c) ? c : null, d = Ne(t), S = (n == null ? void 0 : n.trim()) || "网页展示", y = r == null ? void 0 : r.trim(), T = c ? "网页 URL 无效" : "未设置网页 URL";
1313
1313
  return /* @__PURE__ */ U("div", { className: "form-block-preview skopon-web-preview", children: [
1314
- n != null && n.trim() ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: n.trim() }) : null,
1314
+ n != null && n.trim() ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: n.trim() }) : null,
1315
1315
  /* @__PURE__ */ U(
1316
1316
  "div",
1317
1317
  {
1318
1318
  className: `skopon-web-frame-shell${m ? "" : " skopon-web-frame-shell--empty"}`,
1319
1319
  style: { height: d },
1320
1320
  children: [
1321
- m && s ? /* @__PURE__ */ c(
1322
- nn,
1321
+ m && s ? /* @__PURE__ */ u(
1322
+ on,
1323
1323
  {
1324
1324
  url: m,
1325
- title: k,
1325
+ title: S,
1326
1326
  className: "skopon-web-frame skopon-web-frame--inline",
1327
1327
  height: d
1328
1328
  }
1329
1329
  ) : null,
1330
- m ? null : /* @__PURE__ */ c("div", { className: "skopon-web-empty", role: "status", children: T }),
1331
- m ? /* @__PURE__ */ c(ve, { title: "扩展显示", children: /* @__PURE__ */ c(
1332
- Ne,
1330
+ m ? null : /* @__PURE__ */ u("div", { className: "skopon-web-empty", role: "status", children: T }),
1331
+ m ? /* @__PURE__ */ u(ve, { title: "扩展显示", children: /* @__PURE__ */ u(
1332
+ Ie,
1333
1333
  {
1334
1334
  type: "default",
1335
1335
  shape: "circle",
1336
1336
  className: "skopon-web-expand-button",
1337
- icon: /* @__PURE__ */ c(pr, {}),
1337
+ icon: /* @__PURE__ */ u(gr, {}),
1338
1338
  "aria-label": "扩展显示",
1339
1339
  onClick: () => {
1340
1340
  a(!1), i(!0);
@@ -1344,12 +1344,12 @@ function Bo({
1344
1344
  ]
1345
1345
  }
1346
1346
  ),
1347
- y ? /* @__PURE__ */ c(re.Text, { type: "secondary", className: "form-block-preview-help", children: y }) : null,
1348
- /* @__PURE__ */ c(
1349
- or,
1347
+ y ? /* @__PURE__ */ u(re.Text, { type: "secondary", className: "form-block-preview-help", children: y }) : null,
1348
+ /* @__PURE__ */ u(
1349
+ sr,
1350
1350
  {
1351
1351
  open: o,
1352
- title: k,
1352
+ title: S,
1353
1353
  footer: null,
1354
1354
  width: "min(1200px, calc(100vw - 32px))",
1355
1355
  className: "skopon-web-modal",
@@ -1359,11 +1359,11 @@ function Bo({
1359
1359
  var g;
1360
1360
  (g = l.current) == null || g.removeAttribute("src"), i(!1), a(!0);
1361
1361
  },
1362
- children: m && !s ? /* @__PURE__ */ c(
1363
- nn,
1362
+ children: m && !s ? /* @__PURE__ */ u(
1363
+ on,
1364
1364
  {
1365
1365
  url: m,
1366
- title: `${k}(扩展显示)`,
1366
+ title: `${S}(扩展显示)`,
1367
1367
  className: "skopon-web-frame skopon-web-frame--modal",
1368
1368
  frameRef: l
1369
1369
  }
@@ -1372,7 +1372,7 @@ function Bo({
1372
1372
  )
1373
1373
  ] });
1374
1374
  }
1375
- const qo = {
1375
+ const Vo = {
1376
1376
  name: "SkoponWeb",
1377
1377
  schema: f.object({
1378
1378
  url: f.any().optional(),
@@ -1380,78 +1380,78 @@ const qo = {
1380
1380
  label: f.any().optional(),
1381
1381
  help: f.any().optional()
1382
1382
  }).passthrough()
1383
- }, Lo = Z(
1384
- qo,
1383
+ }, $o = Z(
1384
+ Vo,
1385
1385
  ({ context: e }) => {
1386
1386
  const t = e.componentModel.properties;
1387
- return /* @__PURE__ */ c(
1388
- Bo,
1387
+ return /* @__PURE__ */ u(
1388
+ qo,
1389
1389
  {
1390
1390
  url: typeof t.url == "string" ? t.url : "",
1391
- height: Ie(t.height),
1391
+ height: Ne(t.height),
1392
1392
  label: typeof t.label == "string" ? t.label : "",
1393
1393
  help: typeof t.help == "string" ? t.help : ""
1394
1394
  }
1395
1395
  );
1396
1396
  }
1397
- ), Vo = {
1397
+ ), jo = {
1398
1398
  type: "web",
1399
1399
  componentName: "SkoponWeb",
1400
- toComponent: zo,
1401
- fromComponent: Oo,
1402
- catalogComponents: [Lo]
1403
- }, De = [
1404
- Po,
1405
- Co,
1406
- Vo
1407
- ], jo = new Map(
1408
- De.map((e) => [e.type, e])
1409
- ), $o = new Map(
1410
- De.map((e) => [e.componentName, e])
1400
+ toComponent: Bo,
1401
+ fromComponent: Lo,
1402
+ catalogComponents: [$o]
1403
+ }, He = [
1404
+ Oo,
1405
+ _o,
1406
+ jo
1407
+ ], Do = new Map(
1408
+ He.map((e) => [e.type, e])
1409
+ ), Ho = new Map(
1410
+ He.map((e) => [e.componentName, e])
1411
1411
  );
1412
- function Do(e) {
1413
- return jo.get(e);
1412
+ function Ko(e) {
1413
+ return Do.get(e);
1414
1414
  }
1415
- function Ho(e) {
1416
- return $o.get(e);
1415
+ function Wo(e) {
1416
+ return Ho.get(e);
1417
1417
  }
1418
- function Ko() {
1419
- return De.flatMap((e) => e.catalogComponents);
1418
+ function Go() {
1419
+ return He.flatMap((e) => e.catalogComponents);
1420
1420
  }
1421
- function Wo() {
1422
- return De.map((e) => e.componentName);
1421
+ function Jo() {
1422
+ return He.map((e) => e.componentName);
1423
1423
  }
1424
- const Ve = "root", yt = "__title__", vt = "__desc__", Tt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1425
- function Go(e) {
1424
+ const $e = "root", Ct = "__title__", At = "__desc__", Nt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1425
+ function Yo(e) {
1426
1426
  return `/${e}`;
1427
1427
  }
1428
- function rn(e) {
1428
+ function sn(e) {
1429
1429
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
1430
1430
  }
1431
1431
  function K(e) {
1432
1432
  if (typeof e == "string") return e;
1433
1433
  }
1434
- function Jo(e) {
1434
+ function Qo(e) {
1435
1435
  const t = e.id || de("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1436
1436
  return {
1437
1437
  id: t,
1438
1438
  component: "SkoponMedia",
1439
1439
  mediaType: n,
1440
- urls: jr(e),
1440
+ urls: Dr(e),
1441
1441
  mediaSize: Ue(e.mediaSize),
1442
1442
  label: e.label ?? "",
1443
1443
  help: e.help ?? "",
1444
1444
  placeholder: e.placeholder ?? ""
1445
1445
  };
1446
1446
  }
1447
- function Yo(e) {
1447
+ function Xo(e) {
1448
1448
  if (Array.isArray(e.urls))
1449
1449
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
1450
1450
  const t = K(e.url);
1451
1451
  return t != null && t.trim() ? [t.trim()] : [];
1452
1452
  }
1453
1453
  function ze(e, t, n) {
1454
- const r = typeof e.id == "string" ? e.id : de("block-"), o = Yo(e), i = K(e.label) ?? K(e.description) ?? n, s = K(e.help), a = K(e.placeholder), l = Ue(e.mediaSize);
1454
+ const r = typeof e.id == "string" ? e.id : de("block-"), o = Xo(e), i = K(e.label) ?? K(e.description) ?? n, s = K(e.help), a = K(e.placeholder), l = Ue(e.mediaSize);
1455
1455
  return {
1456
1456
  id: r,
1457
1457
  type: t,
@@ -1462,7 +1462,7 @@ function ze(e, t, n) {
1462
1462
  mediaUrls: o.length > 0 ? o : [""]
1463
1463
  };
1464
1464
  }
1465
- function on(e) {
1465
+ function an(e) {
1466
1466
  switch (e.type) {
1467
1467
  case "toggle":
1468
1468
  return we(e.defaultValue);
@@ -1480,9 +1480,9 @@ function on(e) {
1480
1480
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
1481
1481
  }
1482
1482
  }
1483
- function Qo(e) {
1484
- var u;
1485
- const t = e.id || de("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? Go(r) : void 0, i = ce(e.options), s = (m) => r ? { node: m, dataKey: r, dataValue: on(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = Do(e.type);
1483
+ function Zo(e) {
1484
+ var c;
1485
+ const t = e.id || de("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? Yo(r) : void 0, i = ce(e.options), s = (m) => r ? { node: m, dataKey: r, dataValue: an(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = Ko(e.type);
1486
1486
  if (l)
1487
1487
  return l.toComponent(e, a);
1488
1488
  switch (e.type) {
@@ -1491,7 +1491,7 @@ function Qo(e) {
1491
1491
  case "paragraph":
1492
1492
  return { node: { id: t, component: "Text", text: n, variant: "body" } };
1493
1493
  case "text":
1494
- return e.hidden ? r ? { node: null, dataKey: r, dataValue: on(e) } : { node: null } : s({
1494
+ return e.hidden ? r ? { node: null, dataKey: r, dataValue: an(e) } : { node: null } : s({
1495
1495
  id: t,
1496
1496
  component: "TextField",
1497
1497
  label: n,
@@ -1515,7 +1515,7 @@ function Qo(e) {
1515
1515
  component: "TextField",
1516
1516
  label: n,
1517
1517
  variant: "shortText",
1518
- validationRegexp: Tt,
1518
+ validationRegexp: Nt,
1519
1519
  ...e.placeholder ? { placeholder: e.placeholder } : {},
1520
1520
  value: { path: o }
1521
1521
  });
@@ -1601,7 +1601,7 @@ function Qo(e) {
1601
1601
  case "image":
1602
1602
  case "video":
1603
1603
  case "audio":
1604
- return { node: Jo(e) };
1604
+ return { node: Qo(e) };
1605
1605
  case "file":
1606
1606
  return s({
1607
1607
  id: t,
@@ -1618,38 +1618,38 @@ function Qo(e) {
1618
1618
  return { node: null };
1619
1619
  }
1620
1620
  }
1621
- function bt(e) {
1621
+ function _t(e) {
1622
1622
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
1623
- const t = e.components.find((r) => r.id === Ve);
1623
+ const t = e.components.find((r) => r.id === $e);
1624
1624
  if (!t) return e.components.length === 0;
1625
1625
  const n = t.children;
1626
1626
  return !Array.isArray(n) || n.length === 0;
1627
1627
  }
1628
- function Un(e, t) {
1628
+ function Rn(e, t) {
1629
1629
  const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
1630
- i && s && (n.push({ id: yt, component: "Text", text: s, variant: "h2" }), r.push(yt)), i && a && (n.push({ id: vt, component: "Text", text: a, variant: "body" }), r.push(vt));
1630
+ i && s && (n.push({ id: Ct, component: "Text", text: s, variant: "h2" }), r.push(Ct)), i && a && (n.push({ id: At, component: "Text", text: a, variant: "body" }), r.push(At));
1631
1631
  for (const m of e.blocks ?? []) {
1632
1632
  if (!fe(m)) continue;
1633
- const { node: d, dataKey: k, dataValue: y } = Qo(m);
1634
- k && (o[k] = y), d && (n.push(d), r.push(d.id));
1633
+ const { node: d, dataKey: S, dataValue: y } = Zo(m);
1634
+ S && (o[S] = y), d && (n.push(d), r.push(d.id));
1635
1635
  }
1636
- n.unshift({ id: Ve, component: "Column", children: r });
1637
- const l = { root: Ve, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
1638
- return u !== void 0 && (l.surfaceProperties = { styleId: u ?? null }), l;
1636
+ n.unshift({ id: $e, component: "Column", children: r });
1637
+ const l = { root: $e, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
1638
+ return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
1639
1639
  }
1640
- function Xo(e) {
1640
+ function ei(e) {
1641
1641
  const t = /* @__PURE__ */ new Map();
1642
1642
  for (const n of e.components ?? [])
1643
1643
  n && typeof n.id == "string" && t.set(n.id, n);
1644
1644
  return t;
1645
1645
  }
1646
- function ut(e) {
1646
+ function pt(e) {
1647
1647
  return ce(e.options);
1648
1648
  }
1649
- function Zo(e) {
1650
- const t = typeof e.id == "string" ? e.id : de("block-"), n = String(e.component ?? ""), r = K(e.label) ?? K(e.text) ?? "", o = rn(e.value), i = (a) => ({ id: t, type: a, label: r }), s = Ho(n);
1649
+ function ti(e) {
1650
+ const t = typeof e.id == "string" ? e.id : de("block-"), n = String(e.component ?? ""), r = K(e.label) ?? K(e.text) ?? "", o = sn(e.value), i = (a) => ({ id: t, type: a, label: r }), s = Wo(n);
1651
1651
  if (s)
1652
- return s.fromComponent(e, i, { asLiteral: K, nameFromValue: rn });
1652
+ return s.fromComponent(e, i, { asLiteral: K, nameFromValue: sn });
1653
1653
  switch (n) {
1654
1654
  case "Text": {
1655
1655
  const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
@@ -1658,19 +1658,19 @@ function Zo(e) {
1658
1658
  case "TextField": {
1659
1659
  const a = String(e.variant ?? "shortText");
1660
1660
  let l = "text";
1661
- a === "longText" ? l = "textarea" : a === "number" ? l = "number" : K(e.validationRegexp) === Tt && (l = "email");
1662
- const u = { ...i(l), name: o }, m = K(e.placeholder);
1663
- return m && (u.placeholder = m), u;
1661
+ a === "longText" ? l = "textarea" : a === "number" ? l = "number" : K(e.validationRegexp) === Nt && (l = "email");
1662
+ const c = { ...i(l), name: o }, m = K(e.placeholder);
1663
+ return m && (c.placeholder = m), c;
1664
1664
  }
1665
1665
  case "CheckBox":
1666
1666
  return { ...i("toggle"), name: o };
1667
1667
  case "SkoponSelect": {
1668
- const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", u = {
1668
+ const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
1669
1669
  ...i(l),
1670
1670
  name: o,
1671
- options: ut(e)
1671
+ options: pt(e)
1672
1672
  }, m = K(e.placeholder);
1673
- return m && (u.placeholder = m), u;
1673
+ return m && (c.placeholder = m), c;
1674
1674
  }
1675
1675
  case "ChoicePicker": {
1676
1676
  const a = K(e.skoponPickerType);
@@ -1678,12 +1678,12 @@ function Zo(e) {
1678
1678
  const m = {
1679
1679
  ...i(a),
1680
1680
  name: o,
1681
- options: ut(e)
1681
+ options: pt(e)
1682
1682
  }, d = K(e.placeholder);
1683
1683
  return d && (m.placeholder = d), m;
1684
1684
  }
1685
- const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1686
- return { ...i(u), name: o, options: ut(e) };
1685
+ const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1686
+ return { ...i(c), name: o, options: pt(e) };
1687
1687
  }
1688
1688
  case "DateTimeInput": {
1689
1689
  const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = K(e.placeholder);
@@ -1701,13 +1701,13 @@ function Zo(e) {
1701
1701
  return ze(e, "audio", r);
1702
1702
  case "FileUpload": {
1703
1703
  const a = K(e.accept) ?? "", l = { ...i("file"), name: o };
1704
- return a && (l.fileAcceptExtensions = a.split(",").map((u) => u.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;
1704
+ 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;
1705
1705
  }
1706
1706
  default:
1707
1707
  return null;
1708
1708
  }
1709
1709
  }
1710
- function wn(e, t, n, r) {
1710
+ function Pn(e, t, n, r) {
1711
1711
  if (n.has(e)) return;
1712
1712
  n.add(e);
1713
1713
  const o = t.get(e);
@@ -1715,12 +1715,12 @@ function wn(e, t, n, r) {
1715
1715
  const i = String(o.component ?? "");
1716
1716
  if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
1717
1717
  for (const s of o.children)
1718
- typeof s == "string" && wn(s, t, n, r);
1718
+ typeof s == "string" && Pn(s, t, n, r);
1719
1719
  return;
1720
1720
  }
1721
1721
  r.push(o);
1722
1722
  }
1723
- function ei(e, t) {
1723
+ function ni(e, t) {
1724
1724
  return t ? e.map((n) => {
1725
1725
  var i;
1726
1726
  const r = (i = n.name) == null ? void 0 : i.trim();
@@ -1729,32 +1729,32 @@ function ei(e, t) {
1729
1729
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: we(o) } : { ...n, defaultValue: o };
1730
1730
  }) : e;
1731
1731
  }
1732
- function ti(e) {
1732
+ function ri(e) {
1733
1733
  if (!e || !Array.isArray(e.components))
1734
1734
  return xe({ title: "", description: "", blocks: [] });
1735
- const t = Xo(e), n = [];
1736
- wn(e.root ?? Ve, t, /* @__PURE__ */ new Set(), n);
1735
+ const t = ei(e), n = [];
1736
+ Pn(e.root ?? $e, t, /* @__PURE__ */ new Set(), n);
1737
1737
  let r = "", o = "";
1738
1738
  const i = [];
1739
1739
  for (const s of n) {
1740
- if (s.id === yt) {
1740
+ if (s.id === Ct) {
1741
1741
  r = K(s.text) ?? r;
1742
1742
  continue;
1743
1743
  }
1744
- if (s.id === vt) {
1744
+ if (s.id === At) {
1745
1745
  o = K(s.text) ?? o;
1746
1746
  continue;
1747
1747
  }
1748
- const a = Zo(s);
1748
+ const a = ti(s);
1749
1749
  a && i.push(a);
1750
1750
  }
1751
1751
  return xe({
1752
1752
  title: r,
1753
1753
  description: o,
1754
- blocks: ei(i, e.dataModel)
1754
+ blocks: ni(i, e.dataModel)
1755
1755
  });
1756
1756
  }
1757
- function ni(e, t) {
1757
+ function oi(e, t) {
1758
1758
  const { surfaceId: n, catalogId: r } = t, o = [
1759
1759
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1760
1760
  {
@@ -1767,25 +1767,25 @@ function ni(e, t) {
1767
1767
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1768
1768
  }), o;
1769
1769
  }
1770
- function Rn(e) {
1770
+ function zn(e) {
1771
1771
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1772
1772
  }
1773
- function ri(e, t) {
1773
+ function ii(e, t) {
1774
1774
  if (!e || typeof e != "object") return null;
1775
- const n = e, r = Rn(n.a2ui) ? n.a2ui : void 0;
1776
- if (r && !bt(r)) return r;
1775
+ const n = e, r = zn(n.a2ui) ? n.a2ui : void 0;
1776
+ if (r && !_t(r)) return r;
1777
1777
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1778
1778
  if (o.length === 0) return null;
1779
- const i = $e({
1779
+ const i = De({
1780
1780
  title: typeof n.title == "string" ? n.title : "",
1781
1781
  description: typeof n.description == "string" ? n.description : "",
1782
1782
  blocks: o,
1783
- jsonSchema: Sn(n.jsonSchema ?? n.json_schema)
1784
- }), s = Un(i, t);
1785
- return bt(s) ? null : s;
1783
+ jsonSchema: Cn(n.jsonSchema ?? n.json_schema)
1784
+ }), s = Rn(i, t);
1785
+ return _t(s) ? null : s;
1786
1786
  }
1787
- function oi(e, t, n) {
1788
- return Un(
1787
+ function si(e, t, n) {
1788
+ return Rn(
1789
1789
  {
1790
1790
  title: e.title,
1791
1791
  description: e.description,
@@ -1794,18 +1794,18 @@ function oi(e, t, n) {
1794
1794
  n
1795
1795
  );
1796
1796
  }
1797
- function ii(e) {
1797
+ function ai(e) {
1798
1798
  if (!e || typeof e != "object" || Array.isArray(e))
1799
1799
  return;
1800
1800
  const t = e;
1801
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Rn(t.a2ui) ? ti(t.a2ui) : $e({
1801
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && zn(t.a2ui) ? ri(t.a2ui) : De({
1802
1802
  title: typeof t.title == "string" ? t.title : "",
1803
1803
  description: typeof t.description == "string" ? t.description : "",
1804
1804
  blocks: Array.isArray(t.blocks) ? t.blocks : [],
1805
- jsonSchema: Sn(t.jsonSchema ?? t.json_schema)
1805
+ jsonSchema: Cn(t.jsonSchema ?? t.json_schema)
1806
1806
  });
1807
1807
  }
1808
- function si(e, t, n) {
1808
+ function li(e, t, n) {
1809
1809
  const r = e.model.surfacesMap.get(t);
1810
1810
  if (!r) return {};
1811
1811
  const o = {};
@@ -1815,18 +1815,18 @@ function si(e, t, n) {
1815
1815
  }
1816
1816
  return o;
1817
1817
  }
1818
- const ai = /* @__PURE__ */ new Set(["type", "name", "id"]);
1819
- function xt(e) {
1818
+ const ci = /* @__PURE__ */ new Set(["type", "name", "id"]);
1819
+ function Et(e) {
1820
1820
  return e.type === "text" && e.hidden === !0;
1821
1821
  }
1822
- function Mt(e) {
1823
- return $e({
1822
+ function Ut(e) {
1823
+ return De({
1824
1824
  title: "",
1825
1825
  description: "",
1826
1826
  blocks: [e]
1827
1827
  }).blocks[0];
1828
1828
  }
1829
- function li(e, t) {
1829
+ function ui(e, t) {
1830
1830
  var o, i;
1831
1831
  const n = /* @__PURE__ */ new Map();
1832
1832
  for (const s of t) {
@@ -1835,19 +1835,19 @@ function li(e, t) {
1835
1835
  }
1836
1836
  const r = [];
1837
1837
  for (const s of e.blocks) {
1838
- if (yn(s.type)) {
1839
- r.push(Mt(s));
1838
+ if (bn(s.type)) {
1839
+ r.push(Ut(s));
1840
1840
  continue;
1841
1841
  }
1842
1842
  if (!ee(s.type)) continue;
1843
1843
  const a = (i = s.name) == null ? void 0 : i.trim();
1844
1844
  if (!a) continue;
1845
1845
  const l = n.get(a);
1846
- l && (xt(l) || fe(l) && r.push(l));
1846
+ l && (Et(l) || fe(l) && r.push(l));
1847
1847
  }
1848
1848
  return r;
1849
1849
  }
1850
- function ci(e, t, n) {
1850
+ function mi(e, t, n) {
1851
1851
  const r = e.rawBlocks;
1852
1852
  if (!(r != null && r.length)) return n;
1853
1853
  for (const o of r) {
@@ -1856,23 +1856,23 @@ function ci(e, t, n) {
1856
1856
  }
1857
1857
  return n;
1858
1858
  }
1859
- function ui(e, t) {
1859
+ function di(e, t) {
1860
1860
  var r;
1861
1861
  const n = { ...e };
1862
1862
  for (const o of Object.keys(t)) {
1863
- if (ai.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1863
+ if (ci.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1864
1864
  const i = t[o];
1865
1865
  i !== void 0 && Object.assign(n, { [o]: i });
1866
1866
  }
1867
- return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, Mt(n);
1867
+ return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, Ut(n);
1868
1868
  }
1869
- function He(e) {
1869
+ function Ke(e) {
1870
1870
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1871
1871
  const t = e;
1872
1872
  if (!Array.isArray(t.blocks)) return null;
1873
1873
  const n = t.blocks.filter(
1874
1874
  (o) => !!o && typeof o == "object" && !Array.isArray(o)
1875
- ), r = $e({
1875
+ ), r = De({
1876
1876
  title: typeof t.title == "string" ? t.title : "",
1877
1877
  description: typeof t.description == "string" ? t.description : "",
1878
1878
  blocks: n
@@ -1884,32 +1884,32 @@ function He(e) {
1884
1884
  rawBlocks: n
1885
1885
  };
1886
1886
  }
1887
- function mi(e, t) {
1888
- var i, s, a, l, u, m;
1887
+ function fi(e, t) {
1888
+ var i, s, a, l, c, m;
1889
1889
  const n = /* @__PURE__ */ new Map();
1890
1890
  for (const d of (t == null ? void 0 : t.blocks) ?? [])
1891
1891
  ee(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
1892
1892
  const r = [], o = [];
1893
1893
  for (const d of e.blocks) {
1894
1894
  if (!ee(d.type)) continue;
1895
- const k = (s = d.name) == null ? void 0 : s.trim();
1896
- if (!k) continue;
1897
- const y = n.get(k);
1895
+ const S = (s = d.name) == null ? void 0 : s.trim();
1896
+ if (!S) continue;
1897
+ const y = n.get(S);
1898
1898
  if (y) {
1899
- const T = ci(e, k, d);
1900
- r.push(ui(y, T));
1899
+ const T = mi(e, S, d);
1900
+ r.push(di(y, T));
1901
1901
  } else
1902
- o.push(Mt(d));
1902
+ o.push(Ut(d));
1903
1903
  }
1904
1904
  return {
1905
1905
  matchedBlocks: r,
1906
1906
  extraBlocks: o,
1907
- renderBlocks: li(e, r),
1907
+ renderBlocks: ui(e, r),
1908
1908
  title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
1909
- description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1909
+ description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1910
1910
  };
1911
1911
  }
1912
- function Pn(e) {
1912
+ function On(e) {
1913
1913
  const { type: t, defaultValue: n } = e;
1914
1914
  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 : "";
1915
1915
  }
@@ -1919,11 +1919,11 @@ function je(e) {
1919
1919
  for (const r of e) {
1920
1920
  if (!ee(r.type) || !fe(r)) continue;
1921
1921
  const o = (n = r.name) == null ? void 0 : n.trim();
1922
- o && (t[o] = Pn(r));
1922
+ o && (t[o] = On(r));
1923
1923
  }
1924
1924
  return t;
1925
1925
  }
1926
- function di(e) {
1926
+ function pi(e) {
1927
1927
  return e.blocks.some(
1928
1928
  (t) => {
1929
1929
  var n;
@@ -1931,13 +1931,13 @@ function di(e) {
1931
1931
  }
1932
1932
  );
1933
1933
  }
1934
- function fi(e) {
1934
+ function hi(e) {
1935
1935
  return e.blocks.filter((t) => {
1936
1936
  var n;
1937
- return yn(t.type) ? !0 : !ee(t.type) || !((n = t.name) != null && n.trim()) || !fe(t) ? !1 : !xt(t);
1937
+ return bn(t.type) ? !0 : !ee(t.type) || !((n = t.name) != null && n.trim()) || !fe(t) ? !1 : !Et(t);
1938
1938
  });
1939
1939
  }
1940
- function Ys(e) {
1940
+ function ea(e) {
1941
1941
  return e.blocks.filter(
1942
1942
  (t) => {
1943
1943
  var n;
@@ -1945,59 +1945,59 @@ function Ys(e) {
1945
1945
  }
1946
1946
  ).map((t) => t.name.trim());
1947
1947
  }
1948
- function pi(e) {
1948
+ function gi(e) {
1949
1949
  var n;
1950
1950
  const t = {};
1951
1951
  for (const r of e.blocks) {
1952
- if (!xt(r)) continue;
1952
+ if (!Et(r)) continue;
1953
1953
  const o = (n = r.name) == null ? void 0 : n.trim();
1954
- o && (t[o] = Pn(r));
1954
+ o && (t[o] = On(r));
1955
1955
  }
1956
1956
  return t;
1957
1957
  }
1958
- function Ft(e) {
1958
+ function wt(e) {
1959
1959
  return e.replace(/'/g, "'\\''");
1960
1960
  }
1961
- function zn(e) {
1961
+ function Bn(e) {
1962
1962
  var n;
1963
1963
  const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
1964
- return t ? ` -H 'Authorization: ${Ft(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
1964
+ return t ? ` -H 'Authorization: ${wt(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
1965
1965
  }
1966
- function On(e, t, n) {
1966
+ function Ln(e, t, n) {
1967
1967
  const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
1968
1968
  return [
1969
1969
  `curl -X POST '${r}' \\`,
1970
1970
  " -H 'Content-Type: application/json' \\",
1971
- zn(n),
1972
- ` -d '${Ft(o)}'`
1971
+ Bn(n),
1972
+ ` -d '${wt(o)}'`
1973
1973
  ].join(`
1974
1974
  `);
1975
1975
  }
1976
- function hi(e, t) {
1976
+ function yi(e, t) {
1977
1977
  return JSON.stringify({ ...e, ...t }, null, 2);
1978
1978
  }
1979
- function gi({
1979
+ function vi({
1980
1980
  cardValues: e,
1981
1981
  extraValues: t = {},
1982
1982
  callbackUrl: n,
1983
1983
  headers: r
1984
1984
  }) {
1985
- const o = (n ?? "").trim() || "<callback_url>", i = hi(e, t);
1985
+ const o = (n ?? "").trim() || "<callback_url>", i = yi(e, t);
1986
1986
  return [
1987
1987
  `curl -X POST '${o}' \\`,
1988
1988
  " -H 'Content-Type: application/json' \\",
1989
- zn(r),
1990
- ` -d '${Ft(i)}'`
1989
+ Bn(r),
1990
+ ` -d '${wt(i)}'`
1991
1991
  ].join(`
1992
1992
  `);
1993
1993
  }
1994
- function Qs(e, t, n) {
1995
- const r = He(e);
1996
- if (!r) return On(e, t, n);
1994
+ function ta(e, t, n) {
1995
+ const r = Ke(e);
1996
+ if (!r) return Ln(e, t, n);
1997
1997
  const o = je(r.blocks);
1998
- return gi({ cardValues: o, callbackUrl: t, headers: n });
1998
+ return vi({ cardValues: o, callbackUrl: t, headers: n });
1999
1999
  }
2000
- async function Bn(e, t, n) {
2000
+ async function qn(e, t, n) {
2001
2001
  const r = e.trim();
2002
2002
  if (!r)
2003
2003
  throw new Error("callback_url 为空");
@@ -2024,7 +2024,7 @@ async function Bn(e, t, n) {
2024
2024
  }
2025
2025
  return { ok: i.ok, status: i.status, body: s };
2026
2026
  }
2027
- async function Xs(e) {
2027
+ async function na(e) {
2028
2028
  var n;
2029
2029
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
2030
2030
  await navigator.clipboard.writeText(e);
@@ -2040,7 +2040,7 @@ async function Xs(e) {
2040
2040
  document.body.removeChild(t);
2041
2041
  }
2042
2042
  }
2043
- async function Ke(e) {
2043
+ async function We(e) {
2044
2044
  let t;
2045
2045
  try {
2046
2046
  t = await e.json();
@@ -2053,8 +2053,8 @@ async function Ke(e) {
2053
2053
  throw new Error(t.message || `响应缺少 data (${e.status})`);
2054
2054
  return t.data;
2055
2055
  }
2056
- const Nt = "auth_user", yi = "token", vi = "answer_agent_callback_url", bi = "realtime_ws_url", Si = "/api/v1/mock/ask_user_answer_mock";
2057
- function It(e) {
2056
+ const Ge = "auth_user", bi = "token", Si = "answer_agent_callback_url", ki = "realtime_ws_url", Ci = "skopon_api_base_url", Ai = "/api/v1/mock/ask_user_answer_mock", Oe = "/api/v1";
2057
+ function Je(e) {
2058
2058
  if (typeof window > "u") return null;
2059
2059
  try {
2060
2060
  return e === "localStorage" ? window.localStorage : window.sessionStorage;
@@ -2062,7 +2062,7 @@ function It(e) {
2062
2062
  return null;
2063
2063
  }
2064
2064
  }
2065
- function Et(e) {
2065
+ function Ye(e) {
2066
2066
  try {
2067
2067
  const t = JSON.parse(e);
2068
2068
  return !t || typeof t != "object" || Array.isArray(t) ? null : t;
@@ -2070,50 +2070,84 @@ function Et(e) {
2070
2070
  return null;
2071
2071
  }
2072
2072
  }
2073
- function ki(e, t) {
2074
- const n = Et(e);
2073
+ function ht() {
2074
+ if (typeof window > "u") return Oe;
2075
+ try {
2076
+ const e = window.location.origin, t = new URL(e);
2077
+ return t.protocol !== "http:" && t.protocol !== "https:" ? Oe : `${t.origin}${Oe}`;
2078
+ } catch {
2079
+ return Oe;
2080
+ }
2081
+ }
2082
+ function _i(e = {}) {
2083
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ge, r = e.skoponApiBaseUrlField ?? Ci, o = Je(t);
2084
+ let i = null;
2085
+ try {
2086
+ i = (o == null ? void 0 : o.getItem(n)) ?? null;
2087
+ } catch {
2088
+ return ht();
2089
+ }
2090
+ const s = i ? Ye(i) : null, a = s == null ? void 0 : s[r];
2091
+ if (a == null)
2092
+ return ht();
2093
+ if (typeof a != "string")
2094
+ throw new Error("skopon_api_base_url 格式无效,无法上传文件");
2095
+ const l = a.trim();
2096
+ if (!l) return ht();
2097
+ try {
2098
+ const c = new URL(l);
2099
+ if (c.protocol !== "http:" && c.protocol !== "https:" || c.username || c.password || c.search || c.hash)
2100
+ throw new Error("invalid Skopon API base URL");
2101
+ const m = c.pathname.replace(/\/+$/, "");
2102
+ return `${c.origin}${m}`;
2103
+ } catch {
2104
+ throw new Error("skopon_api_base_url 格式无效,无法上传文件");
2105
+ }
2106
+ }
2107
+ function Ti(e, t) {
2108
+ const n = Ye(e);
2075
2109
  if (!n) return "";
2076
2110
  const r = n[t];
2077
2111
  return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
2078
2112
  }
2079
- function Ci(e = {}) {
2080
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Nt, r = e.answerAgentCallbackUrlField ?? vi, o = It(t);
2113
+ function xi(e = {}) {
2114
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ge, r = e.answerAgentCallbackUrlField ?? Si, o = Je(t);
2081
2115
  if (!o) return "";
2082
2116
  const i = o.getItem(n);
2083
2117
  if (!i) return "";
2084
- const s = Et(i);
2118
+ const s = Ye(i);
2085
2119
  if (!s) return "";
2086
2120
  const a = s[r];
2087
- return (typeof a == "string" ? a.trim() : "") || Si;
2121
+ return (typeof a == "string" ? a.trim() : "") || Ai;
2088
2122
  }
2089
- function Ai(e = {}) {
2090
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Nt, r = e.realtimeWsUrlField ?? bi, o = It(t);
2123
+ function Fi(e = {}) {
2124
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ge, r = e.realtimeWsUrlField ?? ki, o = Je(t);
2091
2125
  if (!o) return "";
2092
2126
  const i = o.getItem(n);
2093
2127
  if (!i) return "";
2094
- const s = Et(i);
2128
+ const s = Ye(i);
2095
2129
  if (!s) return "";
2096
2130
  const a = s[r];
2097
2131
  return typeof a == "string" ? a.trim() : "";
2098
2132
  }
2099
- function Ut(e, t) {
2133
+ function Rt(e, t) {
2100
2134
  return {
2101
- ...wt(t),
2135
+ ...Pt(t),
2102
2136
  ...e ?? {}
2103
2137
  };
2104
2138
  }
2105
- function wt(e = {}) {
2106
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Nt, r = e.tokenField ?? yi, o = It(t);
2139
+ function Pt(e = {}) {
2140
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ge, r = e.tokenField ?? bi, o = Je(t);
2107
2141
  if (!o) return {};
2108
2142
  const i = o.getItem(n);
2109
2143
  if (!i) return {};
2110
- const s = ki(i, r);
2144
+ const s = Ti(i, r);
2111
2145
  return s ? { Authorization: `Bearer ${s}` } : {};
2112
2146
  }
2113
- async function Rt(e = {}) {
2114
- return e.getHeaders ? await e.getHeaders() ?? {} : wt(e.authStorage);
2147
+ async function zt(e = {}) {
2148
+ return e.getHeaders ? await e.getHeaders() ?? {} : Pt(e.authStorage);
2115
2149
  }
2116
- function _i(e = {}) {
2150
+ function Mi(e = {}) {
2117
2151
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
2118
2152
  async function o(i) {
2119
2153
  const s = new URLSearchParams();
@@ -2123,21 +2157,21 @@ function _i(e = {}) {
2123
2157
  s.set("form_unique_id", i.formUniqueId);
2124
2158
  else
2125
2159
  throw new Error("form_id 或 form_unique_id 至少传一个");
2126
- const a = await Rt(e), l = await r(`${t}${n}?${s.toString()}`, {
2160
+ const a = await zt(e), l = await r(`${t}${n}?${s.toString()}`, {
2127
2161
  method: "GET",
2128
2162
  headers: a
2129
- }), u = await Ke(l), m = ii(u.form_definition);
2163
+ }), c = await We(l), m = ai(c.form_definition);
2130
2164
  return {
2131
- formUniqueId: u.form_unique_id,
2132
- formId: u.form_id,
2133
- disabled: u.disabled === 1,
2165
+ formUniqueId: c.form_unique_id,
2166
+ formId: c.form_id,
2167
+ disabled: c.disabled === 1,
2134
2168
  formDefinition: m,
2135
- a2ui: ri(u.form_definition) ?? void 0
2169
+ a2ui: ii(c.form_definition) ?? void 0
2136
2170
  };
2137
2171
  }
2138
2172
  return { fetchDetail: o };
2139
2173
  }
2140
- function Ti(e) {
2174
+ function Ii(e) {
2141
2175
  if (!e || typeof e != "object" || Array.isArray(e))
2142
2176
  return e ?? null;
2143
2177
  const t = e;
@@ -2147,13 +2181,13 @@ function Ti(e) {
2147
2181
  blocks: t.blocks
2148
2182
  } : e;
2149
2183
  }
2150
- function Pt({
2184
+ function Ot({
2151
2185
  context: e,
2152
2186
  payload: t,
2153
2187
  form: n,
2154
2188
  answer: r
2155
2189
  }) {
2156
- const o = He(t) ?? t, i = n ? Ti(n) : o;
2190
+ const o = Ke(t) ?? t, i = n ? Ii(n) : o;
2157
2191
  return {
2158
2192
  mission_id: e.missionId ?? null,
2159
2193
  tenant_id: e.tenantId ?? null,
@@ -2166,7 +2200,7 @@ function Pt({
2166
2200
  answer: r
2167
2201
  };
2168
2202
  }
2169
- function zt(e) {
2203
+ function Bt(e) {
2170
2204
  const t = e.callback_url;
2171
2205
  if (typeof t != "string" || !t.trim())
2172
2206
  return "callback_url 为空,无法提交";
@@ -2181,34 +2215,34 @@ function zt(e) {
2181
2215
  const o = e.mission_id;
2182
2216
  return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
2183
2217
  }
2184
- function Zs(e) {
2185
- return zt(
2186
- Pt({
2218
+ function ra(e) {
2219
+ return Bt(
2220
+ Ot({
2187
2221
  context: e,
2188
2222
  payload: {},
2189
2223
  answer: {}
2190
2224
  })
2191
2225
  );
2192
2226
  }
2193
- const sn = "answer_agent_callback_url 未配置,无法提交";
2194
- function xi(e) {
2227
+ const ln = "answer_agent_callback_url 未配置,无法提交";
2228
+ function Ni(e) {
2195
2229
  if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
2196
2230
  const n = e.answerAgentCallbackUrl.trim();
2197
2231
  if (!n)
2198
- throw new Error(sn);
2232
+ throw new Error(ln);
2199
2233
  return n;
2200
2234
  }
2201
- const t = Ci(e == null ? void 0 : e.authStorage).trim();
2235
+ const t = xi(e == null ? void 0 : e.authStorage).trim();
2202
2236
  if (!t)
2203
- throw new Error(sn);
2237
+ throw new Error(ln);
2204
2238
  return t;
2205
2239
  }
2206
- function qn(e) {
2240
+ function Vn(e) {
2207
2241
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
2208
2242
  const n = e.data;
2209
2243
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
2210
2244
  }
2211
- function Mi(e, t) {
2245
+ function Ei(e, t) {
2212
2246
  if (t && typeof t == "object" && t !== null && "message" in t) {
2213
2247
  const n = t.message;
2214
2248
  if (typeof n == "string" && n.trim())
@@ -2216,27 +2250,27 @@ function Mi(e, t) {
2216
2250
  }
2217
2251
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
2218
2252
  }
2219
- function Fi(e) {
2253
+ function Ui(e) {
2220
2254
  return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
2221
2255
  }
2222
- function Ln(e) {
2223
- const t = qn(e.body);
2224
- return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Fi(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2256
+ function $n(e) {
2257
+ const t = Vn(e.body);
2258
+ return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Ui(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2225
2259
  type: "error",
2226
- message: Mi(e.status, e.body)
2260
+ message: Ei(e.status, e.body)
2227
2261
  };
2228
2262
  }
2229
- async function Vn(e, t) {
2230
- const n = zt(e);
2263
+ async function jn(e, t) {
2264
+ const n = Bt(e);
2231
2265
  if (n)
2232
2266
  throw new Error(n);
2233
- const r = xi(t), o = await Bn(r, e, {
2267
+ const r = Ni(t), o = await qn(r, e, {
2234
2268
  ...t,
2235
- headers: Ut(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
2236
- }), i = qn(o.body);
2269
+ headers: Rt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
2270
+ }), i = Vn(o.body);
2237
2271
  return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
2238
2272
  }
2239
- function Ni(e) {
2273
+ function wi(e) {
2240
2274
  return {
2241
2275
  resumeUniqueId: e.resume_unique_id,
2242
2276
  resumeId: e.resume_id,
@@ -2257,7 +2291,7 @@ function Ni(e) {
2257
2291
  }))
2258
2292
  };
2259
2293
  }
2260
- function Ii(e, t, n) {
2294
+ function Ri(e, t, n) {
2261
2295
  const r = new URLSearchParams();
2262
2296
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
2263
2297
  for (const o of e.names ?? [])
@@ -2270,27 +2304,27 @@ function Ii(e, t, n) {
2270
2304
  r.append("published", String(o));
2271
2305
  return r;
2272
2306
  }
2273
- function Ei(e = {}) {
2307
+ function Pi(e = {}) {
2274
2308
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
2275
2309
  return async ({ filter: i, page: s }) => {
2276
- const a = await Rt(e), l = Ii(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
2310
+ const a = await zt(e), l = Ri(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2277
2311
  method: "GET",
2278
2312
  headers: a
2279
- }), m = await Ke(u);
2313
+ }), m = await We(c);
2280
2314
  return {
2281
- list: (m.list ?? []).map(Ni),
2315
+ list: (m.list ?? []).map(wi),
2282
2316
  total: m.total ?? 0,
2283
2317
  page: m.page ?? s,
2284
2318
  pageSize: m.page_size ?? i.pageSize ?? 20
2285
2319
  };
2286
2320
  };
2287
2321
  }
2288
- function Ui(e) {
2322
+ function zi(e) {
2289
2323
  var r, o, i, s;
2290
2324
  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()));
2291
2325
  return t || n;
2292
2326
  }
2293
- function wi(e) {
2327
+ function Oi(e) {
2294
2328
  return {
2295
2329
  caseUniqueId: e.case_unique_id,
2296
2330
  caseId: e.case_id,
@@ -2301,7 +2335,7 @@ function wi(e) {
2301
2335
  description: e.description ?? void 0
2302
2336
  };
2303
2337
  }
2304
- function Ri(e, t, n) {
2338
+ function Bi(e, t, n) {
2305
2339
  var o, i, s;
2306
2340
  const r = new URLSearchParams();
2307
2341
  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());
@@ -2309,24 +2343,24 @@ function Ri(e, t, n) {
2309
2343
  a && r.append("flow_unique_ids", a);
2310
2344
  return r;
2311
2345
  }
2312
- function Pi(e = {}) {
2346
+ function Li(e = {}) {
2313
2347
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
2314
2348
  return async ({ filter: i, page: s }) => {
2315
- if (!Ui(i))
2349
+ if (!zi(i))
2316
2350
  return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
2317
- const a = await Rt(e), l = Ri(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
2351
+ const a = await zt(e), l = Bi(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2318
2352
  method: "GET",
2319
2353
  headers: a
2320
- }), m = await Ke(u);
2354
+ }), m = await We(c);
2321
2355
  return {
2322
- list: (m.list ?? []).map(wi),
2356
+ list: (m.list ?? []).map(Oi),
2323
2357
  total: m.total ?? 0,
2324
2358
  page: m.page ?? s,
2325
2359
  pageSize: m.page_size ?? i.pageSize ?? 20
2326
2360
  };
2327
2361
  };
2328
2362
  }
2329
- function ea(e = {}) {
2363
+ function oa(e = {}) {
2330
2364
  var r, o, i, s, a;
2331
2365
  const t = {
2332
2366
  baseUrl: e.baseUrl,
@@ -2335,23 +2369,23 @@ function ea(e = {}) {
2335
2369
  authStorage: e.authStorage
2336
2370
  };
2337
2371
  return {
2338
- fetchDetail: _i({
2372
+ fetchDetail: Mi({
2339
2373
  ...t,
2340
2374
  detailPath: (r = e.form) == null ? void 0 : r.detailPath
2341
2375
  }).fetchDetail,
2342
- resumeSearch: Ei({
2376
+ resumeSearch: Pi({
2343
2377
  ...t,
2344
2378
  searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
2345
2379
  published: (i = e.resume) == null ? void 0 : i.published
2346
2380
  }),
2347
- caseSearch: Pi({
2381
+ caseSearch: Li({
2348
2382
  ...t,
2349
2383
  listPath: (s = e.case) == null ? void 0 : s.listPath,
2350
2384
  published: (a = e.case) == null ? void 0 : a.published
2351
2385
  })
2352
2386
  };
2353
2387
  }
2354
- function jn(e, t) {
2388
+ function Dn(e, t) {
2355
2389
  if (!t.trim()) return !0;
2356
2390
  try {
2357
2391
  return new RegExp(t).test(e);
@@ -2359,10 +2393,10 @@ function jn(e, t) {
2359
2393
  return !0;
2360
2394
  }
2361
2395
  }
2362
- function $n(e) {
2396
+ function Hn(e) {
2363
2397
  return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
2364
2398
  }
2365
- function zi(e, t) {
2399
+ function qi(e, t) {
2366
2400
  switch (e.type) {
2367
2401
  case "multiselect":
2368
2402
  case "checkbox":
@@ -2375,29 +2409,29 @@ function zi(e, t) {
2375
2409
  case "number":
2376
2410
  return t == null || t === "";
2377
2411
  default:
2378
- return $n(t);
2412
+ return Hn(t);
2379
2413
  }
2380
2414
  }
2381
- function mt(e, t) {
2415
+ function gt(e, t) {
2382
2416
  return e.required === !0 || t > 0;
2383
2417
  }
2384
- function Oi(e, t) {
2418
+ function Vi(e, t) {
2385
2419
  var n, r;
2386
2420
  for (const o of e) {
2387
2421
  if (!ee(o.type)) continue;
2388
2422
  const i = (n = o.name) == null ? void 0 : n.trim();
2389
2423
  if (!i) continue;
2390
2424
  const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
2391
- if (o.required && zi(o, s))
2425
+ if (o.required && qi(o, s))
2392
2426
  return { fieldName: i, label: a, message: `请填写「${a}」` };
2393
- if (o.type === "email" && !$n(s)) {
2427
+ if (o.type === "email" && !Hn(s)) {
2394
2428
  const l = String(s).trim();
2395
- if (!jn(l, Tt))
2429
+ if (!Dn(l, Nt))
2396
2430
  return { fieldName: i, label: a, message: `「${a}」格式不正确` };
2397
2431
  }
2398
2432
  if (o.type === "file") {
2399
- const l = o.fileMinCount ?? 0, u = ne(s).length;
2400
- if (l > 0 && u < l && mt(o, u))
2433
+ const l = o.fileMinCount ?? 0, c = ne(s).length;
2434
+ if (l > 0 && c < l && gt(o, c))
2401
2435
  return {
2402
2436
  fieldName: i,
2403
2437
  label: a,
@@ -2405,8 +2439,8 @@ function Oi(e, t) {
2405
2439
  };
2406
2440
  }
2407
2441
  if (o.type === "resume_multiselect") {
2408
- const l = o.resumeMinCount, u = ne(s).length;
2409
- if (l !== void 0 && u < l && mt(o, u))
2442
+ const l = o.resumeMinCount, c = ne(s).length;
2443
+ if (l !== void 0 && c < l && gt(o, c))
2410
2444
  return {
2411
2445
  fieldName: i,
2412
2446
  label: a,
@@ -2414,8 +2448,8 @@ function Oi(e, t) {
2414
2448
  };
2415
2449
  }
2416
2450
  if (o.type === "case_multiselect") {
2417
- const l = o.caseMinCount, u = ne(s).length;
2418
- if (l !== void 0 && u < l && mt(o, u))
2451
+ const l = o.caseMinCount, c = ne(s).length;
2452
+ if (l !== void 0 && c < l && gt(o, c))
2419
2453
  return {
2420
2454
  fieldName: i,
2421
2455
  label: a,
@@ -2425,21 +2459,21 @@ function Oi(e, t) {
2425
2459
  }
2426
2460
  return null;
2427
2461
  }
2428
- const Bi = {
2429
- video: vr,
2430
- audio: yr,
2431
- image: gr,
2432
- file: mn,
2433
- spreadsheet: hr,
2434
- document: un
2462
+ const $i = {
2463
+ video: Sr,
2464
+ audio: br,
2465
+ image: vr,
2466
+ file: fn,
2467
+ spreadsheet: yr,
2468
+ document: dn
2435
2469
  };
2436
- function qi({
2470
+ function ji({
2437
2471
  type: e,
2438
2472
  size: t = 40,
2439
2473
  className: n
2440
2474
  }) {
2441
- const r = Bi[e] ?? mn;
2442
- return /* @__PURE__ */ c(
2475
+ const r = $i[e] ?? fn;
2476
+ return /* @__PURE__ */ u(
2443
2477
  r,
2444
2478
  {
2445
2479
  className: n ?? "skopon-form-file-placeholder-icon",
@@ -2448,46 +2482,46 @@ function qi({
2448
2482
  }
2449
2483
  );
2450
2484
  }
2451
- const Li = "/api/v1/dev/upload/cdn", Vi = 12e4;
2452
- class Dn extends Error {
2485
+ const Di = "/univ/upload/cdn", Hi = 12e4;
2486
+ class Kn extends Error {
2453
2487
  constructor(t = "上传已取消") {
2454
2488
  super(t), this.name = "UploadCancelledError";
2455
2489
  }
2456
2490
  }
2457
- function ji(e) {
2458
- return e instanceof Dn;
2459
- }
2460
- async function $i(e, t = {}) {
2461
- var s, a, l;
2462
- const n = new AbortController();
2463
- let r = !1;
2464
- const o = () => n.abort();
2465
- (s = t.signal) != null && s.aborted ? n.abort() : (a = t.signal) == null || a.addEventListener("abort", o, { once: !0 });
2466
- const i = setTimeout(() => {
2467
- r = !0, n.abort();
2468
- }, Vi);
2491
+ function Ki(e) {
2492
+ return e instanceof Kn;
2493
+ }
2494
+ async function Wi(e, t = {}) {
2495
+ var a, l, c;
2496
+ const n = `${_i()}${Di}`, r = new AbortController();
2497
+ let o = !1;
2498
+ const i = () => r.abort();
2499
+ (a = t.signal) != null && a.aborted ? r.abort() : (l = t.signal) == null || l.addEventListener("abort", i, { once: !0 });
2500
+ const s = setTimeout(() => {
2501
+ o = !0, r.abort();
2502
+ }, Hi);
2469
2503
  try {
2470
- const u = new FormData();
2471
- u.append("file", e);
2472
- const m = await fetch(Li, {
2504
+ const m = new FormData();
2505
+ m.append("file", e);
2506
+ const d = await fetch(n, {
2473
2507
  method: "POST",
2474
- headers: wt(),
2475
- body: u,
2476
- signal: n.signal
2477
- }), d = await Ke(m), k = typeof d.url == "string" ? d.url.trim() : "";
2478
- if (!k) throw new Error("上传成功但响应缺少文件地址");
2479
- return { ...d, url: k };
2480
- } catch (u) {
2481
- throw n.signal.aborted ? r ? new Error("上传超时,请稍后重试") : new Dn() : u;
2508
+ headers: Pt(),
2509
+ body: m,
2510
+ signal: r.signal
2511
+ }), S = await We(d), y = typeof S.url == "string" ? S.url.trim() : "";
2512
+ if (!y) throw new Error("上传成功但响应缺少文件地址");
2513
+ return { ...S, url: y };
2514
+ } catch (m) {
2515
+ throw r.signal.aborted ? o ? new Error("上传超时,请稍后重试") : new Kn() : m;
2482
2516
  } finally {
2483
- clearTimeout(i), (l = t.signal) == null || l.removeEventListener("abort", o);
2517
+ clearTimeout(s), (c = t.signal) == null || c.removeEventListener("abort", i);
2484
2518
  }
2485
2519
  }
2486
- const Hn = be({
2520
+ const Wn = be({
2487
2521
  beginUpload: () => () => {
2488
2522
  }
2489
2523
  });
2490
- function St({
2524
+ function Tt({
2491
2525
  children: e,
2492
2526
  onUploadingChange: t
2493
2527
  }) {
@@ -2498,19 +2532,19 @@ function St({
2498
2532
  }), []), z(() => {
2499
2533
  t == null || t(n > 0);
2500
2534
  }, [n, t]);
2501
- const s = L(() => {
2535
+ const s = q(() => {
2502
2536
  o.current && r((l) => l + 1);
2503
2537
  let a = !1;
2504
2538
  return () => {
2505
2539
  a || (a = !0, o.current && r((l) => Math.max(0, l - 1)));
2506
2540
  };
2507
2541
  }, []);
2508
- return /* @__PURE__ */ c(Hn.Provider, { value: { beginUpload: s }, children: e });
2542
+ return /* @__PURE__ */ u(Wn.Provider, { value: { beginUpload: s }, children: e });
2509
2543
  }
2510
- function Di() {
2511
- return Se(Hn);
2544
+ function Gi() {
2545
+ return Se(Wn);
2512
2546
  }
2513
- const Kn = "skopon-form-v0_9", Hi = /* @__PURE__ */ new Set([
2547
+ const Gn = "skopon-form-v0_9", Ji = /* @__PURE__ */ new Set([
2514
2548
  "SkoponMedia",
2515
2549
  "SkoponSelect",
2516
2550
  "Image",
@@ -2522,20 +2556,20 @@ const Kn = "skopon-form-v0_9", Hi = /* @__PURE__ */ new Set([
2522
2556
  "FileUpload",
2523
2557
  "TextField",
2524
2558
  "Text",
2525
- ...Wo()
2526
- ]), Ki = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2559
+ ...Jo()
2560
+ ]), Yi = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2527
2561
  function Re(e) {
2528
- const t = [...Be.components.values()].find((n) => n.name === e);
2562
+ const t = [...Le.components.values()].find((n) => n.name === e);
2529
2563
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
2530
2564
  return t.schema;
2531
2565
  }
2532
2566
  function B(e) {
2533
2567
  return typeof e == "string" ? e : "";
2534
2568
  }
2535
- function Wn(e) {
2569
+ function Jn(e) {
2536
2570
  return ce(e);
2537
2571
  }
2538
- function We({
2572
+ function Qe({
2539
2573
  mediaType: e,
2540
2574
  urls: t,
2541
2575
  mediaSize: n,
@@ -2543,10 +2577,10 @@ function We({
2543
2577
  help: o,
2544
2578
  placeholder: i
2545
2579
  }) {
2546
- const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = Dr(n), u = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2580
+ const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = Kr(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2547
2581
  return /* @__PURE__ */ U("div", { className: "form-block-preview", children: [
2548
- s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
2549
- t.length === 0 ? /* @__PURE__ */ c("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ c("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ c(
2582
+ s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2583
+ 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(
2550
2584
  "img",
2551
2585
  {
2552
2586
  src: m,
@@ -2554,7 +2588,7 @@ function We({
2554
2588
  className: "form-media-item"
2555
2589
  },
2556
2590
  `media-${d}`
2557
- ) : e === "video" ? /* @__PURE__ */ c(
2591
+ ) : e === "video" ? /* @__PURE__ */ u(
2558
2592
  "video",
2559
2593
  {
2560
2594
  src: m,
@@ -2562,7 +2596,7 @@ function We({
2562
2596
  className: "form-media-item"
2563
2597
  },
2564
2598
  `media-${d}`
2565
- ) : /* @__PURE__ */ c(
2599
+ ) : /* @__PURE__ */ u(
2566
2600
  "audio",
2567
2601
  {
2568
2602
  src: m,
@@ -2571,10 +2605,10 @@ function We({
2571
2605
  },
2572
2606
  `media-${d}`
2573
2607
  )) }),
2574
- a ? /* @__PURE__ */ c(re.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2608
+ a ? /* @__PURE__ */ u(re.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2575
2609
  ] });
2576
2610
  }
2577
- function Ge(e, t) {
2611
+ function Xe(e, t) {
2578
2612
  const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : B(e.url).trim() ? [B(e.url).trim()] : [];
2579
2613
  return {
2580
2614
  mediaType: t,
@@ -2585,7 +2619,7 @@ function Ge(e, t) {
2585
2619
  placeholder: B(e.placeholder)
2586
2620
  };
2587
2621
  }
2588
- const Wi = {
2622
+ const Qi = {
2589
2623
  name: "SkoponMedia",
2590
2624
  schema: f.object({
2591
2625
  mediaType: f.any().optional(),
@@ -2595,19 +2629,19 @@ const Wi = {
2595
2629
  help: f.any().optional(),
2596
2630
  placeholder: f.any().optional()
2597
2631
  }).passthrough()
2598
- }, Gi = Z(Wi, ({ context: e }) => {
2632
+ }, Xi = Z(Qi, ({ context: e }) => {
2599
2633
  const t = e.componentModel.properties, n = B(t.mediaType);
2600
- return /* @__PURE__ */ c(We, { ...Ge(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2601
- }), Ji = Z(
2634
+ return /* @__PURE__ */ u(Qe, { ...Xe(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2635
+ }), Zi = Z(
2602
2636
  { name: "Image", schema: Re("Image") },
2603
- ({ context: e }) => /* @__PURE__ */ c(We, { ...Ge(e.componentModel.properties, "image") })
2604
- ), Yi = Z(
2637
+ ({ context: e }) => /* @__PURE__ */ u(Qe, { ...Xe(e.componentModel.properties, "image") })
2638
+ ), es = Z(
2605
2639
  { name: "Video", schema: Re("Video") },
2606
- ({ context: e }) => /* @__PURE__ */ c(We, { ...Ge(e.componentModel.properties, "video") })
2607
- ), Qi = Z(
2640
+ ({ context: e }) => /* @__PURE__ */ u(Qe, { ...Xe(e.componentModel.properties, "video") })
2641
+ ), ts = Z(
2608
2642
  { name: "AudioPlayer", schema: Re("AudioPlayer") },
2609
- ({ context: e }) => /* @__PURE__ */ c(We, { ...Ge(e.componentModel.properties, "audio") })
2610
- ), Xi = {
2643
+ ({ context: e }) => /* @__PURE__ */ u(Qe, { ...Xe(e.componentModel.properties, "audio") })
2644
+ ), ns = {
2611
2645
  name: "SkoponSelect",
2612
2646
  schema: f.object({
2613
2647
  label: f.any().optional(),
@@ -2617,18 +2651,18 @@ const Wi = {
2617
2651
  value: f.any().optional()
2618
2652
  }).passthrough()
2619
2653
  };
2620
- function Zi({ context: e }) {
2654
+ function rs({ context: e }) {
2621
2655
  const { interactive: t } = ue(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = me(e, "value", {
2622
2656
  component: "SkoponSelect",
2623
2657
  changeAction: "select"
2624
- }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), u = Wn(s.options), m = B(s.mode) === "multiple";
2658
+ }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), c = Jn(s.options), m = B(s.mode) === "multiple";
2625
2659
  return z(() => {
2626
- const d = xn(n, m);
2660
+ const d = Mn(n, m);
2627
2661
  d !== null && o(d);
2628
- }, [m, n, o]), u.length === 0 ? null : /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2629
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2630
- /* @__PURE__ */ c(
2631
- dt,
2662
+ }, [m, n, o]), c.length === 0 ? null : /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2663
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2664
+ /* @__PURE__ */ u(
2665
+ yt,
2632
2666
  {
2633
2667
  mode: m ? "multiple" : void 0,
2634
2668
  disabled: !t,
@@ -2636,29 +2670,29 @@ function Zi({ context: e }) {
2636
2670
  className: "form-block-preview-control",
2637
2671
  style: { width: "100%" },
2638
2672
  placeholder: l || (m ? "请选择多项" : "请选择"),
2639
- options: u,
2640
- value: m ? ne(n) : Me(n),
2673
+ options: c,
2674
+ value: m ? ne(n) : Fe(n),
2641
2675
  onChange: (d) => r(m ? d ?? [] : d ?? "")
2642
2676
  }
2643
2677
  )
2644
2678
  ] });
2645
2679
  }
2646
- const es = Z(
2647
- Xi,
2648
- Zi
2680
+ const os = Z(
2681
+ ns,
2682
+ rs
2649
2683
  );
2650
- function ts({ context: e }) {
2684
+ function is({ context: e }) {
2651
2685
  const { interactive: t } = ue(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = me(e, "value", {
2652
2686
  component: "ChoicePicker",
2653
2687
  changeAction: "select"
2654
- }), s = e.componentModel.properties, a = B(s.label), l = B(s.variant) || "mutuallyExclusive", u = B(s.skoponPickerType), m = B(s.placeholder), d = Wn(s.options), y = u === "select" || u === "multiselect" || u === "radio" || u === "checkbox" ? u : l === "multipleSelection" ? "checkbox" : "radio", T = y === "multiselect" || y === "checkbox";
2688
+ }), s = e.componentModel.properties, a = B(s.label), l = B(s.variant) || "mutuallyExclusive", c = B(s.skoponPickerType), m = B(s.placeholder), d = Jn(s.options), y = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", T = y === "multiselect" || y === "checkbox";
2655
2689
  return z(() => {
2656
- const g = xn(n, T);
2690
+ const g = Mn(n, T);
2657
2691
  g !== null && o(g);
2658
2692
  }, [T, n, o]), d.length === 0 ? null : /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2659
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2660
- y === "select" ? /* @__PURE__ */ c(
2661
- dt,
2693
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2694
+ y === "select" ? /* @__PURE__ */ u(
2695
+ yt,
2662
2696
  {
2663
2697
  disabled: !t,
2664
2698
  allowClear: !0,
@@ -2666,11 +2700,11 @@ function ts({ context: e }) {
2666
2700
  style: { width: "100%" },
2667
2701
  placeholder: m || "请选择",
2668
2702
  options: d,
2669
- value: Me(n),
2703
+ value: Fe(n),
2670
2704
  onChange: (g) => r(g ?? "")
2671
2705
  }
2672
- ) : y === "multiselect" ? /* @__PURE__ */ c(
2673
- dt,
2706
+ ) : y === "multiselect" ? /* @__PURE__ */ u(
2707
+ yt,
2674
2708
  {
2675
2709
  mode: "multiple",
2676
2710
  disabled: !t,
@@ -2682,8 +2716,8 @@ function ts({ context: e }) {
2682
2716
  value: ne(n),
2683
2717
  onChange: (g) => r(g ?? [])
2684
2718
  }
2685
- ) : y === "checkbox" ? /* @__PURE__ */ c(
2686
- ir.Group,
2719
+ ) : y === "checkbox" ? /* @__PURE__ */ u(
2720
+ ar.Group,
2687
2721
  {
2688
2722
  disabled: !t,
2689
2723
  className: "form-block-preview-control",
@@ -2691,19 +2725,19 @@ function ts({ context: e }) {
2691
2725
  value: ne(n),
2692
2726
  onChange: (g) => r(g)
2693
2727
  }
2694
- ) : /* @__PURE__ */ c(
2695
- sr.Group,
2728
+ ) : /* @__PURE__ */ u(
2729
+ lr.Group,
2696
2730
  {
2697
2731
  disabled: !t,
2698
2732
  className: "form-block-preview-control",
2699
2733
  options: d,
2700
- value: Me(n),
2734
+ value: Fe(n),
2701
2735
  onChange: (g) => r(g.target.value)
2702
2736
  }
2703
2737
  )
2704
2738
  ] });
2705
2739
  }
2706
- const ns = Z(
2740
+ const ss = Z(
2707
2741
  {
2708
2742
  name: "ChoicePicker",
2709
2743
  schema: f.object({
@@ -2715,17 +2749,17 @@ const ns = Z(
2715
2749
  placeholder: f.any().optional()
2716
2750
  }).passthrough()
2717
2751
  },
2718
- ts
2752
+ is
2719
2753
  );
2720
- function rs({ context: e }) {
2754
+ function as({ context: e }) {
2721
2755
  const { interactive: t } = ue(), { value: n, setValue: r, fieldName: o } = me(e, "value", {
2722
2756
  component: "CheckBox",
2723
2757
  changeAction: "change"
2724
2758
  }), i = e.componentModel.properties, s = B(i.label);
2725
2759
  return /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2726
- s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
2727
- /* @__PURE__ */ c(
2728
- ar,
2760
+ s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2761
+ /* @__PURE__ */ u(
2762
+ cr,
2729
2763
  {
2730
2764
  disabled: !t,
2731
2765
  className: "form-block-preview-control",
@@ -2735,68 +2769,68 @@ function rs({ context: e }) {
2735
2769
  )
2736
2770
  ] });
2737
2771
  }
2738
- const os = Z(
2772
+ const ls = Z(
2739
2773
  { name: "CheckBox", schema: Re("CheckBox") },
2740
- rs
2774
+ as
2741
2775
  );
2742
- function is(e, t, n) {
2743
- const r = Me(e);
2776
+ function cs(e, t, n) {
2777
+ const r = Fe(e);
2744
2778
  if (!r) return;
2745
2779
  if (!t && n) {
2746
- const i = Qt(r, "HH:mm", !0);
2780
+ const i = Zt(r, "HH:mm", !0);
2747
2781
  return i.isValid() ? i : void 0;
2748
2782
  }
2749
- const o = Qt(r);
2783
+ const o = Zt(r);
2750
2784
  return o.isValid() ? o : void 0;
2751
2785
  }
2752
- function ss({ context: e }) {
2786
+ function us({ context: e }) {
2753
2787
  const { interactive: t } = ue(), { value: n, setValue: r, fieldName: o, reportFocus: i } = me(e, "value", {
2754
2788
  component: "DateTimeInput",
2755
2789
  changeAction: "change"
2756
- }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), u = s.enableDate === !0, m = s.enableTime === !0, d = is(n, u, m), k = (y) => {
2790
+ }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = cs(n, c, m), S = (y) => {
2757
2791
  if (!y) {
2758
2792
  r("");
2759
2793
  return;
2760
2794
  }
2761
- if (!u && m) {
2795
+ if (!c && m) {
2762
2796
  r(y.format("HH:mm"));
2763
2797
  return;
2764
2798
  }
2765
- if (u && m) {
2799
+ if (c && m) {
2766
2800
  r(y.format("YYYY-MM-DDTHH:mm"));
2767
2801
  return;
2768
2802
  }
2769
2803
  r(y.format("YYYY-MM-DD"));
2770
2804
  };
2771
2805
  return /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2772
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2773
- !u && m ? /* @__PURE__ */ c(
2774
- lr,
2806
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2807
+ !c && m ? /* @__PURE__ */ u(
2808
+ ur,
2775
2809
  {
2776
2810
  disabled: !t,
2777
2811
  className: "form-block-preview-control",
2778
2812
  style: { width: "100%" },
2779
2813
  placeholder: l || "选择时间",
2780
2814
  value: d,
2781
- onChange: k,
2815
+ onChange: S,
2782
2816
  onFocus: i
2783
2817
  }
2784
- ) : /* @__PURE__ */ c(
2785
- cr,
2818
+ ) : /* @__PURE__ */ u(
2819
+ mr,
2786
2820
  {
2787
- showTime: u && m,
2821
+ showTime: c && m,
2788
2822
  disabled: !t,
2789
2823
  className: "form-block-preview-control",
2790
2824
  style: { width: "100%" },
2791
- placeholder: l || (u && m ? "选择日期时间" : "选择日期"),
2825
+ placeholder: l || (c && m ? "选择日期时间" : "选择日期"),
2792
2826
  value: d,
2793
- onChange: k,
2827
+ onChange: S,
2794
2828
  onFocus: i
2795
2829
  }
2796
2830
  )
2797
2831
  ] });
2798
2832
  }
2799
- const as = Z(
2833
+ const ms = Z(
2800
2834
  {
2801
2835
  name: "DateTimeInput",
2802
2836
  schema: f.object({
@@ -2809,8 +2843,8 @@ const as = Z(
2809
2843
  max: f.any().optional()
2810
2844
  }).passthrough()
2811
2845
  },
2812
- ss
2813
- ), ls = {
2846
+ us
2847
+ ), ds = {
2814
2848
  name: "FileUpload",
2815
2849
  schema: f.object({
2816
2850
  label: f.any().optional(),
@@ -2822,10 +2856,10 @@ const as = Z(
2822
2856
  value: f.any().optional()
2823
2857
  }).passthrough()
2824
2858
  };
2825
- function an(e) {
2859
+ function cn(e) {
2826
2860
  return ne(e).map((t) => t.trim()).filter(Boolean);
2827
2861
  }
2828
- function cs(e) {
2862
+ function fs(e) {
2829
2863
  const n = e.split(/[?#]/, 1)[0].split("/").filter(Boolean).pop() || e;
2830
2864
  try {
2831
2865
  return decodeURIComponent(n);
@@ -2833,90 +2867,90 @@ function cs(e) {
2833
2867
  return n;
2834
2868
  }
2835
2869
  }
2836
- function ln(e, t) {
2837
- return { uid: t, name: cs(e), status: "done", url: e };
2870
+ function un(e, t) {
2871
+ return { uid: t, name: fs(e), status: "done", url: e };
2838
2872
  }
2839
- function us({ context: e }) {
2873
+ function ps({ context: e }) {
2840
2874
  var oe;
2841
- const { interactive: t } = ue(), { beginUpload: n } = Di(), { value: r, setValue: o, setValueSilent: i, fieldName: s } = me(e, "value", {
2875
+ const { interactive: t } = ue(), { beginUpload: n } = Gi(), { value: r, setValue: o, setValueSilent: i, fieldName: s } = me(e, "value", {
2842
2876
  component: "FileUpload",
2843
2877
  changeAction: "change"
2844
- }), a = e.componentModel.properties, l = B(a.label), u = B(a.accept), m = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, d = u ? u.split(",").map((_) => _.trim()).filter(Boolean) : void 0, k = Or(m, d), y = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2878
+ }), a = e.componentModel.properties, l = B(a.label), c = B(a.accept), m = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, d = c ? c.split(",").map((_) => _.trim()).filter(Boolean) : void 0, S = Lr(m, d), y = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2845
2879
  a.filePlaceholderIcon
2846
- ) ? a.filePlaceholderIcon : "document", T = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, g = typeof a.maxCount == "number" ? a.maxCount : 1, C = g > 0, v = an(r), p = x(0), S = x(!0), N = x(/* @__PURE__ */ new Map()), O = x(o);
2880
+ ) ? a.filePlaceholderIcon : "document", T = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, g = typeof a.maxCount == "number" ? a.maxCount : 1, C = g > 0, v = cn(r), p = x(0), k = x(!0), I = x(/* @__PURE__ */ new Map()), O = x(o);
2847
2881
  O.current = o;
2848
- const [F, j] = w(
2849
- () => v.map((_) => ln(_, `external-${p.current++}`))
2850
- ), H = x(F);
2851
- H.current = F;
2852
- const I = L(
2882
+ const [M, $] = w(
2883
+ () => v.map((_) => un(_, `external-${p.current++}`))
2884
+ ), H = x(M);
2885
+ H.current = M;
2886
+ const N = q(
2853
2887
  (_, h) => {
2854
2888
  const b = _(H.current);
2855
- return H.current = b, S.current && j(b), h && O.current(
2889
+ return H.current = b, k.current && $(b), h && O.current(
2856
2890
  b.filter((R) => R.status === "done" && R.url).map((R) => R.url)
2857
2891
  ), b;
2858
2892
  },
2859
2893
  []
2860
2894
  );
2861
- z(() => (S.current = !0, () => {
2862
- S.current = !1;
2863
- for (const _ of N.current.values()) _.abort();
2864
- N.current.clear();
2895
+ z(() => (k.current = !0, () => {
2896
+ k.current = !1;
2897
+ for (const _ of I.current.values()) _.abort();
2898
+ I.current.clear();
2865
2899
  }), []), z(() => {
2866
- const _ = an(r);
2867
- Array.isArray(r) && r.length === _.length && r.every((R, M) => typeof R == "string" && R === _[M]) || i(_);
2900
+ const _ = cn(r);
2901
+ Array.isArray(r) && r.length === _.length && r.every((R, F) => typeof R == "string" && R === _[F]) || i(_);
2868
2902
  const b = /* @__PURE__ */ new Set();
2869
- I(
2903
+ N(
2870
2904
  (R) => {
2871
- const M = R.filter((E) => {
2905
+ const F = R.filter((E) => {
2872
2906
  if (E.status !== "done" || !E.url) return !0;
2873
2907
  const J = _.findIndex((te, se) => !b.has(se) && te === E.url);
2874
2908
  return J < 0 ? !1 : (b.add(J), !0);
2875
2909
  });
2876
2910
  return _.forEach((E, J) => {
2877
- b.has(J) || M.push(ln(E, `external-${p.current++}`));
2878
- }), M;
2911
+ b.has(J) || F.push(un(E, `external-${p.current++}`));
2912
+ }), F;
2879
2913
  },
2880
2914
  !1
2881
2915
  );
2882
- }, [r, i, I]);
2883
- const A = L(
2916
+ }, [r, i, N]);
2917
+ const A = q(
2884
2918
  (_) => {
2885
2919
  if (!t || C && H.current.length >= g) return;
2886
2920
  const h = `${_.uid ?? "file"}-${p.current++}`, b = new AbortController();
2887
- N.current.set(h, b), I(
2888
- (M) => [...M, { uid: h, name: _.name, status: "uploading" }],
2921
+ I.current.set(h, b), N(
2922
+ (F) => [...F, { uid: h, name: _.name, status: "uploading" }],
2889
2923
  !1
2890
2924
  );
2891
2925
  const R = n();
2892
- $i(_, { signal: b.signal }).then((M) => {
2893
- !S.current || b.signal.aborted || I(
2926
+ Wi(_, { signal: b.signal }).then((F) => {
2927
+ !k.current || b.signal.aborted || N(
2894
2928
  (E) => E.map(
2895
- (J) => J.uid === h ? { ...J, status: "done", url: M.url, error: void 0 } : J
2929
+ (J) => J.uid === h ? { ...J, status: "done", url: F.url, error: void 0 } : J
2896
2930
  ),
2897
2931
  !0
2898
2932
  );
2899
- }).catch((M) => {
2900
- if (!S.current || ji(M)) return;
2901
- const E = M instanceof Error ? M.message : "上传失败";
2902
- I(
2933
+ }).catch((F) => {
2934
+ if (!k.current || Ki(F)) return;
2935
+ const E = F instanceof Error ? F.message : "上传失败";
2936
+ N(
2903
2937
  (J) => J.map(
2904
2938
  (te) => te.uid === h ? { ...te, status: "error", error: E } : te
2905
2939
  ),
2906
2940
  !1
2907
2941
  );
2908
2942
  }).finally(() => {
2909
- N.current.delete(h), R();
2943
+ I.current.delete(h), R();
2910
2944
  });
2911
2945
  },
2912
- [n, I, C, t, g]
2913
- ), Y = L(
2946
+ [n, N, C, t, g]
2947
+ ), Y = q(
2914
2948
  (_) => {
2915
2949
  var h;
2916
- (h = N.current.get(_)) == null || h.abort(), N.current.delete(_), I((b) => b.filter((R) => R.uid !== _), !0);
2950
+ (h = I.current.get(_)) == null || h.abort(), I.current.delete(_), N((b) => b.filter((R) => R.uid !== _), !0);
2917
2951
  },
2918
- [I]
2919
- ), G = F.filter((_) => _.status === "done").length, W = C && F.length >= g, q = G < T, D = (oe = [...F].reverse().find((_) => _.error)) == null ? void 0 : oe.error, ie = F.map((_) => ({
2952
+ [N]
2953
+ ), G = M.filter((_) => _.status === "done").length, W = C && M.length >= g, L = G < T, D = (oe = [...M].reverse().find((_) => _.error)) == null ? void 0 : oe.error, ie = M.map((_) => ({
2920
2954
  uid: _.uid,
2921
2955
  name: _.name,
2922
2956
  status: _.status,
@@ -2924,122 +2958,122 @@ function us({ context: e }) {
2924
2958
  response: _.error
2925
2959
  }));
2926
2960
  return /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": s || void 0, children: [
2927
- l ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: l }) : null,
2961
+ l ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: l }) : null,
2928
2962
  /* @__PURE__ */ U(
2929
- nt.Dragger,
2963
+ st.Dragger,
2930
2964
  {
2931
2965
  disabled: !t,
2932
2966
  openFileDialogOnClick: !W,
2933
- accept: zr(m, d),
2967
+ accept: Br(m, d),
2934
2968
  className: "form-file-upload-preview",
2935
2969
  multiple: !C || g > 1,
2936
- showUploadList: t && F.length > 0,
2970
+ showUploadList: t && M.length > 0,
2937
2971
  fileList: t ? ie : [],
2938
- beforeUpload: (_) => t ? (A(_), nt.LIST_IGNORE) : nt.LIST_IGNORE,
2972
+ beforeUpload: (_) => t ? (A(_), st.LIST_IGNORE) : st.LIST_IGNORE,
2939
2973
  onRemove: (_) => (Y(_.uid), !0),
2940
2974
  children: [
2941
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(qi, { type: y, size: 40 }) }),
2942
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2975
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(ji, { type: y, size: 40 }) }),
2976
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2943
2977
  ]
2944
2978
  }
2945
2979
  ),
2946
2980
  /* @__PURE__ */ U(re.Text, { type: "secondary", className: "form-block-preview-help", children: [
2947
2981
  "允许:",
2948
- k ?? "全部类型",
2982
+ S ?? "全部类型",
2949
2983
  T > 0 ? `;至少 ${T} 个文件` : "",
2950
2984
  C ? `;最多 ${g} 个文件` : "",
2951
2985
  ";选择后自动上传至 CDN",
2952
- q && t ? `(当前 ${G} 个,未达下限)` : ""
2986
+ L && t ? `(当前 ${G} 个,未达下限)` : ""
2953
2987
  ] }),
2954
- D ? /* @__PURE__ */ c(re.Text, { type: "danger", className: "form-block-preview-help", children: D }) : null
2988
+ D ? /* @__PURE__ */ u(re.Text, { type: "danger", className: "form-block-preview-help", children: D }) : null
2955
2989
  ] });
2956
2990
  }
2957
- const ms = Z(
2958
- ls,
2959
- us
2991
+ const hs = Z(
2992
+ ds,
2993
+ ps
2960
2994
  );
2961
- function ds({ context: e }) {
2995
+ function gs({ context: e }) {
2962
2996
  const { interactive: t } = ue(), { value: n, setValue: r, fieldName: o, reportFocus: i } = me(e, "value", {
2963
2997
  component: "TextField",
2964
2998
  changeAction: "change",
2965
2999
  debounceChange: !0
2966
- }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), u = B(s.variant) || "shortText", m = B(s.validationRegexp), d = Me(n) ?? "", k = !t, [y, T] = w(""), g = (p) => {
3000
+ }), s = e.componentModel.properties, a = B(s.label), l = B(s.placeholder), c = B(s.variant) || "shortText", m = B(s.validationRegexp), d = Fe(n) ?? "", S = !t, [y, T] = w(""), g = (p) => {
2967
3001
  if (!m || !p.trim()) {
2968
3002
  T("");
2969
3003
  return;
2970
3004
  }
2971
- T(jn(p, m) ? "" : "格式不正确");
3005
+ T(Dn(p, m) ? "" : "格式不正确");
2972
3006
  };
2973
3007
  z(() => {
2974
3008
  g(d);
2975
3009
  }, [m, d]);
2976
3010
  const C = "form-block-preview-control";
2977
3011
  let v;
2978
- if (u === "longText")
2979
- v = /* @__PURE__ */ c(
2980
- rt.TextArea,
3012
+ if (c === "longText")
3013
+ v = /* @__PURE__ */ u(
3014
+ at.TextArea,
2981
3015
  {
2982
- disabled: k,
3016
+ disabled: S,
2983
3017
  className: C,
2984
3018
  placeholder: l || "长文本回答...",
2985
3019
  autoSize: { minRows: 2, maxRows: 6 },
2986
3020
  value: d,
2987
3021
  status: y ? "error" : void 0,
2988
3022
  onChange: (p) => {
2989
- const S = p.target.value;
2990
- r(S), g(S);
3023
+ const k = p.target.value;
3024
+ r(k), g(k);
2991
3025
  },
2992
3026
  onFocus: i,
2993
3027
  onBlur: (p) => g(p.target.value)
2994
3028
  }
2995
3029
  );
2996
- else if (u === "number") {
3030
+ else if (c === "number") {
2997
3031
  const p = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
2998
- v = /* @__PURE__ */ c(
2999
- ur,
3032
+ v = /* @__PURE__ */ u(
3033
+ dr,
3000
3034
  {
3001
- disabled: k,
3035
+ disabled: S,
3002
3036
  className: C,
3003
3037
  style: { width: "100%" },
3004
3038
  placeholder: l || "数字",
3005
3039
  value: p,
3006
- onChange: (S) => r(S == null ? "" : String(S)),
3040
+ onChange: (k) => r(k == null ? "" : String(k)),
3007
3041
  onFocus: i
3008
3042
  }
3009
3043
  );
3010
- } else u === "obscured" ? v = /* @__PURE__ */ c(
3011
- rt.Password,
3044
+ } else c === "obscured" ? v = /* @__PURE__ */ u(
3045
+ at.Password,
3012
3046
  {
3013
- disabled: k,
3047
+ disabled: S,
3014
3048
  className: C,
3015
3049
  placeholder: l,
3016
3050
  value: d,
3017
3051
  onChange: (p) => r(p.target.value),
3018
3052
  onFocus: i
3019
3053
  }
3020
- ) : v = /* @__PURE__ */ c(
3021
- rt,
3054
+ ) : v = /* @__PURE__ */ u(
3055
+ at,
3022
3056
  {
3023
- disabled: k,
3057
+ disabled: S,
3024
3058
  className: C,
3025
3059
  placeholder: l,
3026
3060
  value: d,
3027
3061
  status: y ? "error" : void 0,
3028
3062
  onChange: (p) => {
3029
- const S = p.target.value;
3030
- r(S), g(S);
3063
+ const k = p.target.value;
3064
+ r(k), g(k);
3031
3065
  },
3032
3066
  onFocus: i,
3033
3067
  onBlur: (p) => g(p.target.value)
3034
3068
  }
3035
3069
  );
3036
3070
  return /* @__PURE__ */ U("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3037
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
3071
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
3038
3072
  v,
3039
- y ? /* @__PURE__ */ c(re.Text, { type: "danger", className: "form-block-preview-help", children: y }) : null
3073
+ y ? /* @__PURE__ */ u(re.Text, { type: "danger", className: "form-block-preview-help", children: y }) : null
3040
3074
  ] });
3041
3075
  }
3042
- const fs = Z(
3076
+ const ys = Z(
3043
3077
  {
3044
3078
  name: "TextField",
3045
3079
  schema: f.object({
@@ -3050,35 +3084,35 @@ const fs = Z(
3050
3084
  value: f.any().optional()
3051
3085
  }).passthrough()
3052
3086
  },
3053
- ds
3087
+ gs
3054
3088
  );
3055
- function ps({ context: e }) {
3089
+ function vs({ context: e }) {
3056
3090
  const t = e.componentModel.properties, n = B(t.text), r = B(t.variant) || "body";
3057
- return Ki.has(r) ? r === "caption" ? /* @__PURE__ */ c(re.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(re.Paragraph, { className: "form-block-preview-paragraph", children: n });
3091
+ return Yi.has(r) ? r === "caption" ? /* @__PURE__ */ u(re.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(re.Paragraph, { className: "form-block-preview-paragraph", children: n });
3058
3092
  }
3059
- const hs = Z(
3093
+ const bs = Z(
3060
3094
  { name: "Text", schema: Re("Text") },
3061
- ps
3095
+ vs
3062
3096
  );
3063
- function Gn() {
3097
+ function Yn() {
3064
3098
  const t = [
3065
- ...[...Be.components.values()].filter(
3066
- (r) => !Hi.has(r.name)
3099
+ ...[...Le.components.values()].filter(
3100
+ (r) => !Ji.has(r.name)
3067
3101
  ),
3068
- Gi,
3069
- es,
3070
- Ji,
3071
- Yi,
3072
- Qi,
3073
- ns,
3102
+ Xi,
3074
3103
  os,
3075
- as,
3104
+ Zi,
3105
+ es,
3106
+ ts,
3107
+ ss,
3108
+ ls,
3076
3109
  ms,
3077
- fs,
3078
3110
  hs,
3079
- ...Ko()
3080
- ], n = [...Be.functions.values()];
3081
- return new br(Kn, t, n, Be.themeSchema);
3111
+ ys,
3112
+ bs,
3113
+ ...Go()
3114
+ ], n = [...Le.functions.values()];
3115
+ return new kr(Gn, t, n, Le.themeSchema);
3082
3116
  }
3083
3117
  const le = {
3084
3118
  jade9: "#29a383",
@@ -3092,7 +3126,7 @@ const le = {
3092
3126
  primaryHover: "#26997b",
3093
3127
  primaryActive: "#1d3b31",
3094
3128
  onPrimary: "#ffffff"
3095
- }, gs = {
3129
+ }, Ss = {
3096
3130
  cssVar: { key: "vidtempl" },
3097
3131
  token: {
3098
3132
  colorPrimary: le.primarySolid,
@@ -3177,14 +3211,14 @@ const le = {
3177
3211
  }
3178
3212
  }
3179
3213
  };
3180
- function Fe({
3214
+ function Me({
3181
3215
  children: e,
3182
3216
  locale: t,
3183
3217
  theme: n
3184
3218
  }) {
3185
- return /* @__PURE__ */ c(mr, { theme: n ?? gs, locale: t, children: e });
3219
+ return /* @__PURE__ */ u(fr, { theme: n ?? Ss, locale: t, children: e });
3186
3220
  }
3187
- const ys = tr(
3221
+ const ks = rr(
3188
3222
  function({
3189
3223
  doc: t,
3190
3224
  surfaceId: n = "skopon-form",
@@ -3194,69 +3228,69 @@ const ys = tr(
3194
3228
  resumeSearch: s = null,
3195
3229
  caseSearch: a = null,
3196
3230
  onUploadingChange: l,
3197
- wrapProvider: u = !0
3231
+ wrapProvider: c = !0
3198
3232
  }, m) {
3199
3233
  z(() => {
3200
- hn(), pn();
3234
+ yn(), gn();
3201
3235
  }, []);
3202
- const d = x(null), k = x(i);
3203
- k.current = i;
3204
- const y = $(() => {
3205
- if (bt(t)) return "";
3236
+ const d = x(null), S = x(i);
3237
+ S.current = i;
3238
+ const y = j(() => {
3239
+ if (_t(t)) return "";
3206
3240
  try {
3207
3241
  return JSON.stringify(t);
3208
3242
  } catch {
3209
3243
  return String(t);
3210
3244
  }
3211
- }, [t]), T = $(() => {
3245
+ }, [t]), T = j(() => {
3212
3246
  if (!y)
3213
3247
  return { surfaces: [], processor: null };
3214
3248
  try {
3215
- const p = JSON.parse(y), S = new fn([Gn()]), N = ni(p, {
3249
+ const p = JSON.parse(y), k = new hn([Yn()]), I = oi(p, {
3216
3250
  surfaceId: n,
3217
- catalogId: Kn
3251
+ catalogId: Gn
3218
3252
  });
3219
- return S.processMessages(N), {
3220
- surfaces: Array.from(S.model.surfacesMap.values()),
3221
- processor: S
3253
+ return k.processMessages(I), {
3254
+ surfaces: Array.from(k.model.surfacesMap.values()),
3255
+ processor: k
3222
3256
  };
3223
3257
  } catch (p) {
3224
3258
  return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", p), { surfaces: [], processor: null };
3225
3259
  }
3226
3260
  }, [y, n]), { surfaces: g, processor: C } = T;
3227
- if (d.current = C, nr(
3261
+ if (d.current = C, or(
3228
3262
  m,
3229
3263
  () => ({
3230
3264
  getValues(p) {
3231
- const S = d.current;
3232
- if (!S) return {};
3233
- const N = (p ?? k.current).map((O) => O.trim()).filter(Boolean);
3234
- return si(S, n, N);
3265
+ const k = d.current;
3266
+ if (!k) return {};
3267
+ const I = (p ?? S.current).map((O) => O.trim()).filter(Boolean);
3268
+ return li(k, n, I);
3235
3269
  },
3236
3270
  setValues(p) {
3237
- const S = d.current;
3238
- if (!S) return;
3239
- const N = S.model.surfacesMap.get(n);
3240
- if (N)
3241
- for (const [O, F] of Object.entries(p)) {
3242
- const j = O.trim();
3243
- j && N.dataModel.set(`/${j}`, F);
3271
+ const k = d.current;
3272
+ if (!k) return;
3273
+ const I = k.model.surfacesMap.get(n);
3274
+ if (I)
3275
+ for (const [O, M] of Object.entries(p)) {
3276
+ const $ = O.trim();
3277
+ $ && I.dataModel.set(`/${$}`, M);
3244
3278
  }
3245
3279
  }
3246
3280
  }),
3247
3281
  [n]
3248
3282
  ), g.length === 0) {
3249
- const p = /* @__PURE__ */ c(St, { onUploadingChange: l, children: /* @__PURE__ */ c(gt, { resumeSearch: s, children: /* @__PURE__ */ c(ht, { caseSearch: a, children: /* @__PURE__ */ c(pt, { interactive: o, children: r }) }) }) });
3250
- return u ? /* @__PURE__ */ c(Fe, { children: p }) : p;
3283
+ const p = /* @__PURE__ */ u(Tt, { onUploadingChange: l, children: /* @__PURE__ */ u(kt, { resumeSearch: s, children: /* @__PURE__ */ u(St, { caseSearch: a, children: /* @__PURE__ */ u(bt, { interactive: o, children: r }) }) }) });
3284
+ return c ? /* @__PURE__ */ u(Me, { children: p }) : p;
3251
3285
  }
3252
- const v = /* @__PURE__ */ c(St, { onUploadingChange: l, children: /* @__PURE__ */ c(gt, { resumeSearch: s, children: /* @__PURE__ */ c(ht, { caseSearch: a, children: /* @__PURE__ */ c(pt, { interactive: o, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: g.map((p) => /* @__PURE__ */ c(dn, { surface: p }, p.id)) }) }) }) }) });
3253
- return u ? /* @__PURE__ */ c(Fe, { children: v }) : v;
3286
+ const v = /* @__PURE__ */ u(Tt, { onUploadingChange: l, children: /* @__PURE__ */ u(kt, { resumeSearch: s, children: /* @__PURE__ */ u(St, { caseSearch: a, children: /* @__PURE__ */ u(bt, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: g.map((p) => /* @__PURE__ */ u(pn, { surface: p }, p.id)) }) }) }) }) });
3287
+ return c ? /* @__PURE__ */ u(Me, { children: v }) : v;
3254
3288
  }
3255
3289
  );
3256
- function Oe() {
3257
- return new fn([Gn()]);
3290
+ function Be() {
3291
+ return new hn([Yn()]);
3258
3292
  }
3259
- function ta({
3293
+ function ia({
3260
3294
  messages: e,
3261
3295
  surfaceId: t = "skopon-form-stream",
3262
3296
  emptyHint: n = null,
@@ -3265,21 +3299,21 @@ function ta({
3265
3299
  caseSearch: i = null
3266
3300
  }) {
3267
3301
  z(() => {
3268
- hn(), pn();
3302
+ yn(), gn();
3269
3303
  }, []);
3270
3304
  const s = x(null);
3271
- s.current === null && (s.current = Oe());
3272
- const a = x(0), l = x(""), u = x(!0), m = x(t);
3305
+ s.current === null && (s.current = Be());
3306
+ const a = x(0), l = x(""), c = x(!0), m = x(t);
3273
3307
  function d(v, p) {
3274
- s.current = v, a.current = p.length, l.current = JSON.stringify(p), u.current && (T(v), C(Array.from(v.model.surfacesMap.values())));
3308
+ s.current = v, a.current = p.length, l.current = JSON.stringify(p), c.current && (T(v), C(Array.from(v.model.surfacesMap.values())));
3275
3309
  }
3276
- function k(v, p) {
3310
+ function S(v, p) {
3277
3311
  if (p <= 0) return !1;
3278
- const S = JSON.stringify(v.slice(0, p)), N = l.current;
3279
- if (!N) return !0;
3312
+ const k = JSON.stringify(v.slice(0, p)), I = l.current;
3313
+ if (!I) return !0;
3280
3314
  try {
3281
- const O = JSON.parse(N);
3282
- return JSON.stringify(O.slice(0, p)) !== S;
3315
+ const O = JSON.parse(I);
3316
+ return JSON.stringify(O.slice(0, p)) !== k;
3283
3317
  } catch {
3284
3318
  return !0;
3285
3319
  }
@@ -3291,57 +3325,57 @@ function ta({
3291
3325
  s.current.model.surfacesMap.values()
3292
3326
  )
3293
3327
  );
3294
- return z(() => (u.current = !0, () => {
3295
- u.current = !1;
3328
+ return z(() => (c.current = !0, () => {
3329
+ c.current = !1;
3296
3330
  }), []), z(() => {
3297
3331
  s.current = y;
3298
3332
  }, [y]), z(() => {
3299
3333
  const v = () => {
3300
- u.current && C(Array.from(y.model.surfacesMap.values()));
3301
- }, p = y.onSurfaceCreated(v), S = y.onSurfaceDeleted(v);
3334
+ c.current && C(Array.from(y.model.surfacesMap.values()));
3335
+ }, p = y.onSurfaceCreated(v), k = y.onSurfaceDeleted(v);
3302
3336
  return () => {
3303
- p.unsubscribe(), S.unsubscribe();
3337
+ p.unsubscribe(), k.unsubscribe();
3304
3338
  };
3305
3339
  }, [y]), z(() => {
3306
3340
  let v = !1;
3307
3341
  const p = m.current !== t;
3308
3342
  if (m.current = t, p) {
3309
- const F = Oe();
3310
- return Array.isArray(e) && e.length > 0 ? (F.processMessages(e), v || d(F, e)) : (s.current = F, a.current = 0, l.current = "", v || (T(F), C([]))), () => {
3343
+ const M = Be();
3344
+ return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), v || d(M, e)) : (s.current = M, a.current = 0, l.current = "", v || (T(M), C([]))), () => {
3311
3345
  v = !0;
3312
3346
  };
3313
3347
  }
3314
3348
  if (!Array.isArray(e) || e.length === 0) {
3315
3349
  if (a.current > 0) {
3316
- const F = Oe();
3317
- s.current = F, a.current = 0, l.current = "", v || (T(F), C([]));
3350
+ const M = Be();
3351
+ s.current = M, a.current = 0, l.current = "", v || (T(M), C([]));
3318
3352
  }
3319
3353
  return () => {
3320
3354
  v = !0;
3321
3355
  };
3322
3356
  }
3323
- const S = s.current, N = a.current;
3324
- if (e.length < N || k(e, N)) {
3325
- const F = Oe();
3326
- return F.processMessages(e), v || d(F, e), () => {
3357
+ const k = s.current, I = a.current;
3358
+ if (e.length < I || S(e, I)) {
3359
+ const M = Be();
3360
+ return M.processMessages(e), v || d(M, e), () => {
3327
3361
  v = !0;
3328
3362
  };
3329
3363
  }
3330
- const O = e.slice(N);
3364
+ const O = e.slice(I);
3331
3365
  return O.length === 0 ? () => {
3332
3366
  v = !0;
3333
- } : (S.processMessages(O), a.current = e.length, l.current = JSON.stringify(e), v || C(Array.from(S.model.surfacesMap.values())), () => {
3367
+ } : (k.processMessages(O), a.current = e.length, l.current = JSON.stringify(e), v || C(Array.from(k.model.surfacesMap.values())), () => {
3334
3368
  v = !0;
3335
3369
  });
3336
- }, [e, t]), g.length === 0 ? /* @__PURE__ */ c(Fe, { children: n }) : /* @__PURE__ */ c(Fe, { children: /* @__PURE__ */ c(St, { children: /* @__PURE__ */ c(gt, { resumeSearch: o, children: /* @__PURE__ */ c(ht, { caseSearch: i, children: /* @__PURE__ */ c(pt, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: g.map((v) => /* @__PURE__ */ c(dn, { surface: v }, v.id)) }) }) }) }) }) });
3370
+ }, [e, t]), g.length === 0 ? /* @__PURE__ */ u(Me, { children: n }) : /* @__PURE__ */ u(Me, { children: /* @__PURE__ */ u(Tt, { children: /* @__PURE__ */ u(kt, { resumeSearch: o, children: /* @__PURE__ */ u(St, { caseSearch: i, children: /* @__PURE__ */ u(bt, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: g.map((v) => /* @__PURE__ */ u(pn, { surface: v }, v.id)) }) }) }) }) }) });
3337
3371
  }
3338
- const vs = 100, bs = 3e4, Ss = 1500, ye = /* @__PURE__ */ new Map();
3339
- function ks(e) {
3372
+ const Cs = 100, As = 3e4, _s = 1500, ye = /* @__PURE__ */ new Map();
3373
+ function Ts(e) {
3340
3374
  const t = e.trim();
3341
3375
  let n = ye.get(t);
3342
- return n || (n = new Cs(t), ye.set(t, n)), n.acquire(), n;
3376
+ return n || (n = new xs(t), ye.set(t, n)), n.acquire(), n;
3343
3377
  }
3344
- class Cs {
3378
+ class xs {
3345
3379
  constructor(t) {
3346
3380
  X(this, "url");
3347
3381
  X(this, "ws", null);
@@ -3360,7 +3394,7 @@ class Cs {
3360
3394
  release() {
3361
3395
  this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
3362
3396
  this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), ye.get(this.url) === this && ye.delete(this.url));
3363
- }, Ss));
3397
+ }, _s));
3364
3398
  }
3365
3399
  /** 强制关闭(测试用),跳过宽限期。 */
3366
3400
  forceClose() {
@@ -3433,7 +3467,7 @@ class Cs {
3433
3467
  }
3434
3468
  }
3435
3469
  enqueue(t) {
3436
- for (this.sendQueue.push(t); this.sendQueue.length > vs; )
3470
+ for (this.sendQueue.push(t); this.sendQueue.length > Cs; )
3437
3471
  this.sendQueue.shift();
3438
3472
  }
3439
3473
  flushQueue() {
@@ -3447,7 +3481,7 @@ class Cs {
3447
3481
  if (!this.connectRequested || this.refCount <= 0) return;
3448
3482
  this.clearReconnectTimer();
3449
3483
  const t = Math.min(
3450
- bs,
3484
+ As,
3451
3485
  1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
3452
3486
  );
3453
3487
  this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
@@ -3485,13 +3519,13 @@ class Cs {
3485
3519
  }
3486
3520
  }
3487
3521
  }
3488
- class As {
3522
+ class Fs {
3489
3523
  constructor(t) {
3490
3524
  X(this, "askUserMessageId");
3491
3525
  X(this, "connection");
3492
3526
  X(this, "unsubscribe");
3493
3527
  X(this, "closed", !1);
3494
- this.askUserMessageId = t.askUserMessageId.trim(), this.connection = ks(t.url);
3528
+ this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Ts(t.url);
3495
3529
  const n = t.onAutoControl;
3496
3530
  this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
3497
3531
  };
@@ -3506,24 +3540,24 @@ class As {
3506
3540
  this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
3507
3541
  }
3508
3542
  }
3509
- function Jn(e) {
3543
+ function Qn(e) {
3510
3544
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3511
3545
  }
3512
- function _s(e, t) {
3546
+ function Ms(e, t) {
3513
3547
  if (!e) return !1;
3514
- const n = e.querySelector(`[data-skopon-field="${Jn(t)}"]`);
3548
+ const n = e.querySelector(`[data-skopon-field="${Qn(t)}"]`);
3515
3549
  return n instanceof HTMLElement ? ((n.querySelector(
3516
3550
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
3517
3551
  ) ?? n).focus(), !0) : !1;
3518
3552
  }
3519
- function Ts(e, t) {
3553
+ function Is(e, t) {
3520
3554
  if (!e) return !1;
3521
- const n = e.querySelector(`[data-skopon-field="${Jn(t)}"]`);
3555
+ const n = e.querySelector(`[data-skopon-field="${Qn(t)}"]`);
3522
3556
  return n instanceof HTMLElement ? ((n.querySelector(
3523
3557
  'button, [role="button"], .skopon-resume-select-card, input, label'
3524
3558
  ) ?? n).click(), !0) : !1;
3525
3559
  }
3526
- function xs(e, t, n) {
3560
+ function Ns(e, t, n) {
3527
3561
  const r = e.action;
3528
3562
  if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
3529
3563
  console.warn("[FormAutoControl] unknown action", r);
@@ -3553,47 +3587,47 @@ function xs(e, t, n) {
3553
3587
  return;
3554
3588
  }
3555
3589
  if (r === "focus") {
3556
- _s(t.rootElement, o), n.reportEvent({
3590
+ Ms(t.rootElement, o), n.reportEvent({
3557
3591
  action: "focus",
3558
3592
  component: i,
3559
3593
  field: o
3560
3594
  });
3561
3595
  return;
3562
3596
  }
3563
- Ts(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3597
+ Is(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3564
3598
  });
3565
3599
  }
3566
- function Ms(e) {
3600
+ function Es(e) {
3567
3601
  const t = {};
3568
3602
  for (const [n, r] of Object.entries(e))
3569
3603
  r !== void 0 && (t[n] = r);
3570
3604
  return t;
3571
3605
  }
3572
- function Fs(e, t) {
3606
+ function Us(e, t) {
3573
3607
  var o;
3574
3608
  const n = (o = e.name) == null ? void 0 : o.trim();
3575
3609
  if (!n || !t) return { ...e };
3576
3610
  const r = t.get(n);
3577
3611
  return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
3578
3612
  }
3579
- function Ns(e) {
3613
+ function ws(e) {
3580
3614
  var i, s;
3581
3615
  const n = {
3582
3616
  blocks: (e.blocks ?? []).map(
3583
- (a) => Fs(a, e.liveOptions)
3617
+ (a) => Us(a, e.liveOptions)
3584
3618
  )
3585
3619
  }, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
3586
3620
  return r && (n.title = r), o && (n.description = o), {
3587
3621
  form_schema: n,
3588
- form_values: Ms(e.values ?? {}),
3622
+ form_values: Es(e.values ?? {}),
3589
3623
  form_change: [...e.formChange ?? []]
3590
3624
  };
3591
3625
  }
3592
- function Is(e) {
3593
- const t = He(e);
3626
+ function Rs(e) {
3627
+ const t = Ke(e);
3594
3628
  return t ? je(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3595
3629
  }
3596
- function Es({
3630
+ function Ps({
3597
3631
  payload: e,
3598
3632
  callbackUrl: t,
3599
3633
  title: n,
@@ -3603,17 +3637,17 @@ function Es({
3603
3637
  submitHeaders: s,
3604
3638
  onNotify: a
3605
3639
  }) {
3606
- const [l, u] = w(!1), m = x(!0);
3640
+ const [l, c] = w(!1), m = x(!0);
3607
3641
  z(() => (m.current = !0, () => {
3608
3642
  m.current = !1;
3609
3643
  }), []);
3610
- const d = $(
3611
- () => Ut(s),
3644
+ const d = j(
3645
+ () => Rt(s),
3612
3646
  [s]
3613
- ), k = $(
3614
- () => On(e, t, d),
3647
+ ), S = j(
3648
+ () => Ln(e, t, d),
3615
3649
  [e, t, d]
3616
- ), y = $(
3650
+ ), y = j(
3617
3651
  () => ({
3618
3652
  ...i,
3619
3653
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
@@ -3622,36 +3656,36 @@ function Es({
3622
3656
  );
3623
3657
  async function T() {
3624
3658
  if (!l) {
3625
- u(!0);
3659
+ c(!0);
3626
3660
  try {
3627
- const g = Is(e), C = Pt({
3661
+ const g = Rs(e), C = Ot({
3628
3662
  context: y,
3629
3663
  payload: e,
3630
3664
  answer: g
3631
- }), v = await Vn(C, {
3665
+ }), v = await jn(C, {
3632
3666
  headers: d
3633
3667
  });
3634
3668
  if (!m.current) return;
3635
- const p = Ln(v);
3669
+ const p = $n(v);
3636
3670
  a == null || a(p.type, p.message);
3637
3671
  } catch (g) {
3638
3672
  if (!m.current) return;
3639
3673
  const C = g instanceof Error ? g.message : "提交失败";
3640
3674
  a == null || a("error", C);
3641
3675
  } finally {
3642
- m.current && u(!1);
3676
+ m.current && c(!1);
3643
3677
  }
3644
3678
  }
3645
3679
  }
3646
3680
  return /* @__PURE__ */ U("div", { className: "ask-user-curl-card", children: [
3647
3681
  /* @__PURE__ */ U("div", { className: "ask-user-curl-card-header", children: [
3648
3682
  /* @__PURE__ */ U("div", { className: "ask-user-curl-card-header-title", children: [
3649
- /* @__PURE__ */ c(re.Text, { type: "secondary", children: n ?? "curl 命令" }),
3650
- r ? /* @__PURE__ */ c(ve, { title: r, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3651
- o ? /* @__PURE__ */ c(ve, { title: o, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3683
+ /* @__PURE__ */ u(re.Text, { type: "secondary", children: n ?? "curl 命令" }),
3684
+ r ? /* @__PURE__ */ u(ve, { title: r, children: /* @__PURE__ */ u(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3685
+ o ? /* @__PURE__ */ u(ve, { title: o, children: /* @__PURE__ */ u(Ae, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3652
3686
  ] }),
3653
- /* @__PURE__ */ c(ve, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ c(
3654
- Ne,
3687
+ /* @__PURE__ */ u(ve, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ u(
3688
+ Ie,
3655
3689
  {
3656
3690
  size: "small",
3657
3691
  type: "text",
@@ -3662,11 +3696,11 @@ function Es({
3662
3696
  }
3663
3697
  ) })
3664
3698
  ] }),
3665
- /* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: k })
3699
+ /* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: S })
3666
3700
  ] });
3667
3701
  }
3668
- const Us = 80;
3669
- function ws(e, t) {
3702
+ const zs = 80;
3703
+ function Os(e, t) {
3670
3704
  if (t && typeof t == "object" && t !== null && "message" in t) {
3671
3705
  const n = t.message;
3672
3706
  if (typeof n == "string" && n.trim())
@@ -3674,7 +3708,7 @@ function ws(e, t) {
3674
3708
  }
3675
3709
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
3676
3710
  }
3677
- function Rs({
3711
+ function Bs({
3678
3712
  payload: e,
3679
3713
  formUniqueId: t,
3680
3714
  askUserMessageId: n,
@@ -3684,25 +3718,25 @@ function Rs({
3684
3718
  submitHeaders: s,
3685
3719
  fetchFormDetail: a,
3686
3720
  onNotify: l,
3687
- resumeSearch: u = null,
3721
+ resumeSearch: c = null,
3688
3722
  caseSearch: m = null,
3689
3723
  onSurfaceReadyChange: d,
3690
- onAutoControlReady: k
3724
+ onAutoControlReady: S
3691
3725
  }) {
3692
- const [y, T] = w(null), [g, C] = w(!1), [v, p] = w(!0), [S, N] = w(!1), [O, F] = w(!1), j = x(null), H = x(null), I = x(!0), A = x(l);
3726
+ const [y, T] = w(null), [g, C] = w(!1), [v, p] = w(!0), [k, I] = w(!1), [O, M] = w(!1), $ = x(null), H = x(null), N = x(!0), A = x(l);
3693
3727
  A.current = l;
3694
- const Y = Tn(), G = _t(), W = x(""), q = x(null), D = (t == null ? void 0 : t.trim()) ?? "", ie = (n == null ? void 0 : n.trim()) ?? "", oe = $(
3695
- () => Ut(s),
3728
+ const Y = Fn(), G = It(), W = x(""), L = x(null), D = (t == null ? void 0 : t.trim()) ?? "", ie = (n == null ? void 0 : n.trim()) ?? "", oe = j(
3729
+ () => Rt(s),
3696
3730
  [s]
3697
- ), _ = $(
3731
+ ), _ = j(
3698
3732
  () => ({
3699
3733
  ...i,
3700
3734
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? r ?? null
3701
3735
  }),
3702
3736
  [i, r]
3703
3737
  );
3704
- z(() => (I.current = !0, () => {
3705
- I.current = !1, q.current != null && (clearTimeout(q.current), q.current = null);
3738
+ z(() => (N.current = !0, () => {
3739
+ N.current = !1, L.current != null && (clearTimeout(L.current), L.current = null);
3706
3740
  }), []), z(() => {
3707
3741
  let P = !1;
3708
3742
  return D ? (p(!0), C(!1), a({ formUniqueId: D }).then((V) => {
@@ -3722,93 +3756,93 @@ function Rs({
3722
3756
  P = !0;
3723
3757
  });
3724
3758
  }, [D, a]);
3725
- const h = $(() => He(e), [e]), b = $(() => h ? mi(h, y ?? void 0) : null, [h, y]), R = (b == null ? void 0 : b.matchedBlocks) ?? [], M = !!(h && di(h) && R.length === 0), E = $(() => M && h ? fi(h) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, M, h]), J = $(() => {
3726
- if (M && h)
3727
- return pi(h);
3759
+ const h = j(() => Ke(e), [e]), b = j(() => h ? fi(h, y ?? void 0) : null, [h, y]), R = (b == null ? void 0 : b.matchedBlocks) ?? [], F = !!(h && pi(h) && R.length === 0), E = j(() => F && h ? hi(h) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, F, h]), J = j(() => {
3760
+ if (F && h)
3761
+ return gi(h);
3728
3762
  const P = je((b == null ? void 0 : b.extraBlocks) ?? []);
3729
3763
  return { ...je(
3730
3764
  ((b == null ? void 0 : b.matchedBlocks) ?? []).filter(
3731
3765
  (Q) => Q.type === "text" && Q.hidden === !0
3732
3766
  )
3733
3767
  ), ...P };
3734
- }, [M, h, b]), te = $(
3768
+ }, [F, h, b]), te = j(
3735
3769
  () => E.filter((P) => {
3736
3770
  var V;
3737
3771
  return ee(P.type) && ((V = P.name) == null ? void 0 : V.trim());
3738
3772
  }).map((P) => P.name.trim()),
3739
3773
  [E]
3740
- ), se = (b == null ? void 0 : b.title) ?? (h == null ? void 0 : h.title) ?? "", pe = (b == null ? void 0 : b.description) ?? (h == null ? void 0 : h.description) ?? "", he = $(() => E.length === 0 ? null : oi(
3774
+ ), se = (b == null ? void 0 : b.title) ?? (h == null ? void 0 : h.title) ?? "", pe = (b == null ? void 0 : b.description) ?? (h == null ? void 0 : h.description) ?? "", he = j(() => E.length === 0 ? null : si(
3741
3775
  { title: se, description: pe },
3742
3776
  E
3743
- ), [se, pe, E]), Je = $(() => {
3777
+ ), [se, pe, E]), Ze = j(() => {
3744
3778
  if (!he) return "";
3745
3779
  try {
3746
3780
  return JSON.stringify(he);
3747
3781
  } catch {
3748
3782
  return String(he);
3749
3783
  }
3750
- }, [he]), Ye = D ? `ask-user-${D}` : "ask-user-payload", ae = !!(!v && h && E.length > 0 && he);
3784
+ }, [he]), et = D ? `ask-user-${D}` : "ask-user-payload", ae = !!(!v && h && E.length > 0 && he);
3751
3785
  z(() => (d(ae), () => d(!1)), [ae, d]);
3752
- const Ot = L(() => {
3786
+ const Lt = q(() => {
3753
3787
  var V;
3754
- return { ...((V = j.current) == null ? void 0 : V.getValues(te)) ?? {}, ...J };
3755
- }, [te, J]), Bt = x(G.liveOptions);
3756
- Bt.current = G.liveOptions;
3757
- const Qe = x(G.pendingChangeFields);
3758
- Qe.current = G.pendingChangeFields;
3759
- const ke = L(
3788
+ return { ...((V = $.current) == null ? void 0 : V.getValues(te)) ?? {}, ...J };
3789
+ }, [te, J]), qt = x(G.liveOptions);
3790
+ qt.current = G.liveOptions;
3791
+ const tt = x(G.pendingChangeFields);
3792
+ tt.current = G.pendingChangeFields;
3793
+ const ke = q(
3760
3794
  (P) => {
3761
- const V = Ns({
3795
+ const V = ws({
3762
3796
  title: se,
3763
3797
  description: pe,
3764
3798
  blocks: E,
3765
- values: Ot(),
3766
- liveOptions: Bt.current,
3799
+ values: Lt(),
3800
+ liveOptions: qt.current,
3767
3801
  formChange: P
3768
3802
  });
3769
3803
  Y.reportData(V);
3770
3804
  },
3771
- [se, pe, E, Ot, Y]
3772
- ), Xe = x(ke);
3773
- Xe.current = ke, z(() => {
3805
+ [se, pe, E, Lt, Y]
3806
+ ), nt = x(ke);
3807
+ nt.current = ke, z(() => {
3774
3808
  if (!ae) {
3775
3809
  W.current = "";
3776
3810
  return;
3777
3811
  }
3778
- if (!Je) return;
3779
- const P = `${Ye}::${Je}`;
3812
+ if (!Ze) return;
3813
+ const P = `${et}::${Ze}`;
3780
3814
  if (W.current === P) return;
3781
3815
  const V = setTimeout(() => {
3782
- I.current && W.current !== P && (W.current = P, Xe.current([]));
3816
+ N.current && W.current !== P && (W.current = P, nt.current([]));
3783
3817
  }, 0);
3784
3818
  return () => clearTimeout(V);
3785
- }, [ae, Ye, Je]), z(() => {
3786
- if (!(!ae || G.version === 0) && Qe.current.length !== 0)
3787
- return q.current != null && clearTimeout(q.current), q.current = setTimeout(() => {
3788
- if (q.current = null, !I.current) return;
3789
- const P = [...Qe.current];
3790
- G.clearPendingChangeFields(), P.length !== 0 && Xe.current(P);
3791
- }, Us), () => {
3792
- q.current != null && (clearTimeout(q.current), q.current = null);
3819
+ }, [ae, et, Ze]), z(() => {
3820
+ if (!(!ae || G.version === 0) && tt.current.length !== 0)
3821
+ return L.current != null && clearTimeout(L.current), L.current = setTimeout(() => {
3822
+ if (L.current = null, !N.current) return;
3823
+ const P = [...tt.current];
3824
+ G.clearPendingChangeFields(), P.length !== 0 && nt.current(P);
3825
+ }, zs), () => {
3826
+ L.current != null && (clearTimeout(L.current), L.current = null);
3793
3827
  };
3794
3828
  }, [ae, G.version, G.clearPendingChangeFields]);
3795
- const Ze = L(async () => {
3796
- var P, V, Q, Pe, Vt, jt, $t, Dt, Ht;
3797
- if (!S) {
3829
+ const rt = q(async () => {
3830
+ var P, V, Q, Pe, jt, Dt, Ht, Kt, Wt;
3831
+ if (!k) {
3798
3832
  if (O) {
3799
3833
  (P = A.current) == null || P.call(A, "error", "文件正在上传,请稍候");
3800
3834
  return;
3801
3835
  }
3802
- N(!0);
3836
+ I(!0);
3803
3837
  try {
3804
- const Ce = { ...((V = j.current) == null ? void 0 : V.getValues(te)) ?? {}, ...J }, Kt = Oi(E, Ce);
3805
- if (Kt) {
3806
- (Q = A.current) == null || Q.call(A, "error", Kt.message);
3838
+ const Ce = { ...((V = $.current) == null ? void 0 : V.getValues(te)) ?? {}, ...J }, Gt = Vi(E, Ce);
3839
+ if (Gt) {
3840
+ (Q = A.current) == null || Q.call(A, "error", Gt.message);
3807
3841
  return;
3808
3842
  }
3809
3843
  if (o === "post") {
3810
- const Yt = (r ?? "").trim();
3811
- if (!Yt) {
3844
+ const Xt = (r ?? "").trim();
3845
+ if (!Xt) {
3812
3846
  (Pe = A.current) == null || Pe.call(A, "error", "callback_url 为空,无法提交");
3813
3847
  return;
3814
3848
  }
@@ -3816,47 +3850,47 @@ function Rs({
3816
3850
  action: "submit",
3817
3851
  component: "SubmitButton"
3818
3852
  });
3819
- const tt = await Bn(Yt, Ce, {
3853
+ const it = await qn(Xt, Ce, {
3820
3854
  headers: oe
3821
3855
  });
3822
- if (!I.current) return;
3823
- tt.ok ? (Vt = A.current) == null || Vt.call(A, "success", "提交成功") : (jt = A.current) == null || jt.call(A, "error", ws(tt.status, tt.body));
3856
+ if (!N.current) return;
3857
+ it.ok ? (jt = A.current) == null || jt.call(A, "success", "提交成功") : (Dt = A.current) == null || Dt.call(A, "error", Os(it.status, it.body));
3824
3858
  return;
3825
3859
  }
3826
- const Yn = E.length > 0 ? {
3860
+ const Xn = E.length > 0 ? {
3827
3861
  title: se,
3828
3862
  description: pe,
3829
3863
  blocks: E
3830
- } : h ?? void 0, Wt = Pt({
3864
+ } : h ?? void 0, Jt = Ot({
3831
3865
  context: _,
3832
3866
  payload: e,
3833
- form: Yn,
3867
+ form: Xn,
3834
3868
  answer: Ce
3835
- }), Gt = zt(Wt);
3836
- if (Gt) {
3837
- ($t = A.current) == null || $t.call(A, "error", Gt);
3869
+ }), Yt = Bt(Jt);
3870
+ if (Yt) {
3871
+ (Ht = A.current) == null || Ht.call(A, "error", Yt);
3838
3872
  return;
3839
3873
  }
3840
3874
  ke([]), Y.reportEvent({
3841
3875
  action: "submit",
3842
3876
  component: "SubmitButton"
3843
3877
  });
3844
- const Qn = await Vn(Wt, {
3878
+ const Zn = await jn(Jt, {
3845
3879
  headers: oe
3846
3880
  });
3847
- if (!I.current) return;
3848
- const Jt = Ln(Qn);
3849
- (Dt = A.current) == null || Dt.call(A, Jt.type, Jt.message);
3850
- } catch (et) {
3851
- if (!I.current) return;
3852
- const Ce = et instanceof Error ? et.message : "提交失败";
3853
- (Ht = A.current) == null || Ht.call(A, "error", Ce);
3881
+ if (!N.current) return;
3882
+ const Qt = $n(Zn);
3883
+ (Kt = A.current) == null || Kt.call(A, Qt.type, Qt.message);
3884
+ } catch (ot) {
3885
+ if (!N.current) return;
3886
+ const Ce = ot instanceof Error ? ot.message : "提交失败";
3887
+ (Wt = A.current) == null || Wt.call(A, "error", Ce);
3854
3888
  } finally {
3855
- I.current && N(!1);
3889
+ N.current && I(!1);
3856
3890
  }
3857
3891
  }
3858
3892
  }, [
3859
- S,
3893
+ k,
3860
3894
  O,
3861
3895
  te,
3862
3896
  E,
@@ -3871,22 +3905,22 @@ function Rs({
3871
3905
  _,
3872
3906
  e,
3873
3907
  h
3874
- ]), qt = x(Ze);
3875
- qt.current = Ze;
3876
- const Lt = L(
3908
+ ]), Vt = x(rt);
3909
+ Vt.current = rt;
3910
+ const $t = q(
3877
3911
  (P) => {
3878
- xs(
3912
+ Ns(
3879
3913
  P,
3880
3914
  {
3881
3915
  setValues: (V) => {
3882
3916
  var Q;
3883
- return (Q = j.current) == null ? void 0 : Q.setValues(V);
3917
+ return (Q = $.current) == null ? void 0 : Q.setValues(V);
3884
3918
  },
3885
3919
  getValues: (V) => {
3886
3920
  var Q;
3887
- return ((Q = j.current) == null ? void 0 : Q.getValues(V)) ?? {};
3921
+ return ((Q = $.current) == null ? void 0 : Q.getValues(V)) ?? {};
3888
3922
  },
3889
- submit: () => qt.current(),
3923
+ submit: () => Vt.current(),
3890
3924
  rootElement: H.current
3891
3925
  },
3892
3926
  {
@@ -3899,12 +3933,12 @@ function Rs({
3899
3933
  );
3900
3934
  return z(() => {
3901
3935
  if (!ae) {
3902
- k(null);
3936
+ S(null);
3903
3937
  return;
3904
3938
  }
3905
- return k(Lt), () => k(null);
3906
- }, [ae, Lt, k]), v ? /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c(kt, { size: "small" }) }) : !h || E.length === 0 ? /* @__PURE__ */ c(
3907
- Es,
3939
+ return S($t), () => S(null);
3940
+ }, [ae, $t, S]), v ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(xt, { size: "small" }) }) : !h || E.length === 0 ? /* @__PURE__ */ u(
3941
+ Ps,
3908
3942
  {
3909
3943
  payload: e,
3910
3944
  callbackUrl: r,
@@ -3920,33 +3954,33 @@ function Rs({
3920
3954
  ref: H,
3921
3955
  "data-ask-user-message-id": ie || void 0,
3922
3956
  children: [
3923
- g && D ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(ve, { title: D, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3924
- /* @__PURE__ */ c(
3925
- ys,
3957
+ g && D ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(ve, { title: D, children: /* @__PURE__ */ u(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3958
+ /* @__PURE__ */ u(
3959
+ ks,
3926
3960
  {
3927
- ref: j,
3961
+ ref: $,
3928
3962
  doc: he,
3929
- surfaceId: Ye,
3963
+ surfaceId: et,
3930
3964
  fieldNames: te,
3931
3965
  interactive: !0,
3932
3966
  wrapProvider: !1,
3933
- resumeSearch: u,
3967
+ resumeSearch: c,
3934
3968
  caseSearch: m,
3935
- onUploadingChange: F
3969
+ onUploadingChange: M
3936
3970
  }
3937
3971
  ),
3938
- /* @__PURE__ */ c("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ c(
3972
+ /* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
3939
3973
  ve,
3940
3974
  {
3941
3975
  title: o === "post" ? "提交 JSON 到 callback_url" : "提交到 answer_agent_callback_url",
3942
- children: /* @__PURE__ */ c(
3943
- Ne,
3976
+ children: /* @__PURE__ */ u(
3977
+ Ie,
3944
3978
  {
3945
3979
  type: "primary",
3946
3980
  size: "small",
3947
- loading: S,
3948
- disabled: S || O,
3949
- onClick: () => void Ze(),
3981
+ loading: k,
3982
+ disabled: k || O,
3983
+ onClick: () => void rt(),
3950
3984
  children: "提交"
3951
3985
  }
3952
3986
  )
@@ -3956,16 +3990,16 @@ function Rs({
3956
3990
  }
3957
3991
  );
3958
3992
  }
3959
- function na(e) {
3960
- var u;
3961
- const t = ((u = e.askUserMessageId) == null ? void 0 : u.trim()) ?? "", n = $(() => Ai(), []), [r, o] = w(!1), i = x(null), s = L((m) => {
3993
+ function sa(e) {
3994
+ var c;
3995
+ const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = j(() => Fi(), []), [r, o] = w(!1), i = x(null), s = q((m) => {
3962
3996
  o(m);
3963
- }, []), a = L(
3997
+ }, []), a = q(
3964
3998
  (m) => {
3965
3999
  i.current = m;
3966
4000
  },
3967
4001
  []
3968
- ), l = $(() => !n || !t ? null : new As({
4002
+ ), l = j(() => !n || !t ? null : new Fs({
3969
4003
  url: n,
3970
4004
  askUserMessageId: t,
3971
4005
  onAutoControl: (m) => {
@@ -3980,8 +4014,8 @@ function na(e) {
3980
4014
  };
3981
4015
  }, [l]), z(() => {
3982
4016
  !l || !r || l.connect();
3983
- }, [l, r]), /* @__PURE__ */ c(Fe, { children: /* @__PURE__ */ c(uo, { client: l, children: /* @__PURE__ */ c(so, { children: /* @__PURE__ */ c(
3984
- Rs,
4017
+ }, [l, r]), /* @__PURE__ */ u(Me, { children: /* @__PURE__ */ u(fo, { client: l, children: /* @__PURE__ */ u(lo, { children: /* @__PURE__ */ u(
4018
+ Bs,
3985
4019
  {
3986
4020
  ...e,
3987
4021
  onSurfaceReadyChange: s,
@@ -3990,77 +4024,80 @@ function na(e) {
3990
4024
  ) }) }) });
3991
4025
  }
3992
4026
  export {
3993
- Ks as A2UI_PROTOCOL_VERSION,
3994
- na as AskUserFormCard,
3995
- ht as CaseSearchProvider,
3996
- Es as CurlSubmitBlock,
3997
- Si as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3998
- vi as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3999
- bi as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
4000
- Nt as DEFAULT_AUTH_STORAGE_KEY,
4001
- yi as DEFAULT_AUTH_TOKEN_FIELD,
4002
- Sr as FORM_MEDIA_SIZES,
4003
- ft as FORM_WEB_DEFAULT_HEIGHT,
4004
- Cr as FORM_WEB_MAX_HEIGHT,
4005
- kr as FORM_WEB_MIN_HEIGHT,
4006
- gt as ResumeSearchProvider,
4007
- ta as SkoponA2uiStreamRenderer,
4008
- Fe as SkoponFormProvider,
4009
- ys as SkoponFormRenderer,
4010
- ti as a2uiToBlocks,
4011
- Un as blocksToA2ui,
4012
- eo as blocksToJsonSchema,
4013
- Pt as buildAnswerAgentBody,
4014
- hi as buildAskUserCurlBodyJson,
4015
- gi as buildAskUserCurlStatement,
4016
- Qs as buildAskUserSubmitCurlFromPayload,
4017
- oi as buildAskUserSurface,
4018
- On as buildCurlStatement,
4027
+ Ys as A2UI_PROTOCOL_VERSION,
4028
+ sa as AskUserFormCard,
4029
+ St as CaseSearchProvider,
4030
+ Ps as CurlSubmitBlock,
4031
+ Ai as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
4032
+ Si as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
4033
+ ki as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
4034
+ Ci as DEFAULT_AUTH_SKOPON_API_BASE_URL_FIELD,
4035
+ Ge as DEFAULT_AUTH_STORAGE_KEY,
4036
+ bi as DEFAULT_AUTH_TOKEN_FIELD,
4037
+ Oe as DEFAULT_SKOPON_API_BASE_PATH,
4038
+ Cr as FORM_MEDIA_SIZES,
4039
+ vt as FORM_WEB_DEFAULT_HEIGHT,
4040
+ _r as FORM_WEB_MAX_HEIGHT,
4041
+ Ar as FORM_WEB_MIN_HEIGHT,
4042
+ kt as ResumeSearchProvider,
4043
+ ia as SkoponA2uiStreamRenderer,
4044
+ Me as SkoponFormProvider,
4045
+ ks as SkoponFormRenderer,
4046
+ ri as a2uiToBlocks,
4047
+ Rn as blocksToA2ui,
4048
+ no as blocksToJsonSchema,
4049
+ Ot as buildAnswerAgentBody,
4050
+ yi as buildAskUserCurlBodyJson,
4051
+ vi as buildAskUserCurlStatement,
4052
+ ta as buildAskUserSubmitCurlFromPayload,
4053
+ si as buildAskUserSurface,
4054
+ Ln as buildCurlStatement,
4019
4055
  we as coerceToggleValue,
4020
- Xs as copyTextToClipboard,
4021
- Pi as createCaseSearchClient,
4022
- Js as createEmptyBlock,
4023
- Gs as createEmptyFormDefinition,
4024
- _i as createFormClient,
4025
- Ei as createResumeSearchClient,
4026
- ea as createSkoponSdkClients,
4056
+ na as copyTextToClipboard,
4057
+ Li as createCaseSearchClient,
4058
+ Zs as createEmptyBlock,
4059
+ Xs as createEmptyFormDefinition,
4060
+ Mi as createFormClient,
4061
+ Pi as createResumeSearchClient,
4062
+ oa as createSkoponSdkClients,
4027
4063
  je as extractExtraBlockValues,
4028
- si as extractSurfaceValues,
4029
- Ln as formatAnswerAgentSubmitMessage,
4030
- pi as getPayloadHiddenBlockValues,
4031
- Ys as getPayloadInputFieldNames,
4032
- fi as getPayloadRenderableBlocks,
4033
- mi as intersectPayloadBlocksWithForm,
4034
- bt as isA2uiSurfaceEmpty,
4035
- yn as isDisplayBlockType,
4064
+ li as extractSurfaceValues,
4065
+ $n as formatAnswerAgentSubmitMessage,
4066
+ gi as getPayloadHiddenBlockValues,
4067
+ ea as getPayloadInputFieldNames,
4068
+ hi as getPayloadRenderableBlocks,
4069
+ fi as intersectPayloadBlocksWithForm,
4070
+ _t as isA2uiSurfaceEmpty,
4071
+ bn as isDisplayBlockType,
4036
4072
  ee as isInputBlockType,
4037
- gn as isLayoutBlockType,
4073
+ vn as isLayoutBlockType,
4038
4074
  _e as isMediaBlockType,
4039
- vn as isOptionsBlockType,
4040
- Ar as isSupportedWebUrl,
4075
+ Sn as isOptionsBlockType,
4076
+ Tr as isSupportedWebUrl,
4041
4077
  Te as isWebBlockType,
4042
- ii as mapFormDefinitionFromDto,
4043
- $e as normalizeFormDefinition,
4078
+ ai as mapFormDefinitionFromDto,
4079
+ De as normalizeFormDefinition,
4044
4080
  ge as normalizeMultiselectCount,
4045
- Ie as normalizeWebHeight,
4046
- He as parsePayloadBlocksJson,
4047
- di as payloadHasInputBlocks,
4048
- Ci as resolveAnswerAgentCallbackUrl,
4049
- Rt as resolveClientHeaders,
4050
- Ai as resolveRealtimeWsUrl,
4051
- Xr as resolveSchemaDefaultValue,
4052
- wt as resolveSkoponAuthHeaders,
4053
- Ut as resolveSubmitAuthHeaders,
4054
- ri as resolveSurfaceFromFormDefinition,
4055
- gs as skoponAntdTheme,
4081
+ Ne as normalizeWebHeight,
4082
+ Ke as parsePayloadBlocksJson,
4083
+ pi as payloadHasInputBlocks,
4084
+ xi as resolveAnswerAgentCallbackUrl,
4085
+ zt as resolveClientHeaders,
4086
+ Fi as resolveRealtimeWsUrl,
4087
+ eo as resolveSchemaDefaultValue,
4088
+ _i as resolveSkoponApiBaseUrl,
4089
+ Pt as resolveSkoponAuthHeaders,
4090
+ Rt as resolveSubmitAuthHeaders,
4091
+ ii as resolveSurfaceFromFormDefinition,
4092
+ Ss as skoponAntdTheme,
4056
4093
  le as skoponBrandColors,
4057
- Vn as submitAnswerAgent,
4058
- Bn as submitFormJson,
4059
- Ws as supportsDefaultValue,
4060
- ni as surfaceDocToMessages,
4094
+ jn as submitAnswerAgent,
4095
+ qn as submitFormJson,
4096
+ Qs as supportsDefaultValue,
4097
+ oi as surfaceDocToMessages,
4061
4098
  xe as syncFormDefinition,
4062
- ho as useCaseSearch,
4063
- To as useResumeSearch,
4064
- zt as validateAnswerAgentBody,
4065
- Zs as validateAnswerAgentContext
4099
+ yo as useCaseSearch,
4100
+ Fo as useResumeSearch,
4101
+ Bt as validateAnswerAgentBody,
4102
+ ra as validateAnswerAgentContext
4066
4103
  };