@skopon-cool/form-sdk 0.1.5 → 0.1.6

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,15 +1,15 @@
1
1
  import './form-sdk.css';
2
2
  import { jsx as s, jsxs as x, Fragment as De } from "react/jsx-runtime";
3
- import { createContext as Pe, useContext as Ee, useCallback as W, useSyncExternalStore as ht, useMemo as O, useState as E, useRef as B, useEffect as V, forwardRef as gt, useImperativeHandle as yt } from "react";
4
- import { Spin as Ue, Button as ue, Typography as L, Avatar as vt, Tag as Z, Select as Ce, Checkbox as bt, Radio as St, Switch as kt, TimePicker as xt, DatePicker as At, Upload as ge, Input as ye, InputNumber as Tt, Tooltip as ie } from "antd";
5
- import { ReloadOutlined as Ke, FileTextOutlined as Je, UserOutlined as Ct, FileImageOutlined as It, FileExcelOutlined as Nt, FileOutlined as He, PictureOutlined as Ft, SoundOutlined as Mt, VideoCameraOutlined as Pt } from "@ant-design/icons";
6
- import { createBinderlessComponentImplementation as z, basicCatalog as le, A2uiSurface as Ye } from "@a2ui/react/v0_9";
3
+ import { createContext as Me, useContext as Ee, useCallback as W, useSyncExternalStore as bt, useMemo as z, useState as E, useRef as B, useEffect as V, forwardRef as St, useImperativeHandle as kt } from "react";
4
+ import { Spin as _e, Button as ue, Typography as L, Avatar as xt, Tag as Q, Select as Ce, Checkbox as At, Radio as Tt, Switch as Ct, TimePicker as It, DatePicker as Nt, Upload as ge, Input as ye, InputNumber as Ft, Tooltip as Z } from "antd";
5
+ import { ReloadOutlined as Ke, FileTextOutlined as Je, UserOutlined as Pt, FileImageOutlined as Mt, FileExcelOutlined as Et, FileOutlined as He, PictureOutlined as _t, SoundOutlined as Ut, VideoCameraOutlined as zt } from "@ant-design/icons";
6
+ import { createBinderlessComponentImplementation as R, basicCatalog as le, A2uiSurface as Ye } from "@a2ui/react/v0_9";
7
7
  import { z as d } from "zod";
8
- import { Catalog as Et, MessageProcessor as Xe } from "@a2ui/web_core/v0_9";
8
+ import { Catalog as Rt, MessageProcessor as Xe } from "@a2ui/web_core/v0_9";
9
9
  import { injectBasicCatalogStyles as Ge } from "@a2ui/web_core/v0_9/basic_catalog";
10
10
  import { injectStyles as We } from "@a2ui/react/styles";
11
11
  import qe from "dayjs";
12
- const Gr = "v0.9", Ut = [
12
+ const Wr = "v0.9", wt = [
13
13
  "huge",
14
14
  "large",
15
15
  "medium",
@@ -19,13 +19,13 @@ const Gr = "v0.9", Ut = [
19
19
  function Ie(e) {
20
20
  return e === "image" || e === "video" || e === "audio";
21
21
  }
22
- function _e(e) {
22
+ function Ue(e) {
23
23
  return e === "heading" || e === "paragraph";
24
24
  }
25
25
  function J(e) {
26
- return !_e(e) && !Ie(e);
26
+ return !Ue(e) && !Ie(e);
27
27
  }
28
- function _t() {
28
+ function Ot() {
29
29
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
30
30
  return crypto.randomUUID();
31
31
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -39,8 +39,8 @@ function _t() {
39
39
  return (e === "x" ? t : t & 3 | 8).toString(16);
40
40
  });
41
41
  }
42
- function ee(e) {
43
- const t = _t().replace(/-/g, "").slice(0, 8);
42
+ function te(e) {
43
+ const t = Ot().replace(/-/g, "").slice(0, 8);
44
44
  return `${e}${t}`;
45
45
  }
46
46
  const Ze = [
@@ -54,7 +54,7 @@ const Ze = [
54
54
  { value: "text/plain", label: "纯文本" },
55
55
  { value: "application/zip", label: "ZIP 压缩包" },
56
56
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
57
- ], zt = {
57
+ ], Bt = {
58
58
  "image/*": ["image/*"],
59
59
  "video/*": ["video/*"],
60
60
  "audio/*": ["audio/*"],
@@ -74,7 +74,7 @@ const Ze = [
74
74
  "text/plain": ["text/plain"],
75
75
  "application/zip": ["application/zip"],
76
76
  "application/x-rar-compressed": ["application/x-rar-compressed"]
77
- }, Rt = {
77
+ }, Vt = {
78
78
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
79
79
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
80
80
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -85,7 +85,7 @@ const Ze = [
85
85
  "text/plain": [".txt"],
86
86
  "application/zip": [".zip", ".7z"],
87
87
  "application/x-rar-compressed": [".rar"]
88
- }, wt = {
88
+ }, qt = {
89
89
  "application/msword": "office/word",
90
90
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
91
91
  "application/vnd.ms-excel": "office/excel",
@@ -118,101 +118,101 @@ const Ze = [
118
118
  { value: ".zip", label: ".zip" },
119
119
  { value: ".rar", label: ".rar" },
120
120
  { value: ".7z", label: ".7z" }
121
- ], Ot = Object.fromEntries(
121
+ ], jt = Object.fromEntries(
122
122
  Ze.map((e) => [e.value, e.label])
123
- ), Bt = Object.fromEntries(
123
+ ), Lt = Object.fromEntries(
124
124
  ze.map((e) => [e.value, e.label])
125
- ), Vt = new Set(Ze.map((e) => e.value)), qt = new Set(
125
+ ), $t = new Set(Ze.map((e) => e.value)), Dt = new Set(
126
126
  ze.map((e) => e.value)
127
127
  );
128
- function jt(e) {
128
+ function Kt(e) {
129
129
  const t = e.trim();
130
- return t ? Vt.has(t) ? t : wt[t] ?? null : null;
130
+ return t ? $t.has(t) ? t : qt[t] ?? null : null;
131
131
  }
132
- function Lt(e) {
132
+ function Jt(e) {
133
133
  return Array.isArray(e) ? e.map((t) => {
134
134
  const n = t.trim().toLowerCase();
135
135
  return n ? n.startsWith(".") ? n : `.${n}` : "";
136
136
  }).filter(Boolean) : [];
137
137
  }
138
- function te(e) {
138
+ function ne(e) {
139
139
  if (!Array.isArray(e)) return [];
140
140
  const t = [], n = /* @__PURE__ */ new Set();
141
141
  for (const r of e) {
142
- const o = jt(r);
142
+ const o = Kt(r);
143
143
  o && !n.has(o) && (n.add(o), t.push(o));
144
144
  }
145
145
  return t;
146
146
  }
147
- function $t(e) {
148
- const t = te(e), n = [];
147
+ function Ht(e) {
148
+ const t = ne(e), n = [];
149
149
  for (const r of t)
150
- n.push(...zt[r] ?? [r]);
150
+ n.push(...Bt[r] ?? [r]);
151
151
  return n;
152
152
  }
153
- function Dt(e) {
154
- const t = te(e);
153
+ function Yt(e) {
154
+ const t = ne(e);
155
155
  if (t.length === 0) return [];
156
156
  const n = /* @__PURE__ */ new Set();
157
157
  for (const r of t)
158
- for (const o of Rt[r] ?? [])
158
+ for (const o of Vt[r] ?? [])
159
159
  n.add(o);
160
160
  return ze.filter((r) => n.has(r.value));
161
161
  }
162
162
  function Re(e, t) {
163
- const n = Lt(t), r = te(e);
163
+ const n = Jt(t), r = ne(e);
164
164
  if (r.length === 0)
165
- return n.filter((a) => qt.has(a));
165
+ return n.filter((a) => Dt.has(a));
166
166
  const o = new Set(
167
- Dt(r).map((a) => a.value)
167
+ Yt(r).map((a) => a.value)
168
168
  );
169
169
  return n.filter((a) => o.has(a));
170
170
  }
171
- function Kt(e, t) {
172
- const n = $t(e), r = Re(e, t), o = [...n, ...r];
171
+ function Xt(e, t) {
172
+ const n = Ht(e), r = Re(e, t), o = [...n, ...r];
173
173
  return o.length > 0 ? o.join(",") : void 0;
174
174
  }
175
- function Jt(e, t) {
176
- const n = te(e), r = Re(
175
+ function Gt(e, t) {
176
+ const n = ne(e), r = Re(
177
177
  n,
178
178
  t
179
179
  ), o = [
180
- ...n.map((a) => Ot[a] ?? a),
181
- ...r.map((a) => Bt[a] ?? a)
180
+ ...n.map((a) => jt[a] ?? a),
181
+ ...r.map((a) => Lt[a] ?? a)
182
182
  ];
183
183
  return o.length === 0 ? null : o.join("、");
184
184
  }
185
- const Ht = [
185
+ const Wt = [
186
186
  "video",
187
187
  "audio",
188
188
  "image",
189
189
  "file",
190
190
  "spreadsheet",
191
191
  "document"
192
- ], Yt = new Set(Ht);
193
- function Xt(e) {
194
- return e && Yt.has(e) ? e : "file";
192
+ ], Zt = new Set(Wt);
193
+ function Qt(e) {
194
+ return e && Zt.has(e) ? e : "file";
195
195
  }
196
- function ne(e) {
197
- return typeof e == "string" && Ut.includes(e) ? e : "medium";
196
+ function re(e) {
197
+ return typeof e == "string" && wt.includes(e) ? e : "medium";
198
198
  }
199
- function Gt(e, t) {
199
+ function en(e, t) {
200
200
  var o;
201
201
  const n = Math.max(1, t);
202
202
  let r = [];
203
203
  return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((a) => String(a).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
204
204
  }
205
- function Wt(e) {
205
+ function tn(e) {
206
206
  var t;
207
207
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
208
208
  }
209
- function Zt(e) {
210
- return `form-media-size-${ne(e)}`;
209
+ function nn(e) {
210
+ return `form-media-size-${re(e)}`;
211
211
  }
212
- function Qt(e) {
213
- return `form-media-preview form-media-list ${Zt(e)}`;
212
+ function rn(e) {
213
+ return `form-media-preview form-media-list ${nn(e)}`;
214
214
  }
215
- const en = 10;
215
+ const on = 10;
216
216
  function we(e) {
217
217
  return e === !0 || e === "true";
218
218
  }
@@ -220,15 +220,15 @@ function je(e, t = 1) {
220
220
  const n = typeof e == "number" ? e : Number(e);
221
221
  return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
222
222
  }
223
- function tn(e, t) {
223
+ function an(e, t) {
224
224
  if (t !== void 0)
225
225
  return e === "toggle" ? we(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
226
226
  }
227
- function nn(e) {
228
- 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, a = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, l = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, i = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
229
- return { agentKind: r, agentUniqueId: o, flowType: a, category: l, flowUniqueIds: i, pageSize: n };
227
+ function ln(e) {
228
+ 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, a = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, l = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
229
+ return { agentKind: r, agentUniqueId: o, flowType: a, category: i, flowUniqueIds: l, pageSize: n };
230
230
  }
231
- function rn(e) {
231
+ function sn(e) {
232
232
  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;
233
233
  return {
234
234
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -237,44 +237,44 @@ function rn(e) {
237
237
  pageSize: n
238
238
  };
239
239
  }
240
- function on(e) {
240
+ function cn(e) {
241
241
  if (e.type !== "case_singleselect") return e;
242
242
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
243
243
  return { ...e, type: "case_multiselect", defaultValue: t };
244
244
  }
245
- function an(e) {
245
+ function un(e) {
246
246
  var o, a;
247
- const t = on(e), n = te(t.fileAcceptTypes), r = t.type;
247
+ const t = cn(e), n = ne(t.fileAcceptTypes), r = t.type;
248
248
  return {
249
- id: ((o = t.id) == null ? void 0 : o.trim()) || ee("block-"),
249
+ id: ((o = t.id) == null ? void 0 : o.trim()) || te("block-"),
250
250
  type: r,
251
251
  name: ((a = t.name) == null ? void 0 : a.trim()) || void 0,
252
252
  label: t.label ?? "",
253
253
  placeholder: t.placeholder ?? "",
254
254
  help: t.help ?? "",
255
255
  required: t.required === !0,
256
- mediaUrls: Ie(r) ? Gt(t, en) : void 0,
257
- mediaSize: Ie(r) ? ne(t.mediaSize) : void 0,
256
+ mediaUrls: Ie(r) ? en(t, on) : void 0,
257
+ mediaSize: Ie(r) ? re(t.mediaSize) : void 0,
258
258
  fileAcceptTypes: n,
259
259
  fileAcceptExtensions: Re(
260
260
  n,
261
261
  t.fileAcceptExtensions
262
262
  ),
263
- filePlaceholderIcon: Xt(t.filePlaceholderIcon),
263
+ filePlaceholderIcon: Qt(t.filePlaceholderIcon),
264
264
  fileMinCount: r === "file" ? je(t.fileMinCount, 1) : void 0,
265
265
  fileMaxCount: r === "file" ? je(t.fileMaxCount, 1) : void 0,
266
- defaultValue: tn(r, t.defaultValue),
267
- options: Array.isArray(t.options) ? t.options.map((l, i) => {
266
+ defaultValue: an(r, t.defaultValue),
267
+ options: Array.isArray(t.options) ? t.options.map((i, l) => {
268
268
  var c, u;
269
269
  return {
270
- value: ((c = l.value) == null ? void 0 : c.trim()) || `option_${i + 1}`,
271
- label: ((u = l.label) == null ? void 0 : u.trim()) || `选项 ${i + 1}`
270
+ value: ((c = i.value) == null ? void 0 : c.trim()) || `option_${l + 1}`,
271
+ label: ((u = i.label) == null ? void 0 : u.trim()) || `选项 ${l + 1}`
272
272
  };
273
273
  }) : void 0,
274
274
  resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
275
- resumeFilter: r === "resume_multiselect" ? rn(t.resumeFilter) : void 0,
275
+ resumeFilter: r === "resume_multiselect" ? sn(t.resumeFilter) : void 0,
276
276
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
277
- caseFilter: r === "case_multiselect" ? nn(t.caseFilter) : void 0
277
+ caseFilter: r === "case_multiselect" ? ln(t.caseFilter) : void 0
278
278
  };
279
279
  }
280
280
  function se(e) {
@@ -288,7 +288,7 @@ function se(e) {
288
288
  function H(e) {
289
289
  if (!e || !Array.isArray(e.blocks))
290
290
  return se({ title: "", description: "", blocks: [], jsonSchema: {} });
291
- const t = e.blocks.map(an);
291
+ const t = e.blocks.map(un);
292
292
  return se({
293
293
  title: typeof e.title == "string" ? e.title : "",
294
294
  description: typeof e.description == "string" ? e.description : "",
@@ -296,19 +296,19 @@ function H(e) {
296
296
  jsonSchema: {}
297
297
  });
298
298
  }
299
- function ln(e) {
300
- 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, a = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, l = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
299
+ function pn(e) {
300
+ 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, a = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, i = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
301
301
  return {
302
302
  agentKind: n,
303
303
  agentUniqueId: r,
304
304
  flowType: o,
305
305
  category: a,
306
- flowUniqueIds: l,
306
+ flowUniqueIds: i,
307
307
  pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
308
308
  };
309
309
  }
310
- function sn(e, t) {
311
- var l, i, c, u, m, p;
310
+ function mn(e, t) {
311
+ var i, l, c, u, m, p;
312
312
  const { id: n, label: r, path: o, withData: a } = t;
313
313
  return a({
314
314
  id: n,
@@ -318,8 +318,8 @@ function sn(e, t) {
318
318
  help: e.help ?? "",
319
319
  enableRefresh: e.caseEnableRefresh !== !1,
320
320
  caseFilter: {
321
- agentKind: (l = e.caseFilter) == null ? void 0 : l.agentKind,
322
- agentUniqueId: (i = e.caseFilter) == null ? void 0 : i.agentUniqueId,
321
+ agentKind: (i = e.caseFilter) == null ? void 0 : i.agentKind,
322
+ agentUniqueId: (l = e.caseFilter) == null ? void 0 : l.agentUniqueId,
323
323
  flowType: (c = e.caseFilter) == null ? void 0 : c.flowType,
324
324
  category: (u = e.caseFilter) == null ? void 0 : u.category,
325
325
  flowUniqueIds: ((m = e.caseFilter) == null ? void 0 : m.flowUniqueIds) ?? [],
@@ -328,17 +328,17 @@ function sn(e, t) {
328
328
  value: { path: o }
329
329
  });
330
330
  }
331
- function cn(e, t, n) {
331
+ function dn(e, t, n) {
332
332
  const r = n.nameFromValue(e.value), o = {
333
333
  ...t("case_multiselect"),
334
334
  name: r,
335
335
  caseEnableRefresh: e.enableRefresh !== !1
336
336
  }, a = n.asLiteral(e.placeholder);
337
337
  a && (o.placeholder = a);
338
- const l = n.asLiteral(e.help);
339
- return l && (o.help = l), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = ln(e.caseFilter)), o;
338
+ const i = n.asLiteral(e.help);
339
+ return i && (o.help = i), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = pn(e.caseFilter)), o;
340
340
  }
341
- const Qe = Pe({ interactive: !0 });
341
+ const Qe = Me({ interactive: !0 });
342
342
  function et({
343
343
  interactive: e,
344
344
  children: t
@@ -365,32 +365,32 @@ function D(e, t = "value") {
365
365
  return () => m.unsubscribe();
366
366
  },
367
367
  [e, r, o]
368
- ), l = W(() => {
368
+ ), i = W(() => {
369
369
  if (!(!o || r === void 0))
370
370
  return e.dataContext.resolveDynamicValue(r);
371
- }, [e, r, o]), i = ht(a, l, l), c = W(
371
+ }, [e, r, o]), l = bt(a, i, i), c = W(
372
372
  (u) => {
373
373
  !o || !r || typeof r != "object" || !("path" in r) || e.dataContext.set(String(r.path), u);
374
374
  },
375
375
  [e, r, o]
376
376
  );
377
- return { value: i, setValue: c, hasBinding: !!o };
377
+ return { value: l, setValue: c, hasBinding: !!o };
378
378
  }
379
- function Q(e) {
379
+ function ee(e) {
380
380
  if (typeof e == "string") return e || void 0;
381
381
  if (typeof e == "number") return String(e);
382
382
  }
383
383
  function j(e) {
384
384
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
385
385
  }
386
- const nt = Pe(null);
386
+ const nt = Me(null);
387
387
  function rt({
388
388
  caseSearch: e,
389
389
  children: t
390
390
  }) {
391
391
  return /* @__PURE__ */ s(nt.Provider, { value: e ?? null, children: t });
392
392
  }
393
- function un() {
393
+ function fn() {
394
394
  return Ee(nt);
395
395
  }
396
396
  function ve(e) {
@@ -399,18 +399,18 @@ function ve(e) {
399
399
  function be(e) {
400
400
  if (!e || typeof e != "object")
401
401
  return { flowUniqueIds: [], pageSize: 20 };
402
- 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, a = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, l = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, i = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
403
- return { agentKind: o, agentUniqueId: a, flowType: l, category: i, flowUniqueIds: c, pageSize: r };
402
+ 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, a = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, i = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, l = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
403
+ return { agentKind: o, agentUniqueId: a, flowType: i, category: l, flowUniqueIds: c, pageSize: r };
404
404
  }
405
405
  function Se(e) {
406
406
  var r;
407
407
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
408
408
  return t || n;
409
409
  }
410
- function pn(e) {
410
+ function hn(e) {
411
411
  return JSON.stringify(e);
412
412
  }
413
- const mn = {
413
+ const gn = {
414
414
  name: "SkoponCaseSelect",
415
415
  schema: d.object({
416
416
  label: d.any().optional(),
@@ -421,7 +421,7 @@ const mn = {
421
421
  value: d.any().optional()
422
422
  }).passthrough()
423
423
  };
424
- function dn({
424
+ function yn({
425
425
  item: e,
426
426
  selected: t,
427
427
  disabled: n,
@@ -449,10 +449,10 @@ function dn({
449
449
  }
450
450
  );
451
451
  }
452
- function fn({ context: e }) {
453
- const { interactive: t } = $(), n = un(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, l = ve(a.label), i = ve(a.placeholder), c = ve(a.help), u = a.enableRefresh !== !1, m = O(() => be(a.caseFilter), [a.caseFilter]), p = pn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [P, R] = E(m.pageSize ?? 20), _ = B(0), w = j(r), q = O(() => n ? Se(m) ? T || i || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, m, T, i]), K = W(
452
+ function vn({ context: e }) {
453
+ const { interactive: t } = $(), n = fn(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ve(a.label), l = ve(a.placeholder), c = ve(a.help), u = a.enableRefresh !== !1, m = z(() => be(a.caseFilter), [a.caseFilter]), p = hn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = z(() => n ? Se(m) ? T || l || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, m, T, l]), K = W(
454
454
  async (g) => {
455
- const A = be(JSON.parse(p)), M = ++_.current;
455
+ const A = be(JSON.parse(p)), P = ++U.current;
456
456
  if (!n || !Se(A)) {
457
457
  k([]), b(0), f("");
458
458
  return;
@@ -460,13 +460,13 @@ function fn({ context: e }) {
460
460
  F(!0), f("");
461
461
  try {
462
462
  const I = await n({ filter: A, page: g });
463
- if (M !== _.current) return;
464
- k(I.list), b(I.total), S(I.page), R(I.pageSize);
463
+ if (P !== U.current) return;
464
+ k(I.list), b(I.total), S(I.page), w(I.pageSize);
465
465
  } catch (I) {
466
- if (M !== _.current) return;
466
+ if (P !== U.current) return;
467
467
  k([]), b(0), f(I instanceof Error ? I.message : "加载案例列表失败");
468
468
  } finally {
469
- M === _.current && F(!1);
469
+ P === U.current && F(!1);
470
470
  }
471
471
  },
472
472
  [n, p]
@@ -476,24 +476,24 @@ function fn({ context: e }) {
476
476
  }, [p, K]);
477
477
  const Y = (g) => {
478
478
  if (!t) return;
479
- const A = w.includes(g) ? w.filter((M) => M !== g) : [...w, g];
479
+ const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
480
480
  o(A);
481
481
  }, X = () => {
482
- const g = be(JSON.parse(p)), A = P || g.pageSize || 20, M = Math.max(1, Math.ceil(v / A)), I = y >= M ? 1 : y + 1;
482
+ const g = be(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
483
483
  K(I);
484
484
  };
485
485
  return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
486
- l ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: l }) : null,
486
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
487
487
  C && h.length === 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-status", children: [
488
- /* @__PURE__ */ s(Ue, { size: "small" }),
488
+ /* @__PURE__ */ s(_e, { size: "small" }),
489
489
  " 加载案例…"
490
490
  ] }) : null,
491
491
  !C && h.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: q }) : null,
492
492
  h.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: h.map((g) => /* @__PURE__ */ s(
493
- dn,
493
+ yn,
494
494
  {
495
495
  item: g,
496
- selected: w.includes(g.caseUniqueId),
496
+ selected: O.includes(g.caseUniqueId),
497
497
  disabled: !t,
498
498
  onToggle: () => Y(g.caseUniqueId)
499
499
  },
@@ -514,18 +514,18 @@ function fn({ context: e }) {
514
514
  c ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
515
515
  ] });
516
516
  }
517
- const hn = z(
518
- mn,
519
- fn
520
- ), gn = {
517
+ const bn = R(
518
+ gn,
519
+ vn
520
+ ), Sn = {
521
521
  type: "case_multiselect",
522
522
  componentName: "SkoponCaseSelect",
523
- toComponent: sn,
524
- fromComponent: cn,
525
- catalogComponents: [hn]
523
+ toComponent: mn,
524
+ fromComponent: dn,
525
+ catalogComponents: [bn]
526
526
  };
527
- function yn(e, t) {
528
- var l, i, c, u;
527
+ function kn(e, t) {
528
+ var i, l, c, u;
529
529
  const { id: n, label: r, path: o, withData: a } = t;
530
530
  return a({
531
531
  id: n,
@@ -535,41 +535,41 @@ function yn(e, t) {
535
535
  help: e.help ?? "",
536
536
  enableRefresh: e.resumeEnableRefresh !== !1,
537
537
  resumeFilter: {
538
- names: ((l = e.resumeFilter) == null ? void 0 : l.names) ?? [],
539
- agentUniqueIds: ((i = e.resumeFilter) == null ? void 0 : i.agentUniqueIds) ?? [],
538
+ names: ((i = e.resumeFilter) == null ? void 0 : i.names) ?? [],
539
+ agentUniqueIds: ((l = e.resumeFilter) == null ? void 0 : l.agentUniqueIds) ?? [],
540
540
  resumeUniqueIds: ((c = e.resumeFilter) == null ? void 0 : c.resumeUniqueIds) ?? [],
541
541
  pageSize: ((u = e.resumeFilter) == null ? void 0 : u.pageSize) ?? 20
542
542
  },
543
543
  value: { path: o }
544
544
  });
545
545
  }
546
- function vn(e, t, n) {
546
+ function xn(e, t, n) {
547
547
  const r = n.nameFromValue(e.value), o = {
548
548
  ...t("resume_multiselect"),
549
549
  name: r,
550
550
  resumeEnableRefresh: e.enableRefresh !== !1
551
551
  }, a = n.asLiteral(e.placeholder);
552
552
  a && (o.placeholder = a);
553
- const l = n.asLiteral(e.help);
554
- if (l && (o.help = l), e.resumeFilter && typeof e.resumeFilter == "object") {
555
- const i = e.resumeFilter;
553
+ const i = n.asLiteral(e.help);
554
+ if (i && (o.help = i), e.resumeFilter && typeof e.resumeFilter == "object") {
555
+ const l = e.resumeFilter;
556
556
  o.resumeFilter = {
557
- names: Array.isArray(i.names) ? i.names.map(String) : [],
558
- agentUniqueIds: Array.isArray(i.agentUniqueIds) ? i.agentUniqueIds.map(String) : [],
559
- resumeUniqueIds: Array.isArray(i.resumeUniqueIds) ? i.resumeUniqueIds.map(String) : [],
560
- pageSize: typeof i.pageSize == "number" ? i.pageSize : 20
557
+ names: Array.isArray(l.names) ? l.names.map(String) : [],
558
+ agentUniqueIds: Array.isArray(l.agentUniqueIds) ? l.agentUniqueIds.map(String) : [],
559
+ resumeUniqueIds: Array.isArray(l.resumeUniqueIds) ? l.resumeUniqueIds.map(String) : [],
560
+ pageSize: typeof l.pageSize == "number" ? l.pageSize : 20
561
561
  };
562
562
  }
563
563
  return o;
564
564
  }
565
- const ot = Pe(null);
565
+ const ot = Me(null);
566
566
  function at({
567
567
  resumeSearch: e,
568
568
  children: t
569
569
  }) {
570
570
  return /* @__PURE__ */ s(ot.Provider, { value: e ?? null, children: t });
571
571
  }
572
- function bn() {
572
+ function An() {
573
573
  return Ee(ot);
574
574
  }
575
575
  function ke(e) {
@@ -578,13 +578,13 @@ function ke(e) {
578
578
  function xe(e) {
579
579
  if (!e || typeof e != "object")
580
580
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
581
- 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) : [], a = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), l = Number.isFinite(a) && a >= 1 && a <= 100 ? Math.floor(a) : 20;
582
- return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: l };
581
+ 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) : [], a = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), i = Number.isFinite(a) && a >= 1 && a <= 100 ? Math.floor(a) : 20;
582
+ return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: i };
583
583
  }
584
- function Sn(e) {
584
+ function Tn(e) {
585
585
  return JSON.stringify(e);
586
586
  }
587
- const kn = {
587
+ const Cn = {
588
588
  name: "SkoponResumeSelect",
589
589
  schema: d.object({
590
590
  label: d.any().optional(),
@@ -594,39 +594,39 @@ const kn = {
594
594
  resumeFilter: d.any().optional(),
595
595
  value: d.any().optional()
596
596
  }).passthrough()
597
- }, xn = 3, An = 2;
597
+ }, In = 3, Nn = 2;
598
598
  function Ae(e, t) {
599
- const n = (t ?? []).filter(Boolean), r = n.slice(0, xn), o = n.length - r.length;
599
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, In), o = n.length - r.length;
600
600
  return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-tags", children: [
601
601
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: e }),
602
602
  n.length > 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-tags-list", children: [
603
- r.map((a) => /* @__PURE__ */ s(Z, { className: "skopon-resume-select-card-tag", children: a }, a)),
604
- o > 0 ? /* @__PURE__ */ x(Z, { className: "skopon-resume-select-card-tag", children: [
603
+ r.map((a) => /* @__PURE__ */ s(Q, { className: "skopon-resume-select-card-tag", children: a }, a)),
604
+ o > 0 ? /* @__PURE__ */ x(Q, { className: "skopon-resume-select-card-tag", children: [
605
605
  "+",
606
606
  o
607
607
  ] }) : null
608
608
  ] }) : /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
609
609
  ] });
610
610
  }
611
- function Tn(e) {
611
+ function Fn(e) {
612
612
  return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-field", children: [
613
613
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
614
614
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
615
615
  ] });
616
616
  }
617
- function Cn({ work: e }) {
617
+ function Pn({ work: e }) {
618
618
  return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-work", children: [
619
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(It, { className: "skopon-resume-select-card-work-placeholder" }) }),
619
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(Mt, { className: "skopon-resume-select-card-work-placeholder" }) }),
620
620
  /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
621
621
  ] });
622
622
  }
623
- function In({
623
+ function Mn({
624
624
  item: e,
625
625
  selected: t,
626
626
  disabled: n,
627
627
  onToggle: r
628
628
  }) {
629
- const o = (e.works ?? []).slice(0, An);
629
+ const o = (e.works ?? []).slice(0, Nn);
630
630
  return /* @__PURE__ */ x(
631
631
  "button",
632
632
  {
@@ -636,33 +636,33 @@ function In({
636
636
  onClick: r,
637
637
  children: [
638
638
  /* @__PURE__ */ s(
639
- vt,
639
+ xt,
640
640
  {
641
641
  size: 48,
642
642
  src: e.avatarUrl || void 0,
643
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Ct, {}),
643
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Pt, {}),
644
644
  className: "skopon-resume-select-card-avatar"
645
645
  }
646
646
  ),
647
647
  /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
648
648
  /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-body", children: [
649
- Tn(e.satisfaction),
649
+ Fn(e.satisfaction),
650
650
  Ae("性格", e.personality),
651
651
  Ae("专长", e.specialties),
652
652
  Ae("擅长领域", e.traits),
653
653
  /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-works", children: [
654
654
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
655
- o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((a, l) => /* @__PURE__ */ s(Cn, { work: a }, `${a.title}-${l}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
655
+ o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((a, i) => /* @__PURE__ */ s(Pn, { work: a }, `${a.title}-${i}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
656
656
  ] })
657
657
  ] })
658
658
  ]
659
659
  }
660
660
  );
661
661
  }
662
- function Nn({ context: e }) {
663
- const { interactive: t } = $(), n = bn(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, l = ke(a.label), i = ke(a.placeholder), c = ke(a.help), u = a.enableRefresh !== !1, m = O(() => xe(a.resumeFilter), [a.resumeFilter]), p = Sn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [P, R] = E(m.pageSize ?? 20), _ = B(0), w = j(r), q = W(
662
+ function En({ context: e }) {
663
+ const { interactive: t } = $(), n = An(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ke(a.label), l = ke(a.placeholder), c = ke(a.help), u = a.enableRefresh !== !1, m = z(() => xe(a.resumeFilter), [a.resumeFilter]), p = Tn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = W(
664
664
  async (g) => {
665
- const A = xe(JSON.parse(p)), M = ++_.current;
665
+ const A = xe(JSON.parse(p)), P = ++U.current;
666
666
  if (!n) {
667
667
  k([]), b(0), f("未配置简历搜索服务");
668
668
  return;
@@ -670,13 +670,13 @@ function Nn({ context: e }) {
670
670
  F(!0), f("");
671
671
  try {
672
672
  const I = await n({ filter: A, page: g });
673
- if (M !== _.current) return;
674
- k(I.list), b(I.total), S(I.page), R(I.pageSize);
673
+ if (P !== U.current) return;
674
+ k(I.list), b(I.total), S(I.page), w(I.pageSize);
675
675
  } catch (I) {
676
- if (M !== _.current) return;
676
+ if (P !== U.current) return;
677
677
  k([]), b(0), f(I instanceof Error ? I.message : "加载简历列表失败");
678
678
  } finally {
679
- M === _.current && F(!1);
679
+ P === U.current && F(!1);
680
680
  }
681
681
  },
682
682
  [n, p]
@@ -686,25 +686,25 @@ function Nn({ context: e }) {
686
686
  }, [p, q]);
687
687
  const K = (g) => {
688
688
  if (!t) return;
689
- const A = w.includes(g) ? w.filter((M) => M !== g) : [...w, g];
689
+ const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
690
690
  o(A);
691
691
  }, Y = () => {
692
- const g = xe(JSON.parse(p)), A = P || g.pageSize || 20, M = Math.max(1, Math.ceil(v / A)), I = y >= M ? 1 : y + 1;
692
+ const g = xe(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
693
693
  q(I);
694
- }, X = i || "暂无匹配的简历";
694
+ }, X = l || "暂无匹配的简历";
695
695
  return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
696
- l ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: l }) : null,
696
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
697
697
  C && h.length === 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-status", children: [
698
- /* @__PURE__ */ s(Ue, { size: "small" }),
698
+ /* @__PURE__ */ s(_e, { size: "small" }),
699
699
  " 加载简历…"
700
700
  ] }) : null,
701
701
  !C && T ? /* @__PURE__ */ s(L.Text, { type: "danger", className: "skopon-resume-select-status", children: T }) : null,
702
702
  !C && !T && h.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: X }) : null,
703
703
  h.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: h.map((g) => /* @__PURE__ */ s(
704
- In,
704
+ Mn,
705
705
  {
706
706
  item: g,
707
- selected: w.includes(g.resumeUniqueId),
707
+ selected: O.includes(g.resumeUniqueId),
708
708
  disabled: !t,
709
709
  onToggle: () => K(g.resumeUniqueId)
710
710
  },
@@ -725,74 +725,74 @@ function Nn({ context: e }) {
725
725
  c ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
726
726
  ] });
727
727
  }
728
- const Fn = z(
729
- kn,
730
- Nn
731
- ), Mn = {
728
+ const _n = R(
729
+ Cn,
730
+ En
731
+ ), Un = {
732
732
  type: "resume_multiselect",
733
733
  componentName: "SkoponResumeSelect",
734
- toComponent: yn,
735
- fromComponent: vn,
736
- catalogComponents: [Fn]
737
- }, pe = [Mn, gn], Pn = new Map(
734
+ toComponent: kn,
735
+ fromComponent: xn,
736
+ catalogComponents: [_n]
737
+ }, pe = [Un, Sn], zn = new Map(
738
738
  pe.map((e) => [e.type, e])
739
- ), En = new Map(
739
+ ), Rn = new Map(
740
740
  pe.map((e) => [e.componentName, e])
741
741
  );
742
- function Un(e) {
743
- return Pn.get(e);
742
+ function wn(e) {
743
+ return zn.get(e);
744
744
  }
745
- function _n(e) {
746
- return En.get(e);
745
+ function On(e) {
746
+ return Rn.get(e);
747
747
  }
748
- function zn() {
748
+ function Bn() {
749
749
  return pe.flatMap((e) => e.catalogComponents);
750
750
  }
751
- function Rn() {
751
+ function Vn() {
752
752
  return pe.map((e) => e.componentName);
753
753
  }
754
- const ce = "root", Ne = "__title__", Fe = "__desc__", lt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
755
- function wn(e) {
754
+ const ce = "root", Ne = "__title__", Fe = "__desc__", it = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
755
+ function qn(e) {
756
756
  return `/${e}`;
757
757
  }
758
758
  function $e(e) {
759
759
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
760
760
  }
761
- function U(e) {
761
+ function _(e) {
762
762
  if (typeof e == "string") return e;
763
763
  }
764
- function On(e) {
765
- const t = e.id || ee("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
764
+ function jn(e) {
765
+ const t = e.id || te("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
766
766
  return {
767
767
  id: t,
768
768
  component: "SkoponMedia",
769
769
  mediaType: n,
770
- urls: Wt(e),
771
- mediaSize: ne(e.mediaSize),
770
+ urls: tn(e),
771
+ mediaSize: re(e.mediaSize),
772
772
  label: e.label ?? "",
773
773
  help: e.help ?? "",
774
774
  placeholder: e.placeholder ?? ""
775
775
  };
776
776
  }
777
- function Bn(e) {
777
+ function Ln(e) {
778
778
  if (Array.isArray(e.urls))
779
779
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
780
- const t = U(e.url);
780
+ const t = _(e.url);
781
781
  return t != null && t.trim() ? [t.trim()] : [];
782
782
  }
783
- function oe(e, t, n) {
784
- const r = typeof e.id == "string" ? e.id : ee("block-"), o = Bn(e), a = U(e.label) ?? U(e.description) ?? n, l = U(e.help), i = U(e.placeholder), c = ne(e.mediaSize);
783
+ function ae(e, t, n) {
784
+ const r = typeof e.id == "string" ? e.id : te("block-"), o = Ln(e), a = _(e.label) ?? _(e.description) ?? n, i = _(e.help), l = _(e.placeholder), c = re(e.mediaSize);
785
785
  return {
786
786
  id: r,
787
787
  type: t,
788
788
  label: a,
789
- ...l ? { help: l } : {},
790
- ...i ? { placeholder: i } : {},
789
+ ...i ? { help: i } : {},
790
+ ...l ? { placeholder: l } : {},
791
791
  mediaSize: c,
792
792
  mediaUrls: o.length > 0 ? o : [""]
793
793
  };
794
794
  }
795
- function Vn(e) {
795
+ function $n(e) {
796
796
  switch (e.type) {
797
797
  case "toggle":
798
798
  return we(e.defaultValue);
@@ -809,11 +809,11 @@ function Vn(e) {
809
809
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
810
810
  }
811
811
  }
812
- function qn(e) {
812
+ function Dn(e) {
813
813
  var u;
814
- const t = e.id || ee("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? wn(r) : void 0, a = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), l = (m) => r ? { node: m, dataKey: r, dataValue: Vn(e) } : { node: m }, i = { id: t, label: n, name: r, path: o, withData: l }, c = Un(e.type);
814
+ const t = e.id || te("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? qn(r) : void 0, a = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), i = (m) => r ? { node: m, dataKey: r, dataValue: $n(e) } : { node: m }, l = { id: t, label: n, name: r, path: o, withData: i }, c = wn(e.type);
815
815
  if (c)
816
- return c.toComponent(e, i);
816
+ return c.toComponent(e, l);
817
817
  switch (e.type) {
818
818
  case "heading":
819
819
  return { node: { id: t, component: "Text", text: n, variant: "h3" } };
@@ -822,7 +822,7 @@ function qn(e) {
822
822
  case "text":
823
823
  case "tel":
824
824
  case "url":
825
- return l({
825
+ return i({
826
826
  id: t,
827
827
  component: "TextField",
828
828
  label: n,
@@ -831,17 +831,17 @@ function qn(e) {
831
831
  value: { path: o }
832
832
  });
833
833
  case "email":
834
- return l({
834
+ return i({
835
835
  id: t,
836
836
  component: "TextField",
837
837
  label: n,
838
838
  variant: "shortText",
839
- validationRegexp: lt,
839
+ validationRegexp: it,
840
840
  ...e.placeholder ? { placeholder: e.placeholder } : {},
841
841
  value: { path: o }
842
842
  });
843
843
  case "textarea":
844
- return l({
844
+ return i({
845
845
  id: t,
846
846
  component: "TextField",
847
847
  label: n,
@@ -850,7 +850,7 @@ function qn(e) {
850
850
  value: { path: o }
851
851
  });
852
852
  case "number":
853
- return l({
853
+ return i({
854
854
  id: t,
855
855
  component: "TextField",
856
856
  label: n,
@@ -859,7 +859,7 @@ function qn(e) {
859
859
  value: { path: o }
860
860
  });
861
861
  case "select":
862
- return l({
862
+ return i({
863
863
  id: t,
864
864
  component: "SkoponSelect",
865
865
  label: n,
@@ -869,7 +869,7 @@ function qn(e) {
869
869
  value: { path: o }
870
870
  });
871
871
  case "radio":
872
- return l({
872
+ return i({
873
873
  id: t,
874
874
  component: "ChoicePicker",
875
875
  label: n,
@@ -879,7 +879,7 @@ function qn(e) {
879
879
  value: { path: o }
880
880
  });
881
881
  case "multiselect":
882
- return l({
882
+ return i({
883
883
  id: t,
884
884
  component: "SkoponSelect",
885
885
  label: n,
@@ -889,7 +889,7 @@ function qn(e) {
889
889
  value: { path: o }
890
890
  });
891
891
  case "checkbox":
892
- return l({
892
+ return i({
893
893
  id: t,
894
894
  component: "ChoicePicker",
895
895
  label: n,
@@ -899,9 +899,9 @@ function qn(e) {
899
899
  value: { path: o }
900
900
  });
901
901
  case "toggle":
902
- return l({ id: t, component: "CheckBox", label: n, value: { path: o } });
902
+ return i({ id: t, component: "CheckBox", label: n, value: { path: o } });
903
903
  case "datetime":
904
- return l({
904
+ return i({
905
905
  id: t,
906
906
  component: "DateTimeInput",
907
907
  label: n,
@@ -911,7 +911,7 @@ function qn(e) {
911
911
  value: { path: o }
912
912
  });
913
913
  case "time":
914
- return l({
914
+ return i({
915
915
  id: t,
916
916
  component: "DateTimeInput",
917
917
  label: n,
@@ -922,9 +922,9 @@ function qn(e) {
922
922
  case "image":
923
923
  case "video":
924
924
  case "audio":
925
- return { node: On(e) };
925
+ return { node: jn(e) };
926
926
  case "file":
927
- return l({
927
+ return i({
928
928
  id: t,
929
929
  component: "FileUpload",
930
930
  label: n,
@@ -939,25 +939,25 @@ function qn(e) {
939
939
  return { node: null };
940
940
  }
941
941
  }
942
- function Me(e) {
942
+ function Pe(e) {
943
943
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
944
944
  const t = e.components.find((r) => r.id === ce);
945
945
  if (!t) return e.components.length === 0;
946
946
  const n = t.children;
947
947
  return !Array.isArray(n) || n.length === 0;
948
948
  }
949
- function it(e, t) {
950
- const n = [], r = [], o = {}, a = (t == null ? void 0 : t.includeHeader) !== !1, l = (e.title ?? "").trim(), i = (e.description ?? "").trim();
951
- a && l && (n.push({ id: Ne, component: "Text", text: l, variant: "h2" }), r.push(Ne)), a && i && (n.push({ id: Fe, component: "Text", text: i, variant: "body" }), r.push(Fe));
949
+ function lt(e, t) {
950
+ const n = [], r = [], o = {}, a = (t == null ? void 0 : t.includeHeader) !== !1, i = (e.title ?? "").trim(), l = (e.description ?? "").trim();
951
+ a && i && (n.push({ id: Ne, component: "Text", text: i, variant: "h2" }), r.push(Ne)), a && l && (n.push({ id: Fe, component: "Text", text: l, variant: "body" }), r.push(Fe));
952
952
  for (const m of e.blocks ?? []) {
953
- const { node: p, dataKey: y, dataValue: S } = qn(m);
953
+ const { node: p, dataKey: y, dataValue: S } = Dn(m);
954
954
  p && (n.push(p), r.push(p.id), y && (o[y] = S));
955
955
  }
956
956
  n.unshift({ id: ce, component: "Column", children: r });
957
957
  const c = { root: ce, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
958
958
  return u !== void 0 && (c.surfaceProperties = { styleId: u ?? null }), c;
959
959
  }
960
- function jn(e) {
960
+ function Kn(e) {
961
961
  const t = /* @__PURE__ */ new Map();
962
962
  for (const n of e.components ?? [])
963
963
  n && typeof n.id == "string" && t.set(n.id, n);
@@ -974,20 +974,20 @@ function Te(e) {
974
974
  };
975
975
  }).filter((n) => !!n) : [];
976
976
  }
977
- function Ln(e) {
978
- const t = typeof e.id == "string" ? e.id : ee("block-"), n = String(e.component ?? ""), r = U(e.label) ?? U(e.text) ?? "", o = $e(e.value), a = (i) => ({ id: t, type: i, label: r }), l = _n(n);
979
- if (l)
980
- return l.fromComponent(e, a, { asLiteral: U, nameFromValue: $e });
977
+ function Jn(e) {
978
+ const t = typeof e.id == "string" ? e.id : te("block-"), n = String(e.component ?? ""), r = _(e.label) ?? _(e.text) ?? "", o = $e(e.value), a = (l) => ({ id: t, type: l, label: r }), i = On(n);
979
+ if (i)
980
+ return i.fromComponent(e, a, { asLiteral: _, nameFromValue: $e });
981
981
  switch (n) {
982
982
  case "Text": {
983
- const i = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(i) || i === "title" || i === "subtitle";
983
+ const l = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(l) || l === "title" || l === "subtitle";
984
984
  return { id: t, type: c ? "heading" : "paragraph", label: r };
985
985
  }
986
986
  case "TextField": {
987
- const i = String(e.variant ?? "shortText");
987
+ const l = String(e.variant ?? "shortText");
988
988
  let c = "text";
989
- i === "longText" ? c = "textarea" : i === "number" ? c = "number" : U(e.validationRegexp) === lt && (c = "email");
990
- const u = { ...a(c), name: o }, m = U(e.placeholder);
989
+ l === "longText" ? c = "textarea" : l === "number" ? c = "number" : _(e.validationRegexp) === it && (c = "email");
990
+ const u = { ...a(c), name: o }, m = _(e.placeholder);
991
991
  return m && (u.placeholder = m), u;
992
992
  }
993
993
  case "CheckBox":
@@ -997,39 +997,39 @@ function Ln(e) {
997
997
  ...a(c),
998
998
  name: o,
999
999
  options: Te(e)
1000
- }, m = U(e.placeholder);
1000
+ }, m = _(e.placeholder);
1001
1001
  return m && (u.placeholder = m), u;
1002
1002
  }
1003
1003
  case "ChoicePicker": {
1004
- const i = U(e.skoponPickerType);
1005
- if (i === "select" || i === "multiselect" || i === "radio" || i === "checkbox") {
1004
+ const l = _(e.skoponPickerType);
1005
+ if (l === "select" || l === "multiselect" || l === "radio" || l === "checkbox") {
1006
1006
  const m = {
1007
- ...a(i),
1007
+ ...a(l),
1008
1008
  name: o,
1009
1009
  options: Te(e)
1010
- }, p = U(e.placeholder);
1010
+ }, p = _(e.placeholder);
1011
1011
  return p && (m.placeholder = p), m;
1012
1012
  }
1013
1013
  const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1014
1014
  return { ...a(u), name: o, options: Te(e) };
1015
1015
  }
1016
1016
  case "DateTimeInput": {
1017
- const i = e.enableDate === !0, c = e.enableTime === !0, m = { ...a(!i && c ? "time" : "datetime"), name: o }, p = U(e.placeholder);
1017
+ const l = e.enableDate === !0, c = e.enableTime === !0, m = { ...a(!l && c ? "time" : "datetime"), name: o }, p = _(e.placeholder);
1018
1018
  return p && (m.placeholder = p), m;
1019
1019
  }
1020
1020
  case "SkoponMedia": {
1021
- const i = String(e.mediaType ?? "image");
1022
- return oe(e, i === "video" ? "video" : i === "audio" ? "audio" : "image", r);
1021
+ const l = String(e.mediaType ?? "image");
1022
+ return ae(e, l === "video" ? "video" : l === "audio" ? "audio" : "image", r);
1023
1023
  }
1024
1024
  case "Image":
1025
- return oe(e, "image", r);
1025
+ return ae(e, "image", r);
1026
1026
  case "Video":
1027
- return oe(e, "video", r);
1027
+ return ae(e, "video", r);
1028
1028
  case "AudioPlayer":
1029
- return oe(e, "audio", r);
1029
+ return ae(e, "audio", r);
1030
1030
  case "FileUpload": {
1031
- const i = U(e.accept) ?? "", c = { ...a("file"), name: o };
1032
- return i && (c.fileAcceptExtensions = i.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
1031
+ const l = _(e.accept) ?? "", c = { ...a("file"), name: o };
1032
+ return l && (c.fileAcceptExtensions = l.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
1033
1033
  }
1034
1034
  default:
1035
1035
  return null;
@@ -1042,13 +1042,13 @@ function st(e, t, n, r) {
1042
1042
  if (!o) return;
1043
1043
  const a = String(o.component ?? "");
1044
1044
  if ((a === "Column" || a === "Row") && Array.isArray(o.children)) {
1045
- for (const l of o.children)
1046
- typeof l == "string" && st(l, t, n, r);
1045
+ for (const i of o.children)
1046
+ typeof i == "string" && st(i, t, n, r);
1047
1047
  return;
1048
1048
  }
1049
1049
  r.push(o);
1050
1050
  }
1051
- function $n(e, t) {
1051
+ function Hn(e, t) {
1052
1052
  return t ? e.map((n) => {
1053
1053
  var a;
1054
1054
  const r = (a = n.name) == null ? void 0 : a.trim();
@@ -1057,33 +1057,33 @@ function $n(e, t) {
1057
1057
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: o === !0 || o === "true" } : { ...n, defaultValue: o };
1058
1058
  }) : e;
1059
1059
  }
1060
- function Dn(e) {
1060
+ function Yn(e) {
1061
1061
  if (!e || !Array.isArray(e.components))
1062
1062
  return se({ title: "", description: "", blocks: [], jsonSchema: {} });
1063
- const t = jn(e), n = [];
1063
+ const t = Kn(e), n = [];
1064
1064
  st(e.root ?? ce, t, /* @__PURE__ */ new Set(), n);
1065
1065
  let r = "", o = "";
1066
1066
  const a = [];
1067
- for (const l of n) {
1068
- if (l.id === Ne) {
1069
- r = U(l.text) ?? r;
1067
+ for (const i of n) {
1068
+ if (i.id === Ne) {
1069
+ r = _(i.text) ?? r;
1070
1070
  continue;
1071
1071
  }
1072
- if (l.id === Fe) {
1073
- o = U(l.text) ?? o;
1072
+ if (i.id === Fe) {
1073
+ o = _(i.text) ?? o;
1074
1074
  continue;
1075
1075
  }
1076
- const i = Ln(l);
1077
- i && a.push(i);
1076
+ const l = Jn(i);
1077
+ l && a.push(l);
1078
1078
  }
1079
1079
  return se({
1080
1080
  title: r,
1081
1081
  description: o,
1082
- blocks: $n(a, e.dataModel),
1082
+ blocks: Hn(a, e.dataModel),
1083
1083
  jsonSchema: {}
1084
1084
  });
1085
1085
  }
1086
- function Kn(e, t) {
1086
+ function Xn(e, t) {
1087
1087
  const { surfaceId: n, catalogId: r } = t, o = [
1088
1088
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1089
1089
  {
@@ -1099,21 +1099,21 @@ function Kn(e, t) {
1099
1099
  function ct(e) {
1100
1100
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1101
1101
  }
1102
- function Jn(e, t) {
1102
+ function Gn(e, t) {
1103
1103
  if (!e || typeof e != "object") return null;
1104
1104
  const n = e, r = ct(n.a2ui) ? n.a2ui : void 0;
1105
- if (r && !Me(r)) return r;
1105
+ if (r && !Pe(r)) return r;
1106
1106
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1107
1107
  if (o.length === 0) return null;
1108
1108
  const a = H({
1109
1109
  title: typeof n.title == "string" ? n.title : "",
1110
1110
  description: typeof n.description == "string" ? n.description : "",
1111
1111
  blocks: o
1112
- }), l = it(a, t);
1113
- return Me(l) ? null : l;
1112
+ }), i = lt(a, t);
1113
+ return Pe(i) ? null : i;
1114
1114
  }
1115
- function Hn(e, t, n) {
1116
- return it(
1115
+ function Wn(e, t, n) {
1116
+ return lt(
1117
1117
  {
1118
1118
  title: e.title,
1119
1119
  description: e.description,
@@ -1122,83 +1122,55 @@ function Hn(e, t, n) {
1122
1122
  n
1123
1123
  );
1124
1124
  }
1125
- function Yn(e) {
1125
+ function Zn(e) {
1126
1126
  if (!e || typeof e != "object" || Array.isArray(e))
1127
1127
  return;
1128
1128
  const t = e;
1129
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && ct(t.a2ui) ? Dn(t.a2ui) : H({
1129
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && ct(t.a2ui) ? Yn(t.a2ui) : H({
1130
1130
  title: typeof t.title == "string" ? t.title : "",
1131
1131
  description: typeof t.description == "string" ? t.description : "",
1132
1132
  blocks: Array.isArray(t.blocks) ? t.blocks : []
1133
1133
  });
1134
1134
  }
1135
- function Xn(e, t, n) {
1135
+ function Qn(e, t, n) {
1136
1136
  const r = e.model.surfacesMap.get(t);
1137
1137
  if (!r) return {};
1138
1138
  const o = {};
1139
1139
  for (const a of n) {
1140
- const l = a.trim();
1141
- l && (o[l] = r.dataModel.get(`/${l}`));
1140
+ const i = a.trim();
1141
+ i && (o[i] = r.dataModel.get(`/${i}`));
1142
1142
  }
1143
1143
  return o;
1144
1144
  }
1145
- function ut(e) {
1146
- return e.replace(/'/g, "'\\''");
1147
- }
1148
- function Gn(e, t) {
1149
- const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
1150
- return [
1151
- `curl -X POST '${n}' \\`,
1152
- " -H 'Content-Type: application/json' \\",
1153
- ` -d '${ut(r)}'`
1154
- ].join(`
1155
- `);
1156
- }
1157
- function Wn(e, t) {
1158
- return JSON.stringify({ ...e, ...t }, null, 2);
1159
- }
1160
- function Zn({
1161
- cardValues: e,
1162
- extraValues: t = {},
1163
- callbackUrl: n
1164
- }) {
1165
- const r = (n ?? "").trim() || "<callback_url>", o = Wn(e, t);
1166
- return [
1167
- `curl -X POST '${r}' \\`,
1168
- " -H 'Content-Type: application/json' \\",
1169
- ` -d '${ut(o)}'`
1170
- ].join(`
1171
- `);
1172
- }
1173
- function Qn(e) {
1145
+ function er(e) {
1174
1146
  return H({
1175
1147
  title: "",
1176
1148
  description: "",
1177
1149
  blocks: [e]
1178
1150
  }).blocks[0];
1179
1151
  }
1180
- function er(e, t) {
1152
+ function tr(e, t) {
1181
1153
  var o, a;
1182
1154
  const n = /* @__PURE__ */ new Map();
1183
- for (const l of t) {
1184
- const i = (o = l.name) == null ? void 0 : o.trim();
1185
- i && n.set(i, l);
1155
+ for (const i of t) {
1156
+ const l = (o = i.name) == null ? void 0 : o.trim();
1157
+ l && n.set(l, i);
1186
1158
  }
1187
1159
  const r = [];
1188
- for (const l of e.blocks) {
1189
- if (_e(l.type)) {
1190
- r.push(Qn(l));
1160
+ for (const i of e.blocks) {
1161
+ if (Ue(i.type)) {
1162
+ r.push(er(i));
1191
1163
  continue;
1192
1164
  }
1193
- if (!J(l.type)) continue;
1194
- const i = (a = l.name) == null ? void 0 : a.trim();
1195
- if (!i) continue;
1196
- const c = n.get(i);
1165
+ if (!J(i.type)) continue;
1166
+ const l = (a = i.name) == null ? void 0 : a.trim();
1167
+ if (!l) continue;
1168
+ const c = n.get(l);
1197
1169
  c && r.push(c);
1198
1170
  }
1199
1171
  return r;
1200
1172
  }
1201
- function tr(e, t) {
1173
+ function nr(e, t) {
1202
1174
  var r;
1203
1175
  const n = {
1204
1176
  ...e,
@@ -1210,7 +1182,7 @@ function tr(e, t) {
1210
1182
  blocks: [n]
1211
1183
  }).blocks[0];
1212
1184
  }
1213
- function nr(e) {
1185
+ function ut(e) {
1214
1186
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1215
1187
  const t = e;
1216
1188
  return Array.isArray(t.blocks) ? H({
@@ -1220,17 +1192,17 @@ function nr(e) {
1220
1192
  }) : null;
1221
1193
  }
1222
1194
  function rr(e, t) {
1223
- var a, l, i, c, u, m;
1195
+ var a, i, l, c, u, m;
1224
1196
  const n = /* @__PURE__ */ new Map();
1225
1197
  for (const p of (t == null ? void 0 : t.blocks) ?? [])
1226
1198
  J(p.type) && ((a = p.name) != null && a.trim()) && n.set(p.name.trim(), p);
1227
1199
  const r = [], o = [];
1228
1200
  for (const p of e.blocks) {
1229
1201
  if (!J(p.type)) continue;
1230
- const y = (l = p.name) == null ? void 0 : l.trim();
1202
+ const y = (i = p.name) == null ? void 0 : i.trim();
1231
1203
  if (!y) continue;
1232
1204
  const S = n.get(y);
1233
- S ? r.push(tr(S, p)) : o.push(
1205
+ S ? r.push(nr(S, p)) : o.push(
1234
1206
  H({
1235
1207
  title: "",
1236
1208
  description: "",
@@ -1241,8 +1213,8 @@ function rr(e, t) {
1241
1213
  return {
1242
1214
  matchedBlocks: r,
1243
1215
  extraBlocks: o,
1244
- renderBlocks: er(e, r),
1245
- title: ((i = e.title) == null ? void 0 : i.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
1216
+ renderBlocks: tr(e, r),
1217
+ title: ((l = e.title) == null ? void 0 : l.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
1246
1218
  description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1247
1219
  };
1248
1220
  }
@@ -1250,7 +1222,7 @@ function or(e) {
1250
1222
  const { type: t, defaultValue: n } = e;
1251
1223
  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 : "";
1252
1224
  }
1253
- function ar(e) {
1225
+ function pt(e) {
1254
1226
  var n;
1255
1227
  const t = {};
1256
1228
  for (const r of e) {
@@ -1260,7 +1232,7 @@ function ar(e) {
1260
1232
  }
1261
1233
  return t;
1262
1234
  }
1263
- function lr(e) {
1235
+ function ar(e) {
1264
1236
  return e.blocks.some(
1265
1237
  (t) => {
1266
1238
  var n;
@@ -1271,16 +1243,50 @@ function lr(e) {
1271
1243
  function ir(e) {
1272
1244
  return e.blocks.filter((t) => {
1273
1245
  var n;
1274
- return _e(t.type) ? !0 : J(t.type) && !!((n = t.name) != null && n.trim());
1246
+ return Ue(t.type) ? !0 : J(t.type) && !!((n = t.name) != null && n.trim());
1275
1247
  });
1276
1248
  }
1277
- function sr(e) {
1249
+ function lr(e) {
1278
1250
  return e.blocks.filter((t) => {
1279
1251
  var n;
1280
1252
  return J(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1281
1253
  }).map((t) => t.name.trim());
1282
1254
  }
1283
- async function cr(e, t, n) {
1255
+ function mt(e) {
1256
+ return e.replace(/'/g, "'\\''");
1257
+ }
1258
+ function dt(e, t) {
1259
+ const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
1260
+ return [
1261
+ `curl -X POST '${n}' \\`,
1262
+ " -H 'Content-Type: application/json' \\",
1263
+ ` -d '${mt(r)}'`
1264
+ ].join(`
1265
+ `);
1266
+ }
1267
+ function sr(e, t) {
1268
+ return JSON.stringify({ ...e, ...t }, null, 2);
1269
+ }
1270
+ function ft({
1271
+ cardValues: e,
1272
+ extraValues: t = {},
1273
+ callbackUrl: n
1274
+ }) {
1275
+ const r = (n ?? "").trim() || "<callback_url>", o = sr(e, t);
1276
+ return [
1277
+ `curl -X POST '${r}' \\`,
1278
+ " -H 'Content-Type: application/json' \\",
1279
+ ` -d '${mt(o)}'`
1280
+ ].join(`
1281
+ `);
1282
+ }
1283
+ function cr(e, t) {
1284
+ const n = ut(e);
1285
+ if (!n) return dt(e, t);
1286
+ const r = pt(n.blocks);
1287
+ return ft({ cardValues: r, callbackUrl: t });
1288
+ }
1289
+ async function ur(e, t, n) {
1284
1290
  const r = e.trim();
1285
1291
  if (!r)
1286
1292
  throw new Error("callback_url 为空");
@@ -1292,22 +1298,22 @@ async function cr(e, t, n) {
1292
1298
  },
1293
1299
  body: JSON.stringify(t ?? {})
1294
1300
  });
1295
- let l;
1301
+ let i;
1296
1302
  if ((a.headers.get("content-type") ?? "").includes("application/json"))
1297
1303
  try {
1298
- l = await a.json();
1304
+ i = await a.json();
1299
1305
  } catch {
1300
- l = void 0;
1306
+ i = void 0;
1301
1307
  }
1302
1308
  else
1303
1309
  try {
1304
- l = await a.text();
1310
+ i = await a.text();
1305
1311
  } catch {
1306
- l = void 0;
1312
+ i = void 0;
1307
1313
  }
1308
- return { ok: a.ok, status: a.status, body: l };
1314
+ return { ok: a.ok, status: a.status, body: i };
1309
1315
  }
1310
- async function pt(e) {
1316
+ async function ht(e) {
1311
1317
  var n;
1312
1318
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1313
1319
  await navigator.clipboard.writeText(e);
@@ -1323,7 +1329,7 @@ async function pt(e) {
1323
1329
  document.body.removeChild(t);
1324
1330
  }
1325
1331
  }
1326
- async function ur(e) {
1332
+ async function pr(e) {
1327
1333
  let t;
1328
1334
  try {
1329
1335
  t = await e.json();
@@ -1336,45 +1342,45 @@ async function ur(e) {
1336
1342
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1337
1343
  return t.data;
1338
1344
  }
1339
- function Wr(e = {}) {
1345
+ function Zr(e = {}) {
1340
1346
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1341
1347
  async function o(a) {
1342
1348
  var p;
1343
- const l = new URLSearchParams();
1349
+ const i = new URLSearchParams();
1344
1350
  if (a.formId !== void 0)
1345
- l.set("form_id", String(a.formId));
1351
+ i.set("form_id", String(a.formId));
1346
1352
  else if (a.formUniqueId)
1347
- l.set("form_unique_id", a.formUniqueId);
1353
+ i.set("form_unique_id", a.formUniqueId);
1348
1354
  else
1349
1355
  throw new Error("form_id 或 form_unique_id 至少传一个");
1350
- const i = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, c = await r(`${t}${n}?${l.toString()}`, {
1356
+ const l = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, c = await r(`${t}${n}?${i.toString()}`, {
1351
1357
  method: "GET",
1352
- headers: i
1353
- }), u = await ur(c), m = Yn(u.form_definition);
1358
+ headers: l
1359
+ }), u = await pr(c), m = Zn(u.form_definition);
1354
1360
  return {
1355
1361
  formUniqueId: u.form_unique_id,
1356
1362
  formId: u.form_id,
1357
1363
  disabled: u.disabled === 1,
1358
1364
  formDefinition: m,
1359
- a2ui: Jn(u.form_definition) ?? void 0
1365
+ a2ui: Gn(u.form_definition) ?? void 0
1360
1366
  };
1361
1367
  }
1362
1368
  return { fetchDetail: o };
1363
1369
  }
1364
- const pr = {
1365
- video: Pt,
1366
- audio: Mt,
1367
- image: Ft,
1370
+ const mr = {
1371
+ video: zt,
1372
+ audio: Ut,
1373
+ image: _t,
1368
1374
  file: He,
1369
- spreadsheet: Nt,
1375
+ spreadsheet: Et,
1370
1376
  document: Je
1371
1377
  };
1372
- function mr({
1378
+ function dr({
1373
1379
  type: e,
1374
1380
  size: t = 40,
1375
1381
  className: n
1376
1382
  }) {
1377
- const r = pr[e] ?? He;
1383
+ const r = mr[e] ?? He;
1378
1384
  return /* @__PURE__ */ s(
1379
1385
  r,
1380
1386
  {
@@ -1384,7 +1390,7 @@ function mr({
1384
1390
  }
1385
1391
  );
1386
1392
  }
1387
- const mt = "skopon-form-v0_9", dr = /* @__PURE__ */ new Set([
1393
+ const gt = "skopon-form-v0_9", fr = /* @__PURE__ */ new Set([
1388
1394
  "SkoponMedia",
1389
1395
  "SkoponSelect",
1390
1396
  "Image",
@@ -1396,9 +1402,9 @@ const mt = "skopon-form-v0_9", dr = /* @__PURE__ */ new Set([
1396
1402
  "FileUpload",
1397
1403
  "TextField",
1398
1404
  "Text",
1399
- ...Rn()
1400
- ]), fr = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1401
- function re(e) {
1405
+ ...Vn()
1406
+ ]), hr = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1407
+ function oe(e) {
1402
1408
  const t = [...le.components.values()].find((n) => n.name === e);
1403
1409
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
1404
1410
  return t.schema;
@@ -1406,7 +1412,7 @@ function re(e) {
1406
1412
  function N(e) {
1407
1413
  return typeof e == "string" ? e : "";
1408
1414
  }
1409
- function dt(e) {
1415
+ function yt(e) {
1410
1416
  return Array.isArray(e) ? e.map((t) => {
1411
1417
  if (!t || typeof t != "object") return null;
1412
1418
  const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
@@ -1421,14 +1427,14 @@ function me({
1421
1427
  help: o,
1422
1428
  placeholder: a
1423
1429
  }) {
1424
- const l = r == null ? void 0 : r.trim(), i = o == null ? void 0 : o.trim(), c = Qt(n), u = (a == null ? void 0 : a.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1430
+ const i = r == null ? void 0 : r.trim(), l = o == null ? void 0 : o.trim(), c = rn(n), u = (a == null ? void 0 : a.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1425
1431
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1426
- l ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: l }) : null,
1432
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1427
1433
  t.length === 0 ? /* @__PURE__ */ s("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ s("div", { className: c, children: t.map((m, p) => e === "image" ? /* @__PURE__ */ s(
1428
1434
  "img",
1429
1435
  {
1430
1436
  src: m,
1431
- alt: l || "图片",
1437
+ alt: i || "图片",
1432
1438
  className: "form-media-item"
1433
1439
  },
1434
1440
  `media-${p}`
@@ -1449,7 +1455,7 @@ function me({
1449
1455
  },
1450
1456
  `media-${p}`
1451
1457
  )) }),
1452
- i ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: i }) : null
1458
+ l ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: l }) : null
1453
1459
  ] });
1454
1460
  }
1455
1461
  function de(e, t) {
@@ -1457,13 +1463,13 @@ function de(e, t) {
1457
1463
  return {
1458
1464
  mediaType: t,
1459
1465
  urls: n,
1460
- mediaSize: ne(e.mediaSize),
1466
+ mediaSize: re(e.mediaSize),
1461
1467
  label: N(e.label) || N(e.description),
1462
1468
  help: N(e.help),
1463
1469
  placeholder: N(e.placeholder)
1464
1470
  };
1465
1471
  }
1466
- const hr = {
1472
+ const gr = {
1467
1473
  name: "SkoponMedia",
1468
1474
  schema: d.object({
1469
1475
  mediaType: d.any().optional(),
@@ -1473,19 +1479,19 @@ const hr = {
1473
1479
  help: d.any().optional(),
1474
1480
  placeholder: d.any().optional()
1475
1481
  }).passthrough()
1476
- }, gr = z(hr, ({ context: e }) => {
1482
+ }, yr = R(gr, ({ context: e }) => {
1477
1483
  const t = e.componentModel.properties, n = N(t.mediaType);
1478
1484
  return /* @__PURE__ */ s(me, { ...de(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
1479
- }), yr = z(
1480
- { name: "Image", schema: re("Image") },
1485
+ }), vr = R(
1486
+ { name: "Image", schema: oe("Image") },
1481
1487
  ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "image") })
1482
- ), vr = z(
1483
- { name: "Video", schema: re("Video") },
1488
+ ), br = R(
1489
+ { name: "Video", schema: oe("Video") },
1484
1490
  ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "video") })
1485
- ), br = z(
1486
- { name: "AudioPlayer", schema: re("AudioPlayer") },
1491
+ ), Sr = R(
1492
+ { name: "AudioPlayer", schema: oe("AudioPlayer") },
1487
1493
  ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "audio") })
1488
- ), Sr = {
1494
+ ), kr = {
1489
1495
  name: "SkoponSelect",
1490
1496
  schema: d.object({
1491
1497
  label: d.any().optional(),
@@ -1495,8 +1501,8 @@ const hr = {
1495
1501
  value: d.any().optional()
1496
1502
  }).passthrough()
1497
1503
  };
1498
- function kr({ context: e }) {
1499
- const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), l = N(o.placeholder), i = dt(o.options), c = N(o.mode) === "multiple";
1504
+ function xr({ context: e }) {
1505
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = yt(o.options), c = N(o.mode) === "multiple";
1500
1506
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1501
1507
  a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1502
1508
  /* @__PURE__ */ s(
@@ -1507,20 +1513,20 @@ function kr({ context: e }) {
1507
1513
  allowClear: !0,
1508
1514
  className: "form-block-preview-control",
1509
1515
  style: { width: "100%" },
1510
- placeholder: l || (c ? "请选择多项" : "请选择"),
1511
- options: i,
1512
- value: c ? j(n) : Q(n),
1516
+ placeholder: i || (c ? "请选择多项" : "请选择"),
1517
+ options: l,
1518
+ value: c ? j(n) : ee(n),
1513
1519
  onChange: (u) => r(c ? u ?? [] : u ?? "")
1514
1520
  }
1515
1521
  )
1516
1522
  ] });
1517
1523
  }
1518
- const xr = z(
1519
- Sr,
1520
- kr
1524
+ const Ar = R(
1525
+ kr,
1526
+ xr
1521
1527
  );
1522
- function Ar({ context: e }) {
1523
- const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), l = N(o.variant) || "mutuallyExclusive", i = N(o.skoponPickerType), c = N(o.placeholder), u = dt(o.options), p = i === "select" || i === "multiselect" || i === "radio" || i === "checkbox" ? i : l === "multipleSelection" ? "checkbox" : "radio";
1528
+ function Tr({ context: e }) {
1529
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.variant) || "mutuallyExclusive", l = N(o.skoponPickerType), c = N(o.placeholder), u = yt(o.options), p = l === "select" || l === "multiselect" || l === "radio" || l === "checkbox" ? l : i === "multipleSelection" ? "checkbox" : "radio";
1524
1530
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1525
1531
  a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1526
1532
  p === "select" ? /* @__PURE__ */ s(
@@ -1532,7 +1538,7 @@ function Ar({ context: e }) {
1532
1538
  style: { width: "100%" },
1533
1539
  placeholder: c || "请选择",
1534
1540
  options: u,
1535
- value: Q(n),
1541
+ value: ee(n),
1536
1542
  onChange: (y) => r(y ?? "")
1537
1543
  }
1538
1544
  ) : p === "multiselect" ? /* @__PURE__ */ s(
@@ -1549,7 +1555,7 @@ function Ar({ context: e }) {
1549
1555
  onChange: (y) => r(y ?? [])
1550
1556
  }
1551
1557
  ) : p === "checkbox" ? /* @__PURE__ */ s(
1552
- bt.Group,
1558
+ At.Group,
1553
1559
  {
1554
1560
  disabled: !t,
1555
1561
  className: "form-block-preview-control",
@@ -1558,18 +1564,18 @@ function Ar({ context: e }) {
1558
1564
  onChange: (y) => r(y)
1559
1565
  }
1560
1566
  ) : /* @__PURE__ */ s(
1561
- St.Group,
1567
+ Tt.Group,
1562
1568
  {
1563
1569
  disabled: !t,
1564
1570
  className: "form-block-preview-control",
1565
1571
  options: u,
1566
- value: Q(n),
1572
+ value: ee(n),
1567
1573
  onChange: (y) => r(y.target.value)
1568
1574
  }
1569
1575
  )
1570
1576
  ] });
1571
1577
  }
1572
- const Tr = z(
1578
+ const Cr = R(
1573
1579
  {
1574
1580
  name: "ChoicePicker",
1575
1581
  schema: d.object({
@@ -1581,29 +1587,29 @@ const Tr = z(
1581
1587
  placeholder: d.any().optional()
1582
1588
  }).passthrough()
1583
1589
  },
1584
- Ar
1590
+ Tr
1585
1591
  );
1586
- function Cr({ context: e }) {
1592
+ function Ir({ context: e }) {
1587
1593
  const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label);
1588
1594
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1589
1595
  a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1590
1596
  /* @__PURE__ */ s(
1591
- kt,
1597
+ Ct,
1592
1598
  {
1593
1599
  disabled: !t,
1594
1600
  className: "form-block-preview-control",
1595
1601
  checked: we(n),
1596
- onChange: (l) => r(l)
1602
+ onChange: (i) => r(i)
1597
1603
  }
1598
1604
  )
1599
1605
  ] });
1600
1606
  }
1601
- const Ir = z(
1602
- { name: "CheckBox", schema: re("CheckBox") },
1603
- Cr
1607
+ const Nr = R(
1608
+ { name: "CheckBox", schema: oe("CheckBox") },
1609
+ Ir
1604
1610
  );
1605
- function Nr(e, t, n) {
1606
- const r = Q(e);
1611
+ function Fr(e, t, n) {
1612
+ const r = ee(e);
1607
1613
  if (!r) return;
1608
1614
  if (!t && n) {
1609
1615
  const a = qe(r, "HH:mm", !0);
@@ -1612,17 +1618,17 @@ function Nr(e, t, n) {
1612
1618
  const o = qe(r);
1613
1619
  return o.isValid() ? o : void 0;
1614
1620
  }
1615
- function Fr({ context: e }) {
1616
- const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), l = N(o.placeholder), i = o.enableDate === !0, c = o.enableTime === !0, u = Nr(n, i, c), m = (p) => {
1621
+ function Pr({ context: e }) {
1622
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = o.enableDate === !0, c = o.enableTime === !0, u = Fr(n, l, c), m = (p) => {
1617
1623
  if (!p) {
1618
1624
  r("");
1619
1625
  return;
1620
1626
  }
1621
- if (!i && c) {
1627
+ if (!l && c) {
1622
1628
  r(p.format("HH:mm"));
1623
1629
  return;
1624
1630
  }
1625
- if (i && c) {
1631
+ if (l && c) {
1626
1632
  r(p.format("YYYY-MM-DDTHH:mm"));
1627
1633
  return;
1628
1634
  }
@@ -1630,31 +1636,31 @@ function Fr({ context: e }) {
1630
1636
  };
1631
1637
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1632
1638
  a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1633
- !i && c ? /* @__PURE__ */ s(
1634
- xt,
1639
+ !l && c ? /* @__PURE__ */ s(
1640
+ It,
1635
1641
  {
1636
1642
  disabled: !t,
1637
1643
  className: "form-block-preview-control",
1638
1644
  style: { width: "100%" },
1639
- placeholder: l || "选择时间",
1645
+ placeholder: i || "选择时间",
1640
1646
  value: u,
1641
1647
  onChange: m
1642
1648
  }
1643
1649
  ) : /* @__PURE__ */ s(
1644
- At,
1650
+ Nt,
1645
1651
  {
1646
- showTime: i && c,
1652
+ showTime: l && c,
1647
1653
  disabled: !t,
1648
1654
  className: "form-block-preview-control",
1649
1655
  style: { width: "100%" },
1650
- placeholder: l || (i && c ? "选择日期时间" : "选择日期"),
1656
+ placeholder: i || (l && c ? "选择日期时间" : "选择日期"),
1651
1657
  value: u,
1652
1658
  onChange: m
1653
1659
  }
1654
1660
  )
1655
1661
  ] });
1656
1662
  }
1657
- const Mr = z(
1663
+ const Mr = R(
1658
1664
  {
1659
1665
  name: "DateTimeInput",
1660
1666
  schema: d.object({
@@ -1667,8 +1673,8 @@ const Mr = z(
1667
1673
  max: d.any().optional()
1668
1674
  }).passthrough()
1669
1675
  },
1670
- Fr
1671
- ), Pr = {
1676
+ Pr
1677
+ ), Er = {
1672
1678
  name: "FileUpload",
1673
1679
  schema: d.object({
1674
1680
  label: d.any().optional(),
@@ -1680,8 +1686,8 @@ const Mr = z(
1680
1686
  value: d.any().optional()
1681
1687
  }).passthrough()
1682
1688
  };
1683
- function Er({ context: e }) {
1684
- const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), l = N(o.accept), i = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = l ? l.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = Jt(i, c), m = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1689
+ function _r({ context: e }) {
1690
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.accept), l = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = i ? i.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = Gt(l, c), m = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1685
1691
  o.filePlaceholderIcon
1686
1692
  ) ? o.filePlaceholderIcon : "document", p = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, y = typeof o.maxCount == "number" ? o.maxCount : 1, S = y > 0, C = j(n), F = S && C.length >= y, T = C.length < p;
1687
1693
  return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
@@ -1690,7 +1696,7 @@ function Er({ context: e }) {
1690
1696
  ge.Dragger,
1691
1697
  {
1692
1698
  disabled: !t || F,
1693
- accept: Kt(i, c),
1699
+ accept: Xt(l, c),
1694
1700
  className: "form-file-upload-preview",
1695
1701
  showUploadList: t && C.length > 0,
1696
1702
  fileList: t ? C.map((f, h) => ({
@@ -1706,12 +1712,12 @@ function Er({ context: e }) {
1706
1712
  return r(k), !1;
1707
1713
  },
1708
1714
  onRemove: (f) => {
1709
- const h = j(Le(e)), k = /^(\d+)-/.exec(f.uid ?? ""), v = k ? Number(k[1]) : -1, b = v >= 0 && v < h.length ? h.filter((P, R) => R !== v) : h.filter((P) => P !== f.name);
1715
+ const h = j(Le(e)), k = /^(\d+)-/.exec(f.uid ?? ""), v = k ? Number(k[1]) : -1, b = v >= 0 && v < h.length ? h.filter((M, w) => w !== v) : h.filter((M) => M !== f.name);
1710
1716
  if (b.length < p) return !1;
1711
1717
  r(b);
1712
1718
  },
1713
1719
  children: [
1714
- /* @__PURE__ */ s("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ s(mr, { type: m, size: 40 }) }),
1720
+ /* @__PURE__ */ s("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ s(dr, { type: m, size: 40 }) }),
1715
1721
  /* @__PURE__ */ s("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
1716
1722
  ]
1717
1723
  }
@@ -1725,44 +1731,44 @@ function Er({ context: e }) {
1725
1731
  ] })
1726
1732
  ] });
1727
1733
  }
1728
- const Ur = z(
1729
- Pr,
1730
- Er
1734
+ const Ur = R(
1735
+ Er,
1736
+ _r
1731
1737
  );
1732
- function _r({ context: e }) {
1733
- const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), l = N(o.placeholder), i = N(o.variant) || "shortText", c = Q(n) ?? "", u = !t, m = "form-block-preview-control";
1738
+ function zr({ context: e }) {
1739
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = N(o.variant) || "shortText", c = ee(n) ?? "", u = !t, m = "form-block-preview-control";
1734
1740
  let p;
1735
- if (i === "longText")
1741
+ if (l === "longText")
1736
1742
  p = /* @__PURE__ */ s(
1737
1743
  ye.TextArea,
1738
1744
  {
1739
1745
  disabled: u,
1740
1746
  className: m,
1741
- placeholder: l || "长文本回答...",
1747
+ placeholder: i || "长文本回答...",
1742
1748
  autoSize: { minRows: 2, maxRows: 6 },
1743
1749
  value: c,
1744
1750
  onChange: (y) => r(y.target.value)
1745
1751
  }
1746
1752
  );
1747
- else if (i === "number") {
1753
+ else if (l === "number") {
1748
1754
  const y = c && Number.isFinite(Number(c)) ? Number(c) : void 0;
1749
1755
  p = /* @__PURE__ */ s(
1750
- Tt,
1756
+ Ft,
1751
1757
  {
1752
1758
  disabled: u,
1753
1759
  className: m,
1754
1760
  style: { width: "100%" },
1755
- placeholder: l || "数字",
1761
+ placeholder: i || "数字",
1756
1762
  value: y,
1757
1763
  onChange: (S) => r(S == null ? "" : String(S))
1758
1764
  }
1759
1765
  );
1760
- } else i === "obscured" ? p = /* @__PURE__ */ s(
1766
+ } else l === "obscured" ? p = /* @__PURE__ */ s(
1761
1767
  ye.Password,
1762
1768
  {
1763
1769
  disabled: u,
1764
1770
  className: m,
1765
- placeholder: l,
1771
+ placeholder: i,
1766
1772
  value: c,
1767
1773
  onChange: (y) => r(y.target.value)
1768
1774
  }
@@ -1771,7 +1777,7 @@ function _r({ context: e }) {
1771
1777
  {
1772
1778
  disabled: u,
1773
1779
  className: m,
1774
- placeholder: l,
1780
+ placeholder: i,
1775
1781
  value: c,
1776
1782
  onChange: (y) => r(y.target.value)
1777
1783
  }
@@ -1781,7 +1787,7 @@ function _r({ context: e }) {
1781
1787
  p
1782
1788
  ] });
1783
1789
  }
1784
- const zr = z(
1790
+ const Rr = R(
1785
1791
  {
1786
1792
  name: "TextField",
1787
1793
  schema: d.object({
@@ -1792,65 +1798,65 @@ const zr = z(
1792
1798
  value: d.any().optional()
1793
1799
  }).passthrough()
1794
1800
  },
1795
- _r
1801
+ zr
1796
1802
  );
1797
- function Rr({ context: e }) {
1803
+ function wr({ context: e }) {
1798
1804
  const t = e.componentModel.properties, n = N(t.text), r = N(t.variant) || "body";
1799
- return fr.has(r) ? r === "caption" ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ s("em", { children: n }) }) : /* @__PURE__ */ s(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ s(L.Paragraph, { className: "form-block-preview-paragraph", children: n });
1805
+ return hr.has(r) ? r === "caption" ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ s("em", { children: n }) }) : /* @__PURE__ */ s(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ s(L.Paragraph, { className: "form-block-preview-paragraph", children: n });
1800
1806
  }
1801
- const wr = z(
1802
- { name: "Text", schema: re("Text") },
1803
- Rr
1807
+ const Or = R(
1808
+ { name: "Text", schema: oe("Text") },
1809
+ wr
1804
1810
  );
1805
- function ft() {
1811
+ function vt() {
1806
1812
  const t = [
1807
1813
  ...[...le.components.values()].filter(
1808
- (r) => !dr.has(r.name)
1814
+ (r) => !fr.has(r.name)
1809
1815
  ),
1810
- gr,
1811
- xr,
1812
1816
  yr,
1817
+ Ar,
1813
1818
  vr,
1814
1819
  br,
1815
- Tr,
1816
- Ir,
1820
+ Sr,
1821
+ Cr,
1822
+ Nr,
1817
1823
  Mr,
1818
1824
  Ur,
1819
- zr,
1820
- wr,
1821
- ...zn()
1825
+ Rr,
1826
+ Or,
1827
+ ...Bn()
1822
1828
  ], n = [...le.functions.values()];
1823
- return new Et(mt, t, n, le.themeSchema);
1829
+ return new Rt(gt, t, n, le.themeSchema);
1824
1830
  }
1825
- const Or = gt(
1831
+ const Br = St(
1826
1832
  function({
1827
1833
  doc: t,
1828
1834
  surfaceId: n = "skopon-form",
1829
1835
  emptyHint: r = null,
1830
1836
  interactive: o = !0,
1831
1837
  fieldNames: a = [],
1832
- resumeSearch: l = null,
1833
- caseSearch: i = null
1838
+ resumeSearch: i = null,
1839
+ caseSearch: l = null
1834
1840
  }, c) {
1835
1841
  V(() => {
1836
1842
  We(), Ge();
1837
1843
  }, []);
1838
1844
  const u = B(null), m = B(a);
1839
1845
  m.current = a;
1840
- const p = O(() => {
1841
- if (Me(t)) return "";
1846
+ const p = z(() => {
1847
+ if (Pe(t)) return "";
1842
1848
  try {
1843
1849
  return JSON.stringify(t);
1844
1850
  } catch {
1845
1851
  return String(t);
1846
1852
  }
1847
- }, [t]), y = O(() => {
1853
+ }, [t]), y = z(() => {
1848
1854
  if (!p)
1849
1855
  return { surfaces: [], processor: null };
1850
1856
  try {
1851
- const F = JSON.parse(p), T = new Xe([ft()]), f = Kn(F, {
1857
+ const F = JSON.parse(p), T = new Xe([vt()]), f = Xn(F, {
1852
1858
  surfaceId: n,
1853
- catalogId: mt
1859
+ catalogId: gt
1854
1860
  });
1855
1861
  return T.processMessages(f), {
1856
1862
  surfaces: Array.from(T.model.surfacesMap.values()),
@@ -1860,24 +1866,24 @@ const Or = gt(
1860
1866
  return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", F), { surfaces: [], processor: null };
1861
1867
  }
1862
1868
  }, [p, n]), { surfaces: S, processor: C } = y;
1863
- return u.current = C, yt(
1869
+ return u.current = C, kt(
1864
1870
  c,
1865
1871
  () => ({
1866
1872
  getValues(F) {
1867
1873
  const T = u.current;
1868
1874
  if (!T) return {};
1869
1875
  const f = (F ?? m.current).map((h) => h.trim()).filter(Boolean);
1870
- return Xn(T, n, f);
1876
+ return Qn(T, n, f);
1871
1877
  }
1872
1878
  }),
1873
1879
  [n]
1874
- ), S.length === 0 ? /* @__PURE__ */ s(De, { children: r }) : /* @__PURE__ */ s(at, { resumeSearch: l, children: /* @__PURE__ */ s(rt, { caseSearch: i, children: /* @__PURE__ */ s(et, { interactive: o, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: S.map((F) => /* @__PURE__ */ s(Ye, { surface: F }, F.id)) }) }) }) });
1880
+ ), S.length === 0 ? /* @__PURE__ */ s(De, { children: r }) : /* @__PURE__ */ s(at, { resumeSearch: i, children: /* @__PURE__ */ s(rt, { caseSearch: l, children: /* @__PURE__ */ s(et, { interactive: o, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: S.map((F) => /* @__PURE__ */ s(Ye, { surface: F }, F.id)) }) }) }) });
1875
1881
  }
1876
1882
  );
1877
- function ae() {
1878
- return new Xe([ft()]);
1883
+ function ie() {
1884
+ return new Xe([vt()]);
1879
1885
  }
1880
- function Zr({
1886
+ function Qr({
1881
1887
  messages: e,
1882
1888
  surfaceId: t = "skopon-form-stream",
1883
1889
  emptyHint: n = null,
@@ -1888,11 +1894,11 @@ function Zr({
1888
1894
  V(() => {
1889
1895
  We(), Ge();
1890
1896
  }, []);
1891
- const l = B(null);
1892
- l.current === null && (l.current = ae());
1893
- const i = B(0), c = B(""), u = B(!0), m = B(t);
1897
+ const i = B(null);
1898
+ i.current === null && (i.current = ie());
1899
+ const l = B(0), c = B(""), u = B(!0), m = B(t);
1894
1900
  function p(f, h) {
1895
- l.current = f, i.current = h.length, c.current = JSON.stringify(h), u.current && (C(f), T(Array.from(f.model.surfacesMap.values())));
1901
+ i.current = f, l.current = h.length, c.current = JSON.stringify(h), u.current && (C(f), T(Array.from(f.model.surfacesMap.values())));
1896
1902
  }
1897
1903
  function y(f, h) {
1898
1904
  if (h <= 0) return !1;
@@ -1906,16 +1912,16 @@ function Zr({
1906
1912
  }
1907
1913
  }
1908
1914
  const [S, C] = E(
1909
- () => l.current
1915
+ () => i.current
1910
1916
  ), [F, T] = E(
1911
1917
  () => Array.from(
1912
- l.current.model.surfacesMap.values()
1918
+ i.current.model.surfacesMap.values()
1913
1919
  )
1914
1920
  );
1915
1921
  return V(() => (u.current = !0, () => {
1916
1922
  u.current = !1;
1917
1923
  }), []), V(() => {
1918
- l.current = S;
1924
+ i.current = S;
1919
1925
  }, [S]), V(() => {
1920
1926
  const f = () => {
1921
1927
  u.current && T(Array.from(S.model.surfacesMap.values()));
@@ -1927,67 +1933,69 @@ function Zr({
1927
1933
  let f = !1;
1928
1934
  const h = m.current !== t;
1929
1935
  if (m.current = t, h) {
1930
- const P = ae();
1931
- return Array.isArray(e) && e.length > 0 ? (P.processMessages(e), f || p(P, e)) : (l.current = P, i.current = 0, c.current = "", f || (C(P), T([]))), () => {
1936
+ const M = ie();
1937
+ return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), f || p(M, e)) : (i.current = M, l.current = 0, c.current = "", f || (C(M), T([]))), () => {
1932
1938
  f = !0;
1933
1939
  };
1934
1940
  }
1935
1941
  if (!Array.isArray(e) || e.length === 0) {
1936
- if (i.current > 0) {
1937
- const P = ae();
1938
- l.current = P, i.current = 0, c.current = "", f || (C(P), T([]));
1942
+ if (l.current > 0) {
1943
+ const M = ie();
1944
+ i.current = M, l.current = 0, c.current = "", f || (C(M), T([]));
1939
1945
  }
1940
1946
  return () => {
1941
1947
  f = !0;
1942
1948
  };
1943
1949
  }
1944
- const k = l.current, v = i.current;
1950
+ const k = i.current, v = l.current;
1945
1951
  if (e.length < v || y(e, v)) {
1946
- const P = ae();
1947
- return P.processMessages(e), f || p(P, e), () => {
1952
+ const M = ie();
1953
+ return M.processMessages(e), f || p(M, e), () => {
1948
1954
  f = !0;
1949
1955
  };
1950
1956
  }
1951
1957
  const b = e.slice(v);
1952
1958
  return b.length === 0 ? () => {
1953
1959
  f = !0;
1954
- } : (k.processMessages(b), i.current = e.length, c.current = JSON.stringify(e), f || T(Array.from(k.model.surfacesMap.values())), () => {
1960
+ } : (k.processMessages(b), l.current = e.length, c.current = JSON.stringify(e), f || T(Array.from(k.model.surfacesMap.values())), () => {
1955
1961
  f = !0;
1956
1962
  });
1957
1963
  }, [e, t]), F.length === 0 ? /* @__PURE__ */ s(De, { children: n }) : /* @__PURE__ */ s(at, { resumeSearch: o, children: /* @__PURE__ */ s(rt, { caseSearch: a, children: /* @__PURE__ */ s(et, { interactive: r, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: F.map((f) => /* @__PURE__ */ s(Ye, { surface: f }, f.id)) }) }) }) });
1958
1964
  }
1959
- function Br({
1965
+ function Vr({
1960
1966
  payload: e,
1961
1967
  callbackUrl: t,
1962
1968
  title: n,
1963
1969
  unpublishedFormId: r,
1964
1970
  incompleteFormId: o,
1965
- onNotify: a
1971
+ copyMode: a = "display",
1972
+ onNotify: i
1966
1973
  }) {
1967
- const l = O(
1968
- () => Gn(e, t),
1974
+ const l = z(
1975
+ () => dt(e, t),
1969
1976
  [e, t]
1970
- );
1971
- async function i() {
1977
+ ), c = z(() => a === "submitFields" ? cr(e, t) : l, [a, e, t, l]);
1978
+ async function u() {
1972
1979
  try {
1973
- await pt(l), a == null || a("success", "已复制到剪贴板");
1980
+ await ht(c), i == null || i("success", "已复制到剪贴板");
1974
1981
  } catch {
1975
- a == null || a("error", "复制失败");
1982
+ i == null || i("error", "复制失败");
1976
1983
  }
1977
1984
  }
1985
+ const m = a === "submitFields" ? "复制提交字段 curl(向 callback 回传)" : "复制 curl";
1978
1986
  return /* @__PURE__ */ x("div", { className: "ask-user-curl-card", children: [
1979
1987
  /* @__PURE__ */ x("div", { className: "ask-user-curl-card-header", children: [
1980
1988
  /* @__PURE__ */ x("div", { className: "ask-user-curl-card-header-title", children: [
1981
1989
  /* @__PURE__ */ s(L.Text, { type: "secondary", children: n ?? "curl 命令" }),
1982
- r ? /* @__PURE__ */ s(ie, { title: r, children: /* @__PURE__ */ s(Z, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
1983
- o ? /* @__PURE__ */ s(ie, { title: o, children: /* @__PURE__ */ s(Z, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
1990
+ r ? /* @__PURE__ */ s(Z, { title: r, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
1991
+ o ? /* @__PURE__ */ s(Z, { title: o, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
1984
1992
  ] }),
1985
- /* @__PURE__ */ s(ue, { size: "small", type: "text", onClick: () => void i(), children: "复制" })
1993
+ /* @__PURE__ */ s(Z, { title: m, children: /* @__PURE__ */ s(ue, { size: "small", type: "text", onClick: () => void u(), children: "复制" }) })
1986
1994
  ] }),
1987
1995
  /* @__PURE__ */ s("pre", { className: "skopon-form-curl-json", children: l })
1988
1996
  ] });
1989
1997
  }
1990
- function Vr(e, t) {
1998
+ function qr(e, t) {
1991
1999
  if (t && typeof t == "object" && t !== null && "message" in t) {
1992
2000
  const n = t.message;
1993
2001
  if (typeof n == "string" && n.trim())
@@ -1995,15 +2003,15 @@ function Vr(e, t) {
1995
2003
  }
1996
2004
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
1997
2005
  }
1998
- function Qr({
2006
+ function eo({
1999
2007
  payload: e,
2000
2008
  formUniqueId: t,
2001
2009
  callbackUrl: n,
2002
2010
  submitMode: r = "curl",
2003
2011
  fetchFormDetail: o,
2004
2012
  onNotify: a,
2005
- resumeSearch: l = null,
2006
- caseSearch: i = null
2013
+ resumeSearch: i = null,
2014
+ caseSearch: l = null
2007
2015
  }) {
2008
2016
  const [c, u] = E(null), [m, p] = E(!1), [y, S] = E(!0), [C, F] = E(!1), T = B(null), f = B(!0), h = B(a);
2009
2017
  h.current = a;
@@ -2015,11 +2023,11 @@ function Qr({
2015
2023
  return k ? (S(!0), p(!1), o({ formUniqueId: k }).then((A) => {
2016
2024
  g || (p(!!A.disabled), u(A.formDefinition ?? null));
2017
2025
  }).catch((A) => {
2018
- var M;
2026
+ var P;
2019
2027
  if (!g) {
2020
2028
  p(!1), u(null);
2021
2029
  const I = A instanceof Error ? A.message : "获取表单定义失败";
2022
- (M = h.current) == null || M.call(h, "error", I);
2030
+ (P = h.current) == null || P.call(h, "error", I);
2023
2031
  }
2024
2032
  }).finally(() => {
2025
2033
  g || S(!1);
@@ -2029,22 +2037,22 @@ function Qr({
2029
2037
  g = !0;
2030
2038
  });
2031
2039
  }, [k, o]);
2032
- const v = O(() => nr(e), [e]), b = O(() => v ? rr(v, c ?? void 0) : null, [v, c]), P = (b == null ? void 0 : b.matchedBlocks) ?? [], R = !!(v && lr(v) && P.length === 0), _ = O(() => R && v ? ir(v) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, R, v]), w = O(
2033
- () => R ? {} : ar((b == null ? void 0 : b.extraBlocks) ?? []),
2034
- [R, b]
2035
- ), q = O(() => R && v ? sr(v) : _.filter((g) => {
2040
+ const v = z(() => ut(e), [e]), b = z(() => v ? rr(v, c ?? void 0) : null, [v, c]), M = (b == null ? void 0 : b.matchedBlocks) ?? [], w = !!(v && ar(v) && M.length === 0), U = z(() => w && v ? ir(v) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, w, v]), O = z(
2041
+ () => w ? {} : pt((b == null ? void 0 : b.extraBlocks) ?? []),
2042
+ [w, b]
2043
+ ), q = z(() => w && v ? lr(v) : U.filter((g) => {
2036
2044
  var A;
2037
2045
  return (A = g.name) == null ? void 0 : A.trim();
2038
- }).map((g) => g.name.trim()), [R, v, _]), K = O(() => {
2039
- if (_.length === 0) return null;
2046
+ }).map((g) => g.name.trim()), [w, v, U]), K = z(() => {
2047
+ if (U.length === 0) return null;
2040
2048
  const g = (b == null ? void 0 : b.title) ?? (v == null ? void 0 : v.title) ?? "", A = (b == null ? void 0 : b.description) ?? (v == null ? void 0 : v.description) ?? "";
2041
- return Hn({ title: g, description: A }, _);
2042
- }, [b, v, _]), Y = k ? `ask-user-${k}` : "ask-user-payload";
2049
+ return Wn({ title: g, description: A }, U);
2050
+ }, [b, v, U]), Y = k ? `ask-user-${k}` : "ask-user-payload";
2043
2051
  if (y)
2044
- return /* @__PURE__ */ s("div", { className: "ask-user-form-card", children: /* @__PURE__ */ s(Ue, { size: "small" }) });
2045
- if (!v || _.length === 0)
2052
+ return /* @__PURE__ */ s("div", { className: "ask-user-form-card", children: /* @__PURE__ */ s(_e, { size: "small" }) });
2053
+ if (!v || U.length === 0)
2046
2054
  return /* @__PURE__ */ s(
2047
- Br,
2055
+ Vr,
2048
2056
  {
2049
2057
  payload: e,
2050
2058
  callbackUrl: n,
@@ -2053,24 +2061,24 @@ function Qr({
2053
2061
  }
2054
2062
  );
2055
2063
  async function X() {
2056
- var g, A, M, I, Oe, Be;
2064
+ var g, A, P, I, Oe, Be;
2057
2065
  if (!C) {
2058
2066
  F(!0);
2059
2067
  try {
2060
- const G = ((g = T.current) == null ? void 0 : g.getValues(q)) ?? {}, fe = { ...G, ...w };
2068
+ const G = ((g = T.current) == null ? void 0 : g.getValues(q)) ?? {}, fe = { ...G, ...O };
2061
2069
  if (r === "post") {
2062
2070
  const Ve = (n ?? "").trim();
2063
2071
  if (!Ve) {
2064
2072
  (A = h.current) == null || A.call(h, "error", "callback_url 为空,无法提交");
2065
2073
  return;
2066
2074
  }
2067
- const he = await cr(Ve, fe);
2075
+ const he = await ur(Ve, fe);
2068
2076
  if (!f.current) return;
2069
- he.ok ? (M = h.current) == null || M.call(h, "success", "提交成功") : (I = h.current) == null || I.call(h, "error", Vr(he.status, he.body));
2077
+ he.ok ? (P = h.current) == null || P.call(h, "success", "提交成功") : (I = h.current) == null || I.call(h, "error", qr(he.status, he.body));
2070
2078
  return;
2071
2079
  }
2072
- if (await pt(
2073
- Zn({ cardValues: G, extraValues: w, callbackUrl: n })
2080
+ if (await ht(
2081
+ ft({ cardValues: G, extraValues: O, callbackUrl: n })
2074
2082
  ), !f.current) return;
2075
2083
  (Oe = h.current) == null || Oe.call(h, "success", "已复制 curl 到剪贴板");
2076
2084
  } catch (G) {
@@ -2083,20 +2091,20 @@ function Qr({
2083
2091
  }
2084
2092
  }
2085
2093
  return /* @__PURE__ */ x("div", { className: "ask-user-form-card", children: [
2086
- m && k ? /* @__PURE__ */ s("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ s(ie, { title: k, children: /* @__PURE__ */ s(Z, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2094
+ m && k ? /* @__PURE__ */ s("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ s(Z, { title: k, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2087
2095
  /* @__PURE__ */ s(
2088
- Or,
2096
+ Br,
2089
2097
  {
2090
2098
  ref: T,
2091
2099
  doc: K,
2092
2100
  surfaceId: Y,
2093
2101
  fieldNames: q,
2094
2102
  interactive: !0,
2095
- resumeSearch: l,
2096
- caseSearch: i
2103
+ resumeSearch: i,
2104
+ caseSearch: l
2097
2105
  }
2098
2106
  ),
2099
- /* @__PURE__ */ s("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ s(ie, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ s(
2107
+ /* @__PURE__ */ s("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ s(Z, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ s(
2100
2108
  ue,
2101
2109
  {
2102
2110
  type: "primary",
@@ -2110,39 +2118,40 @@ function Qr({
2110
2118
  ] });
2111
2119
  }
2112
2120
  export {
2113
- Gr as A2UI_PROTOCOL_VERSION,
2114
- Qr as AskUserFormCard,
2121
+ Wr as A2UI_PROTOCOL_VERSION,
2122
+ eo as AskUserFormCard,
2115
2123
  rt as CaseSearchProvider,
2116
- Br as CurlSubmitBlock,
2117
- Ut as FORM_MEDIA_SIZES,
2124
+ Vr as CurlSubmitBlock,
2125
+ wt as FORM_MEDIA_SIZES,
2118
2126
  at as ResumeSearchProvider,
2119
- Zr as SkoponA2uiStreamRenderer,
2120
- Or as SkoponFormRenderer,
2121
- Dn as a2uiToBlocks,
2122
- it as blocksToA2ui,
2123
- Wn as buildAskUserCurlBodyJson,
2124
- Zn as buildAskUserCurlStatement,
2125
- Hn as buildAskUserSurface,
2126
- Gn as buildCurlStatement,
2127
- pt as copyTextToClipboard,
2128
- Wr as createFormClient,
2129
- ar as extractExtraBlockValues,
2130
- Xn as extractSurfaceValues,
2131
- sr as getPayloadInputFieldNames,
2127
+ Qr as SkoponA2uiStreamRenderer,
2128
+ Br as SkoponFormRenderer,
2129
+ Yn as a2uiToBlocks,
2130
+ lt as blocksToA2ui,
2131
+ sr as buildAskUserCurlBodyJson,
2132
+ ft as buildAskUserCurlStatement,
2133
+ cr as buildAskUserSubmitCurlFromPayload,
2134
+ Wn as buildAskUserSurface,
2135
+ dt as buildCurlStatement,
2136
+ ht as copyTextToClipboard,
2137
+ Zr as createFormClient,
2138
+ pt as extractExtraBlockValues,
2139
+ Qn as extractSurfaceValues,
2140
+ lr as getPayloadInputFieldNames,
2132
2141
  ir as getPayloadRenderableBlocks,
2133
2142
  rr as intersectPayloadBlocksWithForm,
2134
- Me as isA2uiSurfaceEmpty,
2143
+ Pe as isA2uiSurfaceEmpty,
2135
2144
  J as isInputBlockType,
2136
- _e as isLayoutBlockType,
2145
+ Ue as isLayoutBlockType,
2137
2146
  Ie as isMediaBlockType,
2138
- Yn as mapFormDefinitionFromDto,
2147
+ Zn as mapFormDefinitionFromDto,
2139
2148
  H as normalizeFormDefinition,
2140
- nr as parsePayloadBlocksJson,
2141
- lr as payloadHasInputBlocks,
2142
- Jn as resolveSurfaceFromFormDefinition,
2143
- cr as submitFormJson,
2144
- Kn as surfaceDocToMessages,
2149
+ ut as parsePayloadBlocksJson,
2150
+ ar as payloadHasInputBlocks,
2151
+ Gn as resolveSurfaceFromFormDefinition,
2152
+ ur as submitFormJson,
2153
+ Xn as surfaceDocToMessages,
2145
2154
  se as syncFormDefinition,
2146
- un as useCaseSearch,
2147
- bn as useResumeSearch
2155
+ fn as useCaseSearch,
2156
+ An as useResumeSearch
2148
2157
  };