@harbor-design/proform 1.3.19 → 1.3.21

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.
Files changed (2) hide show
  1. package/dist/index.js +497 -479
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Te = Object.defineProperty;
2
- var ze = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var u = (t, e, r) => (ze(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { ref as z, readonly as Pe, nextTick as O, isRef as F, watch as g, isReactive as U, toRaw as E, reactive as K, createVNode as b, mergeProps as q, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
2
+ var ze = (r, e, t) => e in r ? Te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var u = (r, e, t) => (ze(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { ref as z, readonly as Pe, nextTick as j, isRef as I, watch as g, isReactive as S, toRaw as R, reactive as K, createVNode as b, mergeProps as U, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as He } from "vue";
5
5
  class o {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -50,17 +50,17 @@ class o {
50
50
  return !1;
51
51
  if (this.isObjectEmpty(e))
52
52
  return !0;
53
- for (const r in e) {
54
- if (r === "componentProps")
53
+ for (const t in e) {
54
+ if (t === "componentProps")
55
55
  return !1;
56
- if (e.hasOwnProperty(r) && this.isProcessInprogress(e[r]))
56
+ if (e.hasOwnProperty(t) && this.isProcessInprogress(e[t]))
57
57
  return !0;
58
58
  }
59
59
  } else if (this.isArray(e)) {
60
60
  if (this.isArrayEmpty(e))
61
61
  return !0;
62
- for (const r of e)
63
- if (this.isProcessInprogress(r))
62
+ for (const t of e)
63
+ if (this.isProcessInprogress(t))
64
64
  return !0;
65
65
  }
66
66
  return !1;
@@ -69,20 +69,20 @@ class o {
69
69
  return !!e.__proform_raw_object;
70
70
  }
71
71
  }
72
- function h(t, ...e) {
73
- return e.forEach((r) => {
74
- if (Array.isArray(r))
75
- Array.isArray(t) || (t = []), r.forEach((i, s) => {
76
- typeof i == "object" && i !== null ? t[s] = h(Array.isArray(i) ? [] : {}, i) : t[s] = i;
72
+ function h(r, ...e) {
73
+ return e.forEach((t) => {
74
+ if (Array.isArray(t))
75
+ Array.isArray(r) || (r = []), t.forEach((i, s) => {
76
+ typeof i == "object" && i !== null ? r[s] = h(Array.isArray(i) ? [] : {}, i) : r[s] = i;
77
77
  });
78
78
  else
79
- for (const i in r)
80
- r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] = h(t[i] || {}, r[i]) : t[i] = r[i]);
81
- }), t;
79
+ for (const i in t)
80
+ t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = h(r[i] || {}, t[i]) : r[i] = t[i]);
81
+ }), r;
82
82
  }
83
- function P(t) {
83
+ function P(r) {
84
84
  const e = /* @__PURE__ */ new WeakMap();
85
- function r(i) {
85
+ function t(i) {
86
86
  if (i === null || typeof i != "object")
87
87
  return i;
88
88
  if (i instanceof Date)
@@ -92,13 +92,13 @@ function P(t) {
92
92
  if (i instanceof Map) {
93
93
  const n = /* @__PURE__ */ new Map();
94
94
  for (const [a, l] of i)
95
- n.set(r(a), r(l));
95
+ n.set(t(a), t(l));
96
96
  return n;
97
97
  }
98
98
  if (i instanceof Set) {
99
99
  const n = /* @__PURE__ */ new Set();
100
100
  for (const a of i)
101
- n.add(r(a));
101
+ n.add(t(a));
102
102
  return n;
103
103
  }
104
104
  if (e.has(i))
@@ -107,19 +107,19 @@ function P(t) {
107
107
  const n = [];
108
108
  e.set(i, n);
109
109
  for (let a = 0; a < i.length; a++)
110
- n[a] = r(i[a]);
110
+ n[a] = t(i[a]);
111
111
  return n;
112
112
  }
113
113
  const s = Object.create(Object.getPrototypeOf(i));
114
114
  e.set(i, s);
115
115
  for (const n in i)
116
- i.hasOwnProperty(n) && (s[n] = r(i[n]));
116
+ i.hasOwnProperty(n) && (s[n] = t(i[n]));
117
117
  return s;
118
118
  }
119
- return r(t);
119
+ return t(r);
120
120
  }
121
- function Y(t, e) {
122
- return t.replace(/undefined/g, e);
121
+ function Y(r, e) {
122
+ return r.replace(/undefined/g, e);
123
123
  }
124
124
  class Ke {
125
125
  constructor(e) {
@@ -129,8 +129,8 @@ class Ke {
129
129
  }
130
130
  // happy path, 后续可以完善更多的 fallback 处理,fallback 处理是为了不卡住异步时的首次渲染做的优化
131
131
  cleanFallbackFields(e) {
132
- return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((r) => {
133
- this.cleanFallbackFields(r);
132
+ return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((t) => {
133
+ this.cleanFallbackFields(t);
134
134
  })), e;
135
135
  }
136
136
  setup(e) {
@@ -138,14 +138,14 @@ class Ke {
138
138
  }
139
139
  submit() {
140
140
  var i;
141
- const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = C.adapters[c.getUI(this.runtimeCore.ui)];
142
- return (e == null ? void 0 : e.validateForm(this)) ?? (r == null ? void 0 : r.validateForm(this));
141
+ const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.runtimeCore.ui)];
142
+ return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
143
143
  }
144
144
  hydrate(e) {
145
- O(() => {
145
+ j(() => {
146
146
  this.runtimeCore.hydrateEffect.trackEffect(
147
147
  () => {
148
- F(e) ? g(
148
+ I(e) ? g(
149
149
  () => e.value,
150
150
  () => {
151
151
  h(this.runtimeCore.model.value, e.value);
@@ -154,7 +154,7 @@ class Ke {
154
154
  deep: !0,
155
155
  immediate: !0
156
156
  }
157
- ) : U(e) ? g(
157
+ ) : S(e) ? g(
158
158
  () => e,
159
159
  () => {
160
160
  h(this.runtimeCore.model.value, e);
@@ -172,8 +172,8 @@ class Ke {
172
172
  });
173
173
  }
174
174
  share(e) {
175
- O(() => {
176
- F(e) ? g(
175
+ j(() => {
176
+ I(e) ? g(
177
177
  () => e.value,
178
178
  () => {
179
179
  h(this.runtimeCore.shared, e.value);
@@ -182,7 +182,7 @@ class Ke {
182
182
  deep: !0,
183
183
  immediate: !0
184
184
  }
185
- ) : U(e) ? g(
185
+ ) : S(e) ? g(
186
186
  () => e,
187
187
  () => {
188
188
  h(this.runtimeCore.shared, e);
@@ -191,12 +191,23 @@ class Ke {
191
191
  deep: !0,
192
192
  immediate: !0
193
193
  }
194
- ) : Object.keys(e).forEach((r) => {
195
- F(e[r]) ? g(
196
- () => e[r].value,
194
+ ) : Object.keys(e).forEach((t) => {
195
+ console.log(t, I(t), S(t)), I(e[t]) ? g(
196
+ () => e[t].value,
197
197
  () => {
198
198
  h(this.runtimeCore.shared, {
199
- [r]: e[r].value
199
+ [t]: e[t].value
200
+ });
201
+ },
202
+ {
203
+ deep: !0,
204
+ immediate: !0
205
+ }
206
+ ) : S(e[t]) ? g(
207
+ () => e[t],
208
+ () => {
209
+ h(this.runtimeCore.shared, {
210
+ [t]: e[t]
200
211
  });
201
212
  },
202
213
  {
@@ -204,20 +215,20 @@ class Ke {
204
215
  immediate: !0
205
216
  }
206
217
  ) : h(this.runtimeCore.shared, {
207
- [r]: e[r]
218
+ [t]: e[t]
208
219
  });
209
220
  });
210
221
  });
211
222
  }
212
223
  subscribeModel(e) {
213
- O(() => {
214
- const r = g(
224
+ j(() => {
225
+ const t = g(
215
226
  () => this.readonlyReactiveModel.value,
216
227
  (i) => {
217
228
  e(i, {
218
229
  stopSubscribe() {
219
- O(() => {
220
- r();
230
+ j(() => {
231
+ t();
221
232
  });
222
233
  }
223
234
  });
@@ -249,325 +260,325 @@ class Z {
249
260
  triggerEffects() {
250
261
  Array.from(this.effects).forEach((e) => e());
251
262
  }
252
- trackEffect(e, r = {
263
+ trackEffect(e, t = {
253
264
  lazy: !0
254
265
  }) {
255
- return !r.lazy && e(), r.identifier ? this.identifierMap.get(r.identifier) || (this.effects.add(e), this.identifierMap.set(r.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
266
+ return !t.lazy && e(), t.identifier ? this.identifierMap.get(t.identifier) || (this.effects.add(e), this.identifierMap.set(t.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
256
267
  }
257
268
  }
258
- var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, J = We || Xe || Function("return this")(), R = J.Symbol, je = Object.prototype, Ye = je.hasOwnProperty, Ze = je.toString, N = R ? R.toStringTag : void 0;
259
- function ke(t) {
260
- var e = Ye.call(t, N), r = t[N];
269
+ var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, Q = We || Xe || Function("return this")(), $ = Q.Symbol, je = Object.prototype, Ye = je.hasOwnProperty, Ze = je.toString, q = $ ? $.toStringTag : void 0;
270
+ function Je(r) {
271
+ var e = Ye.call(r, q), t = r[q];
261
272
  try {
262
- t[N] = void 0;
273
+ r[q] = void 0;
263
274
  var i = !0;
264
275
  } catch {
265
276
  }
266
- var s = Ze.call(t);
267
- return i && (e ? t[N] = r : delete t[N]), s;
277
+ var s = Ze.call(r);
278
+ return i && (e ? r[q] = t : delete r[q]), s;
268
279
  }
269
- var Je = Object.prototype, Qe = Je.toString;
270
- function Ae(t) {
271
- return Qe.call(t);
280
+ var Qe = Object.prototype, ke = Qe.toString;
281
+ function Ae(r) {
282
+ return ke.call(r);
272
283
  }
273
- var et = "[object Null]", tt = "[object Undefined]", Ce = R ? R.toStringTag : void 0;
274
- function we(t) {
275
- return t == null ? t === void 0 ? tt : et : Ce && Ce in Object(t) ? ke(t) : Ae(t);
284
+ var et = "[object Null]", tt = "[object Undefined]", Ce = $ ? $.toStringTag : void 0;
285
+ function we(r) {
286
+ return r == null ? r === void 0 ? tt : et : Ce && Ce in Object(r) ? Je(r) : Ae(r);
276
287
  }
277
- function rt(t) {
278
- return t != null && typeof t == "object";
288
+ function rt(r) {
289
+ return r != null && typeof r == "object";
279
290
  }
280
291
  var it = "[object Symbol]";
281
- function Q(t) {
282
- return typeof t == "symbol" || rt(t) && we(t) == it;
292
+ function k(r) {
293
+ return typeof r == "symbol" || rt(r) && we(r) == it;
283
294
  }
284
- function st(t, e) {
285
- for (var r = -1, i = t == null ? 0 : t.length, s = Array(i); ++r < i; )
286
- s[r] = e(t[r], r, t);
295
+ function st(r, e) {
296
+ for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
297
+ s[t] = e(r[t], t, r);
287
298
  return s;
288
299
  }
289
- var A = Array.isArray, nt = 1 / 0, Ie = R ? R.prototype : void 0, Se = Ie ? Ie.toString : void 0;
290
- function Me(t) {
291
- if (typeof t == "string")
292
- return t;
293
- if (A(t))
294
- return st(t, Me) + "";
295
- if (Q(t))
296
- return Se ? Se.call(t) : "";
297
- var e = t + "";
298
- return e == "0" && 1 / t == -nt ? "-0" : e;
300
+ var A = Array.isArray, nt = 1 / 0, Ie = $ ? $.prototype : void 0, Se = Ie ? Ie.toString : void 0;
301
+ function Me(r) {
302
+ if (typeof r == "string")
303
+ return r;
304
+ if (A(r))
305
+ return st(r, Me) + "";
306
+ if (k(r))
307
+ return Se ? Se.call(r) : "";
308
+ var e = r + "";
309
+ return e == "0" && 1 / r == -nt ? "-0" : e;
299
310
  }
300
- function G(t) {
301
- var e = typeof t;
302
- return t != null && (e == "object" || e == "function");
311
+ function G(r) {
312
+ var e = typeof r;
313
+ return r != null && (e == "object" || e == "function");
303
314
  }
304
315
  var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
305
- function ft(t) {
306
- if (!G(t))
316
+ function ft(r) {
317
+ if (!G(r))
307
318
  return !1;
308
- var e = we(t);
319
+ var e = we(r);
309
320
  return e == at || e == lt || e == ot || e == ut;
310
321
  }
311
- var W = J["__core-js_shared__"], Oe = function() {
312
- var t = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
313
- return t ? "Symbol(src)_1." + t : "";
322
+ var W = Q["__core-js_shared__"], Oe = function() {
323
+ var r = /[^.]+$/.exec(W && W.keys && W.keys.IE_PROTO || "");
324
+ return r ? "Symbol(src)_1." + r : "";
314
325
  }();
315
- function ct(t) {
316
- return !!Oe && Oe in t;
326
+ function ct(r) {
327
+ return !!Oe && Oe in r;
317
328
  }
318
329
  var dt = Function.prototype, pt = dt.toString;
319
- function ht(t) {
320
- if (t != null) {
330
+ function ht(r) {
331
+ if (r != null) {
321
332
  try {
322
- return pt.call(t);
333
+ return pt.call(r);
323
334
  } catch {
324
335
  }
325
336
  try {
326
- return t + "";
337
+ return r + "";
327
338
  } catch {
328
339
  }
329
340
  }
330
341
  return "";
331
342
  }
332
- var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, vt = Function.prototype, gt = Object.prototype, yt = vt.toString, _t = gt.hasOwnProperty, Pt = RegExp(
343
+ var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, gt = Function.prototype, vt = Object.prototype, yt = gt.toString, _t = vt.hasOwnProperty, Pt = RegExp(
333
344
  "^" + yt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
334
345
  );
335
- function Ct(t) {
336
- if (!G(t) || ct(t))
346
+ function Ct(r) {
347
+ if (!G(r) || ct(r))
337
348
  return !1;
338
- var e = ft(t) ? Pt : bt;
339
- return e.test(ht(t));
349
+ var e = ft(r) ? Pt : bt;
350
+ return e.test(ht(r));
340
351
  }
341
- function It(t, e) {
342
- return t == null ? void 0 : t[e];
352
+ function It(r, e) {
353
+ return r == null ? void 0 : r[e];
343
354
  }
344
- function ee(t, e) {
345
- var r = It(t, e);
346
- return Ct(r) ? r : void 0;
355
+ function ee(r, e) {
356
+ var t = It(r, e);
357
+ return Ct(t) ? t : void 0;
347
358
  }
348
359
  var Fe = function() {
349
360
  try {
350
- var t = ee(Object, "defineProperty");
351
- return t({}, "", {}), t;
361
+ var r = ee(Object, "defineProperty");
362
+ return r({}, "", {}), r;
352
363
  } catch {
353
364
  }
354
365
  }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
355
- function Ft(t, e) {
356
- var r = typeof t;
357
- return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
366
+ function Ft(r, e) {
367
+ var t = typeof r;
368
+ return e = e ?? St, !!e && (t == "number" || t != "symbol" && Ot.test(r)) && r > -1 && r % 1 == 0 && r < e;
358
369
  }
359
- function jt(t, e, r) {
360
- e == "__proto__" && Fe ? Fe(t, e, {
370
+ function jt(r, e, t) {
371
+ e == "__proto__" && Fe ? Fe(r, e, {
361
372
  configurable: !0,
362
373
  enumerable: !0,
363
- value: r,
374
+ value: t,
364
375
  writable: !0
365
- }) : t[e] = r;
376
+ }) : r[e] = t;
366
377
  }
367
- function xe(t, e) {
368
- return t === e || t !== t && e !== e;
378
+ function xe(r, e) {
379
+ return r === e || r !== r && e !== e;
369
380
  }
370
381
  var wt = Object.prototype, Mt = wt.hasOwnProperty;
371
- function xt(t, e, r) {
372
- var i = t[e];
373
- (!(Mt.call(t, e) && xe(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
382
+ function xt(r, e, t) {
383
+ var i = r[e];
384
+ (!(Mt.call(r, e) && xe(i, t)) || t === void 0 && !(e in r)) && jt(r, e, t);
374
385
  }
375
386
  var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
376
- function $t(t, e) {
377
- if (A(t))
387
+ function $t(r, e) {
388
+ if (A(r))
378
389
  return !1;
379
- var r = typeof t;
380
- return r == "number" || r == "symbol" || r == "boolean" || t == null || Q(t) ? !0 : Rt.test(t) || !Et.test(t) || e != null && t in Object(e);
390
+ var t = typeof r;
391
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || k(r) ? !0 : Rt.test(r) || !Et.test(r) || e != null && r in Object(e);
381
392
  }
382
393
  var T = ee(Object, "create");
383
394
  function Vt() {
384
395
  this.__data__ = T ? T(null) : {}, this.size = 0;
385
396
  }
386
- function Nt(t) {
387
- var e = this.has(t) && delete this.__data__[t];
397
+ function Nt(r) {
398
+ var e = this.has(r) && delete this.__data__[r];
388
399
  return this.size -= e ? 1 : 0, e;
389
400
  }
390
401
  var qt = "__lodash_hash_undefined__", Ut = Object.prototype, Tt = Ut.hasOwnProperty;
391
- function zt(t) {
402
+ function zt(r) {
392
403
  var e = this.__data__;
393
404
  if (T) {
394
- var r = e[t];
395
- return r === qt ? void 0 : r;
405
+ var t = e[r];
406
+ return t === qt ? void 0 : t;
396
407
  }
397
- return Tt.call(e, t) ? e[t] : void 0;
408
+ return Tt.call(e, r) ? e[r] : void 0;
398
409
  }
399
410
  var Lt = Object.prototype, Dt = Lt.hasOwnProperty;
400
- function Gt(t) {
411
+ function Gt(r) {
401
412
  var e = this.__data__;
402
- return T ? e[t] !== void 0 : Dt.call(e, t);
413
+ return T ? e[r] !== void 0 : Dt.call(e, r);
403
414
  }
404
415
  var Bt = "__lodash_hash_undefined__";
405
- function Ht(t, e) {
406
- var r = this.__data__;
407
- return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Bt : e, this;
408
- }
409
- function j(t) {
410
- var e = -1, r = t == null ? 0 : t.length;
411
- for (this.clear(); ++e < r; ) {
412
- var i = t[e];
416
+ function Ht(r, e) {
417
+ var t = this.__data__;
418
+ return this.size += this.has(r) ? 0 : 1, t[r] = T && e === void 0 ? Bt : e, this;
419
+ }
420
+ function w(r) {
421
+ var e = -1, t = r == null ? 0 : r.length;
422
+ for (this.clear(); ++e < t; ) {
423
+ var i = r[e];
413
424
  this.set(i[0], i[1]);
414
425
  }
415
426
  }
416
- j.prototype.clear = Vt;
417
- j.prototype.delete = Nt;
418
- j.prototype.get = zt;
419
- j.prototype.has = Gt;
420
- j.prototype.set = Ht;
427
+ w.prototype.clear = Vt;
428
+ w.prototype.delete = Nt;
429
+ w.prototype.get = zt;
430
+ w.prototype.has = Gt;
431
+ w.prototype.set = Ht;
421
432
  function Kt() {
422
433
  this.__data__ = [], this.size = 0;
423
434
  }
424
- function B(t, e) {
425
- for (var r = t.length; r--; )
426
- if (xe(t[r][0], e))
427
- return r;
435
+ function B(r, e) {
436
+ for (var t = r.length; t--; )
437
+ if (xe(r[t][0], e))
438
+ return t;
428
439
  return -1;
429
440
  }
430
441
  var Wt = Array.prototype, Xt = Wt.splice;
431
- function Yt(t) {
432
- var e = this.__data__, r = B(e, t);
433
- if (r < 0)
442
+ function Yt(r) {
443
+ var e = this.__data__, t = B(e, r);
444
+ if (t < 0)
434
445
  return !1;
435
446
  var i = e.length - 1;
436
- return r == i ? e.pop() : Xt.call(e, r, 1), --this.size, !0;
447
+ return t == i ? e.pop() : Xt.call(e, t, 1), --this.size, !0;
437
448
  }
438
- function Zt(t) {
439
- var e = this.__data__, r = B(e, t);
440
- return r < 0 ? void 0 : e[r][1];
449
+ function Zt(r) {
450
+ var e = this.__data__, t = B(e, r);
451
+ return t < 0 ? void 0 : e[t][1];
441
452
  }
442
- function kt(t) {
443
- return B(this.__data__, t) > -1;
453
+ function Jt(r) {
454
+ return B(this.__data__, r) > -1;
444
455
  }
445
- function Jt(t, e) {
446
- var r = this.__data__, i = B(r, t);
447
- return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
456
+ function Qt(r, e) {
457
+ var t = this.__data__, i = B(t, r);
458
+ return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
448
459
  }
449
- function $(t) {
450
- var e = -1, r = t == null ? 0 : t.length;
451
- for (this.clear(); ++e < r; ) {
452
- var i = t[e];
460
+ function V(r) {
461
+ var e = -1, t = r == null ? 0 : r.length;
462
+ for (this.clear(); ++e < t; ) {
463
+ var i = r[e];
453
464
  this.set(i[0], i[1]);
454
465
  }
455
466
  }
456
- $.prototype.clear = Kt;
457
- $.prototype.delete = Yt;
458
- $.prototype.get = Zt;
459
- $.prototype.has = kt;
460
- $.prototype.set = Jt;
461
- var Qt = ee(J, "Map");
467
+ V.prototype.clear = Kt;
468
+ V.prototype.delete = Yt;
469
+ V.prototype.get = Zt;
470
+ V.prototype.has = Jt;
471
+ V.prototype.set = Qt;
472
+ var kt = ee(Q, "Map");
462
473
  function At() {
463
474
  this.size = 0, this.__data__ = {
464
- hash: new j(),
465
- map: new (Qt || $)(),
466
- string: new j()
475
+ hash: new w(),
476
+ map: new (kt || V)(),
477
+ string: new w()
467
478
  };
468
479
  }
469
- function er(t) {
470
- var e = typeof t;
471
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
480
+ function er(r) {
481
+ var e = typeof r;
482
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
472
483
  }
473
- function H(t, e) {
474
- var r = t.__data__;
475
- return er(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
484
+ function H(r, e) {
485
+ var t = r.__data__;
486
+ return er(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
476
487
  }
477
- function tr(t) {
478
- var e = H(this, t).delete(t);
488
+ function tr(r) {
489
+ var e = H(this, r).delete(r);
479
490
  return this.size -= e ? 1 : 0, e;
480
491
  }
481
- function rr(t) {
482
- return H(this, t).get(t);
492
+ function rr(r) {
493
+ return H(this, r).get(r);
483
494
  }
484
- function ir(t) {
485
- return H(this, t).has(t);
495
+ function ir(r) {
496
+ return H(this, r).has(r);
486
497
  }
487
- function sr(t, e) {
488
- var r = H(this, t), i = r.size;
489
- return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
498
+ function sr(r, e) {
499
+ var t = H(this, r), i = t.size;
500
+ return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
490
501
  }
491
- function w(t) {
492
- var e = -1, r = t == null ? 0 : t.length;
493
- for (this.clear(); ++e < r; ) {
494
- var i = t[e];
502
+ function M(r) {
503
+ var e = -1, t = r == null ? 0 : r.length;
504
+ for (this.clear(); ++e < t; ) {
505
+ var i = r[e];
495
506
  this.set(i[0], i[1]);
496
507
  }
497
508
  }
498
- w.prototype.clear = At;
499
- w.prototype.delete = tr;
500
- w.prototype.get = rr;
501
- w.prototype.has = ir;
502
- w.prototype.set = sr;
509
+ M.prototype.clear = At;
510
+ M.prototype.delete = tr;
511
+ M.prototype.get = rr;
512
+ M.prototype.has = ir;
513
+ M.prototype.set = sr;
503
514
  var nr = "Expected a function";
504
- function te(t, e) {
505
- if (typeof t != "function" || e != null && typeof e != "function")
515
+ function te(r, e) {
516
+ if (typeof r != "function" || e != null && typeof e != "function")
506
517
  throw new TypeError(nr);
507
- var r = function() {
508
- var i = arguments, s = e ? e.apply(this, i) : i[0], n = r.cache;
518
+ var t = function() {
519
+ var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
509
520
  if (n.has(s))
510
521
  return n.get(s);
511
- var a = t.apply(this, i);
512
- return r.cache = n.set(s, a) || n, a;
522
+ var a = r.apply(this, i);
523
+ return t.cache = n.set(s, a) || n, a;
513
524
  };
514
- return r.cache = new (te.Cache || w)(), r;
525
+ return t.cache = new (te.Cache || M)(), t;
515
526
  }
516
- te.Cache = w;
527
+ te.Cache = M;
517
528
  var or = 500;
518
- function ar(t) {
519
- var e = te(t, function(i) {
520
- return r.size === or && r.clear(), i;
521
- }), r = e.cache;
529
+ function ar(r) {
530
+ var e = te(r, function(i) {
531
+ return t.size === or && t.clear(), i;
532
+ }), t = e.cache;
522
533
  return e;
523
534
  }
524
- var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(t) {
535
+ var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(r) {
525
536
  var e = [];
526
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
527
- e.push(s ? n.replace(ur, "$1") : i || r);
537
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(lr, function(t, i, s, n) {
538
+ e.push(s ? n.replace(ur, "$1") : i || t);
528
539
  }), e;
529
540
  });
530
- function cr(t) {
531
- return t == null ? "" : Me(t);
541
+ function cr(r) {
542
+ return r == null ? "" : Me(r);
532
543
  }
533
- function Ee(t, e) {
534
- return A(t) ? t : $t(t, e) ? [t] : fr(cr(t));
544
+ function Ee(r, e) {
545
+ return A(r) ? r : $t(r, e) ? [r] : fr(cr(r));
535
546
  }
536
547
  var dr = 1 / 0;
537
- function Re(t) {
538
- if (typeof t == "string" || Q(t))
539
- return t;
540
- var e = t + "";
541
- return e == "0" && 1 / t == -dr ? "-0" : e;
548
+ function Re(r) {
549
+ if (typeof r == "string" || k(r))
550
+ return r;
551
+ var e = r + "";
552
+ return e == "0" && 1 / r == -dr ? "-0" : e;
542
553
  }
543
- function pr(t, e) {
544
- e = Ee(e, t);
545
- for (var r = 0, i = e.length; t != null && r < i; )
546
- t = t[Re(e[r++])];
547
- return r && r == i ? t : void 0;
554
+ function pr(r, e) {
555
+ e = Ee(e, r);
556
+ for (var t = 0, i = e.length; r != null && t < i; )
557
+ r = r[Re(e[t++])];
558
+ return t && t == i ? r : void 0;
548
559
  }
549
- function L(t, e, r) {
550
- var i = t == null ? void 0 : pr(t, e);
551
- return i === void 0 ? r : i;
560
+ function L(r, e, t) {
561
+ var i = r == null ? void 0 : pr(r, e);
562
+ return i === void 0 ? t : i;
552
563
  }
553
- function hr(t, e, r, i) {
554
- if (!G(t))
555
- return t;
556
- e = Ee(e, t);
557
- for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
558
- var f = Re(e[s]), d = r;
564
+ function hr(r, e, t, i) {
565
+ if (!G(r))
566
+ return r;
567
+ e = Ee(e, r);
568
+ for (var s = -1, n = e.length, a = n - 1, l = r; l != null && ++s < n; ) {
569
+ var f = Re(e[s]), d = t;
559
570
  if (f === "__proto__" || f === "constructor" || f === "prototype")
560
- return t;
571
+ return r;
561
572
  if (s != a) {
562
573
  var p = l[f];
563
574
  d = i ? i(p, f, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
564
575
  }
565
576
  xt(l, f, d), l = l[f];
566
577
  }
567
- return t;
578
+ return r;
568
579
  }
569
- function D(t, e, r) {
570
- return t == null ? t : hr(t, e, r);
580
+ function D(r, e, t) {
581
+ return r == null ? r : hr(r, e, t);
571
582
  }
572
583
  class mr {
573
584
  constructor(e) {
@@ -597,68 +608,68 @@ class mr {
597
608
  );
598
609
  }
599
610
  // 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
600
- parse(e, r) {
611
+ parse(e, t) {
601
612
  e.forEach((i, s) => {
602
- this.parseItem(i, s, r);
613
+ this.parseItem(i, s, t);
603
614
  });
604
615
  }
605
616
  // 初始化空数据结构,避免后续复杂的 if else
606
617
  initSchemas(e) {
607
- return e.map((r) => {
618
+ return e.map((t) => {
608
619
  const i = {};
609
- return r.children && (i.children = this.initSchemas(r.children)), i;
620
+ return t.children && (i.children = this.initSchemas(t.children)), i;
610
621
  });
611
622
  }
612
623
  countFunctionDefaultValues(e) {
613
- let r = 0;
624
+ let t = 0;
614
625
  const i = /* @__PURE__ */ new Set();
615
626
  function s(n) {
616
627
  if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
617
628
  i.add(n);
618
629
  for (const a in n)
619
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, s(n[a]));
630
+ n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && t++, s(n[a]));
620
631
  }
621
632
  }
622
- return s(e), r;
633
+ return s(e), t;
623
634
  }
624
635
  // 派生过程,用于外部应用
625
- parseSchemas(e, r) {
636
+ parseSchemas(e, t) {
626
637
  o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
627
638
  P(e)
628
- ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
639
+ ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
629
640
  }
630
641
  parseStable(e) {
631
- const r = {};
642
+ const t = {};
632
643
  if (!o.isUndefined(e.stable))
633
- r[e.key] = this.parseStable(e.stable);
644
+ t[e.key] = this.parseStable(e.stable);
634
645
  else
635
646
  return e;
636
- return r;
647
+ return t;
637
648
  }
638
649
  // 对于稳定初始化更新的抽象
639
650
  stableUpdater(e = []) {
640
651
  if (e.every(Boolean)) {
641
- const r = E(this.processedSchemas.value);
642
- !o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
643
- length: r.length
644
- }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
652
+ const t = R(this.processedSchemas.value);
653
+ !o.isProcessInprogress(t) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
654
+ length: t.length
655
+ }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(t));
645
656
  }
646
657
  }
647
658
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
648
- parseItem(e, r, i) {
659
+ parseItem(e, t, i) {
649
660
  const s = this, n = Array.from({
650
661
  length: Object.keys(e).filter((l) => l !== "children").length
651
662
  }).fill(!1);
652
- this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
663
+ this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
653
664
  function a(l) {
654
665
  const f = l.index, d = l.key, p = l.keyIndex;
655
666
  if (o.isUndefined(l.stable))
656
667
  return;
657
- const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index, I = i == null ? void 0 : i.key;
668
+ const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index, O = i == null ? void 0 : i.key;
658
669
  let _ = m;
659
670
  if (o.isProcessInprogress(_) || (n[p] = !0), i) {
660
- const v = s.processedSchemas.value[y][I][f][d];
661
- v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[y][I][f][d] = _, s.stableUpdater(n);
671
+ const v = s.processedSchemas.value[y][O][f][d];
672
+ v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[y][O][f][d] = _, s.stableUpdater(n);
662
673
  } else {
663
674
  const v = s.processedSchemas.value[f][d];
664
675
  v && o.isObject(v) && d !== "component" && (_ = h(v, _)), s.processedSchemas.value[f][d] = _, s.stableUpdater(n);
@@ -667,11 +678,11 @@ class mr {
667
678
  }
668
679
  // 只做基本的对象 parser
669
680
  objectParser(e) {
670
- const r = e.data;
671
- Object.keys(r).forEach((s, n) => {
681
+ const t = e.data;
682
+ Object.keys(t).forEach((s, n) => {
672
683
  var a, l;
673
684
  if (s === "children")
674
- this.parseSchemas(r[s], {
685
+ this.parseSchemas(t[s], {
675
686
  ...e,
676
687
  key: s,
677
688
  keyIndex: n
@@ -685,16 +696,16 @@ class mr {
685
696
  stable: d
686
697
  });
687
698
  };
688
- o.isFunction(r[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
699
+ o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
689
700
  () => {
690
701
  if (s === "component") {
691
- const d = r[s](this.getRuntimeMeta());
702
+ const d = t[s](this.getRuntimeMeta());
692
703
  this.promiseFieldParser(d, f, !1, {
693
704
  rootIndex: e.index,
694
705
  parentMeta: e.parentMeta
695
706
  });
696
707
  } else
697
- this.fieldParser(r[s], f, {
708
+ this.fieldParser(t[s], f, {
698
709
  rootIndex: e.index,
699
710
  parentMeta: e.parentMeta
700
711
  });
@@ -707,17 +718,17 @@ class mr {
707
718
  () => {
708
719
  const d = this.schemaEffect.trackEffect(
709
720
  () => {
710
- /\{\s*model\s*\}/.test(r[s].toString()) ? this.fieldParser(
711
- r[s],
721
+ /\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
722
+ t[s],
712
723
  (p) => {
713
724
  if (!p)
714
725
  return f(p);
715
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
726
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
716
727
  this.defaultValueInprogressMap.values()
717
728
  ).every((m) => {
718
729
  var y;
719
730
  return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
720
- }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
731
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), j(() => {
721
732
  d();
722
733
  })) : f(p);
723
734
  },
@@ -726,14 +737,14 @@ class mr {
726
737
  parentMeta: e.parentMeta
727
738
  }
728
739
  ) : this.fieldParser(
729
- r[s],
740
+ t[s],
730
741
  (p) => {
731
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
742
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
732
743
  this.defaultValueInprogressMap.values()
733
744
  ).every((m) => {
734
745
  var y;
735
746
  return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
736
- }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
747
+ }) ? (f(p), this.defaultValueEffect.clearEffects(), j(() => {
737
748
  d();
738
749
  })) : f(p);
739
750
  },
@@ -751,74 +762,74 @@ class mr {
751
762
  {
752
763
  lazy: !1
753
764
  }
754
- ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], f, !1, {
765
+ ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(t[s], f, !1, {
755
766
  rootIndex: e.index,
756
767
  parentMeta: e.parentMeta
757
- }) : this.fieldParser(r[s], f, {
768
+ }) : this.fieldParser(t[s], f, {
758
769
  rootIndex: e.index,
759
770
  parentMeta: e.parentMeta
760
771
  });
761
772
  }
762
773
  });
763
774
  }
764
- promiseFieldParser(e, r, i, s) {
775
+ promiseFieldParser(e, t, i, s) {
765
776
  o.isPromise(e) ? e.then((n) => {
766
777
  o.isString(n) && (n = Y(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
767
778
  data: n,
768
- updater: r,
779
+ updater: t,
769
780
  index: s.rootIndex,
770
781
  parentMeta: s.parentMeta
771
- }) : r(n);
782
+ }) : t(n);
772
783
  }) : (o.isString(e) && (e = Y(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
773
784
  data: e,
774
- updater: r,
785
+ updater: t,
775
786
  index: s.rootIndex,
776
787
  parentMeta: s.parentMeta
777
- }) : r(e));
788
+ }) : t(e));
778
789
  }
779
790
  // 对任意对象中单个字段的 parse: 做基本处理
780
- fieldParser(e, r, i, s = !0) {
791
+ fieldParser(e, t, i, s = !0) {
781
792
  if (o.isFunction(e))
782
793
  if (e.name.startsWith("__proform_raw_"))
783
- r(
794
+ t(
784
795
  (...n) => e({
785
796
  rawArgs: n,
786
797
  ...this.getRuntimeMeta()
787
798
  })
788
799
  );
789
800
  else if (e.name.startsWith("__proform_structured_path_parsing_mark_"))
790
- r(e);
801
+ t(e);
791
802
  else if (e.__proform_cached_result) {
792
803
  const n = e.__proform_cached_result;
793
- this.promiseFieldParser(n, r, s, i);
804
+ this.promiseFieldParser(n, t, s, i);
794
805
  } else {
795
806
  const n = e(this.getRuntimeMeta());
796
- e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, s, i);
807
+ e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
797
808
  }
798
809
  else
799
- F(e) ? g(
810
+ I(e) ? g(
800
811
  () => e.value,
801
812
  () => {
802
813
  o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
803
814
  data: e.value,
804
- updater: r,
815
+ updater: t,
805
816
  index: i.rootIndex,
806
817
  parentMeta: i.parentMeta
807
- }) : r(e.value));
818
+ }) : t(e.value));
808
819
  },
809
820
  {
810
821
  immediate: !0,
811
822
  deep: !0
812
823
  }
813
- ) : U(e) ? g(
824
+ ) : S(e) ? g(
814
825
  () => e,
815
826
  () => {
816
827
  o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
817
828
  data: e,
818
- updater: r,
829
+ updater: t,
819
830
  index: i.rootIndex,
820
831
  parentMeta: i.parentMeta
821
- }) : r(e));
832
+ }) : t(e));
822
833
  },
823
834
  {
824
835
  immediate: !0,
@@ -826,37 +837,37 @@ class mr {
826
837
  }
827
838
  ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
828
839
  data: e,
829
- updater: r,
840
+ updater: t,
830
841
  index: i.rootIndex,
831
842
  parentMeta: i.parentMeta
832
- }) : r(e);
843
+ }) : t(e);
833
844
  }
834
845
  modelProcessor(e) {
835
846
  e.map(
836
- (r) => this.createModel(r, this.processedModel.value)
847
+ (t) => this.createModel(t, this.processedModel.value)
837
848
  ), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = P(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
838
849
  }
839
- setModel(e, r, i) {
840
- o.isFunction(r) ? D(e, r(), i) : e[r] = i;
850
+ setModel(e, t, i) {
851
+ o.isFunction(t) ? D(e, t(), i) : e[t] = i;
841
852
  }
842
- createModel(e, r) {
843
- if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((i) => {
844
- this.createModel(i, r[e.field][0]);
853
+ createModel(e, t) {
854
+ if (o.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
855
+ this.createModel(i, t[e.field][0]);
845
856
  })), o.isGroupSchema(e) && e.children.forEach((i) => {
846
- this.createModel(i, r);
857
+ this.createModel(i, t);
847
858
  }), o.isItemSchema(e))
848
859
  if ("defaultValue" in e)
849
- this.setModel(r, e.field, e.defaultValue);
860
+ this.setModel(t, e.field, e.defaultValue);
850
861
  else {
851
- if (o.isFunction(e.field) && L(r, e.field()))
862
+ if (o.isFunction(e.field) && L(t, e.field()))
852
863
  return;
853
- if (o.isString(e.field) && r[e.field])
864
+ if (o.isString(e.field) && t[e.field])
854
865
  return;
855
- this.setModel(r, e.field, void 0);
866
+ this.setModel(t, e.field, void 0);
856
867
  }
857
868
  }
858
869
  }
859
- class M {
870
+ class x {
860
871
  static getFormContainer({ ui: e } = {}) {
861
872
  return c.presets.uiPresets[e ?? c.presets.ui].container.Form;
862
873
  }
@@ -881,39 +892,39 @@ class br {
881
892
  this.ui = e;
882
893
  }
883
894
  getRuntimeNative() {
884
- var r;
885
- return (r = c.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
895
+ var t;
896
+ return (t = c.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
886
897
  }
887
898
  getRuntimeField(e) {
888
899
  var s;
889
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
890
- return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
900
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
901
+ return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
891
902
  }
892
903
  getRuntimeRequired(e) {
893
904
  var s;
894
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
895
- return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
905
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
906
+ return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
896
907
  }
897
908
  getFormModelPropName() {
898
909
  var i;
899
- const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = C.adapters[c.getUI(this.ui)];
900
- return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
910
+ const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.ui)];
911
+ return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
901
912
  }
902
913
  formComponentRenderer(e) {
903
914
  var s;
904
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
905
- return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
915
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
916
+ return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
906
917
  }
907
918
  clearValidate(e) {
908
919
  var s;
909
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
910
- return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
920
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
921
+ return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
911
922
  }
912
923
  }
913
- function vr(t) {
914
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
924
+ function gr(r) {
925
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Be(r);
915
926
  }
916
- class gr {
927
+ class vr {
917
928
  constructor(e) {
918
929
  u(this, "schemas", z([]));
919
930
  u(this, "model", z({}));
@@ -939,64 +950,71 @@ class gr {
939
950
  }));
940
951
  u(this, "shared", K({}));
941
952
  this.setup = e, this.processor = new mr(this);
942
- const r = this.setup(this);
943
- if (this.ui = r.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), F(r.schemas))
953
+ const t = this.setup(this);
954
+ if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new br(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), I(t.schemas))
944
955
  g(
945
956
  // @ts-expect-error
946
- () => r.schemas.value,
957
+ () => t.schemas.value,
947
958
  () => {
948
- this.processor.parseSchemas(r.schemas.value);
959
+ this.processor.parseSchemas(t.schemas.value);
949
960
  },
950
961
  {
951
962
  deep: !0
952
963
  }
953
964
  );
954
- else if (U(r.schemas)) {
955
- const i = g(() => r.schemas, () => {
956
- this.processor.parseSchemas(r.schemas), O(() => {
965
+ else if (S(t.schemas)) {
966
+ const i = g(() => t.schemas, () => {
967
+ this.processor.parseSchemas(t.schemas), j(() => {
957
968
  i();
958
969
  });
959
970
  }, {
960
971
  deep: !0
961
972
  });
962
973
  } else
963
- this.processor.parseSchemas(r.schemas);
974
+ this.processor.parseSchemas(t.schemas);
964
975
  }
965
976
  getRuntimeMeta() {
966
977
  return {
967
- model: E(P(this.model.value)),
978
+ model: R(P(this.model.value)),
968
979
  reactiveModel: this.model.value,
969
980
  shared: this.shared,
970
981
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
971
- share: (r) => {
972
- F(r) ? g(() => r.value, () => {
973
- h(this.shared, r.value);
982
+ share: (t) => {
983
+ I(t) ? g(() => t.value, () => {
984
+ h(this.shared, t.value);
974
985
  }, {
975
986
  deep: !0,
976
987
  immediate: !0
977
- }) : U(r) ? g(() => r, () => {
978
- h(this.shared, r);
988
+ }) : S(t) ? g(() => t, () => {
989
+ h(this.shared, t);
979
990
  }, {
980
991
  deep: !0,
981
992
  immediate: !0
982
- }) : Object.keys(r).forEach((i) => {
983
- F(r[i]) ? g(() => r[i].value, () => {
993
+ }) : Object.keys(t).forEach((i) => {
994
+ console.log(i, I(i), S(i)), I(t[i]) ? g(() => t[i].value, () => {
995
+ h(this.shared, {
996
+ [i]: t[i].value
997
+ });
998
+ }, {
999
+ deep: !0,
1000
+ immediate: !0
1001
+ }) : S(t[i]) ? g(() => t[i], () => {
984
1002
  h(this.shared, {
985
- [i]: r[i].value
1003
+ [i]: t[i]
986
1004
  });
987
1005
  }, {
988
1006
  deep: !0,
989
1007
  immediate: !0
990
1008
  }) : h(this.shared, {
991
- [i]: r[i]
1009
+ [i]: t[i]
992
1010
  });
993
1011
  });
994
1012
  }
995
1013
  };
996
1014
  }
997
- runtimeItemProcessor(e, r, i = this.model.value, s) {
998
- var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ve, ge, ye;
999
- const n = E(e.component);
1015
+ runtimeItemProcessor(e, t, i = this.model.value, s) {
1016
+ var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ge, ve, ye;
1017
+ const n = R(e.component);
1000
1018
  if (!n)
1001
1019
  return;
1002
1020
  (se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (oe = (ne = e.native) == null ? void 0 : ne.props) == null ? void 0 : oe.Form), (le = (ae = e.native) == null ? void 0 : ae.slots) != null && le.Form && h(this.globalNativeFormOverride.slots.Form, (fe = (ue = e.native) == null ? void 0 : ue.slots) == null ? void 0 : fe.Form);
@@ -1004,32 +1022,32 @@ class gr {
1004
1022
  display: "grid",
1005
1023
  gridColumn: "1 / -1",
1006
1024
  ...e.grid
1007
- }, f = h(P((be = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : be.FormItem) ?? {}, (ge = (ve = e.native) == null ? void 0 : ve.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
1025
+ }, f = h(P((be = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : be.FormItem) ?? {}, (ve = (ge = e.native) == null ? void 0 : ge.props) == null ? void 0 : ve.FormItem), d = this.runtimeAdapter.getRuntimeField({
1008
1026
  schema: e,
1009
1027
  parentSchema: s,
1010
- index: r
1028
+ index: t
1011
1029
  }), p = n.name, m = e.componentProps ?? {}, y = C.placeholderPresetByComponentName;
1012
- let I = e.placeholder, _ = e.show;
1030
+ let O = e.placeholder, _ = e.show;
1013
1031
  _ === void 0 && (_ = !0);
1014
- let v = e.label ?? "", S;
1015
- if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(S) && (v = Y((ye = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ye.call(S, e.label ?? "", r + 1), "")), !I) {
1016
- let V = "请输入";
1017
- o.isUndefined(p) ? I = `${V}${v}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (V = // @ts-expect-error
1018
- y[p.toLowerCase()], I = `${V}${v}`) : (Object.keys(y).forEach((_e) => {
1019
- p.toLowerCase().includes(_e.toLowerCase()) && (V = y[_e]);
1020
- }), I = `${V}${v}`);
1032
+ let v = e.label ?? "", F;
1033
+ if (e.runtime ? F = e.runtime : F = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(F) && (v = Y((ye = F == null ? void 0 : F.customizeListItemLabel) == null ? void 0 : ye.call(F, e.label ?? "", t + 1), "")), !O) {
1034
+ let N = "请输入";
1035
+ o.isUndefined(p) ? O = `${N}${v}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (N = // @ts-expect-error
1036
+ y[p.toLowerCase()], O = `${N}${v}`) : (Object.keys(y).forEach((_e) => {
1037
+ p.toLowerCase().includes(_e.toLowerCase()) && (N = y[_e]);
1038
+ }), O = `${N}${v}`);
1021
1039
  }
1022
1040
  const $e = this.runtimeAdapter.getRuntimeRequired({
1023
1041
  ...e,
1024
1042
  label: v
1025
- }), Ve = M.getItemContainer(this), Ne = M.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1043
+ }), Ve = x.getItemContainer(this), Ne = x.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1026
1044
  return b("div", {
1027
1045
  style: l
1028
1046
  }, [b(Ve, {
1029
1047
  show: _
1030
1048
  }, {
1031
1049
  default() {
1032
- return _ && b(Ne, q(f, {
1050
+ return _ && b(Ne, U(f, {
1033
1051
  label: `${v ? `${v}:` : ""}`
1034
1052
  }, d, $e), {
1035
1053
  default() {
@@ -1037,7 +1055,7 @@ class gr {
1037
1055
  Component: n,
1038
1056
  schema: e,
1039
1057
  baseModel: i,
1040
- placeholder: I,
1058
+ placeholder: O,
1041
1059
  componentSlots: Ue,
1042
1060
  props: m
1043
1061
  });
@@ -1048,35 +1066,35 @@ class gr {
1048
1066
  })]);
1049
1067
  }
1050
1068
  runtimeGroupProcessor(e) {
1051
- let r;
1069
+ let t;
1052
1070
  const i = {
1053
1071
  display: "grid",
1054
1072
  gridColumn: "1 / -1",
1055
1073
  ...e.grid
1056
- }, s = M.getGroupContainer(this);
1074
+ }, s = x.getGroupContainer(this);
1057
1075
  let n = e.show;
1058
1076
  return n === void 0 && (n = !0), b("div", {
1059
1077
  style: i
1060
1078
  }, [n && b(s, {
1061
1079
  schema: e
1062
- }, vr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1063
- default: () => [r]
1080
+ }, gr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1081
+ default: () => [t]
1064
1082
  })]);
1065
1083
  }
1066
1084
  addListItem(e) {
1067
- var r, i;
1068
- if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1085
+ var t, i;
1086
+ if (!((t = this.processor.stableModel[e.field]) != null && t[0]))
1069
1087
  return Promise.reject({
1070
1088
  code: "0001",
1071
1089
  message: "异步默认值数据正在处理中,请您耐心等待... "
1072
1090
  });
1073
1091
  (i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(P(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1074
1092
  }
1075
- deleteListItem(e, r) {
1076
- this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
1093
+ deleteListItem(e, t) {
1094
+ this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
1077
1095
  }
1078
1096
  runtimeListProcessor(e) {
1079
- const r = {
1097
+ const t = {
1080
1098
  display: "grid",
1081
1099
  gridColumn: "1 / -1",
1082
1100
  ...e.grid
@@ -1084,9 +1102,9 @@ class gr {
1084
1102
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1085
1103
  let s = e.show;
1086
1104
  s === void 0 && (s = !0);
1087
- const n = M.getListContainer(this), a = M.getListItemContainer(this);
1105
+ const n = x.getListContainer(this), a = x.getListItemContainer(this);
1088
1106
  return b("div", {
1089
- style: r
1107
+ style: t
1090
1108
  }, [s && b(n, {
1091
1109
  schema: e
1092
1110
  }, {
@@ -1117,7 +1135,7 @@ class gr {
1117
1135
  })]);
1118
1136
  }
1119
1137
  runtimeProcessor(e) {
1120
- return e.map((r) => (r.type || (r.type = "item"), this.processorBySchemaType[r.type](r)));
1138
+ return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
1121
1139
  }
1122
1140
  exec() {
1123
1141
  var l, f, d, p;
@@ -1126,8 +1144,8 @@ class gr {
1126
1144
  gridColumn: "1 / -1",
1127
1145
  gridAutoColumns: "1fr",
1128
1146
  ...this.grid
1129
- }, r = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = M.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1130
- return b(n, q(i, {
1147
+ }, t = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1148
+ return b(n, U(i, {
1131
1149
  ref: this.formRef
1132
1150
  }, {
1133
1151
  [a]: this.model.value
@@ -1135,7 +1153,7 @@ class gr {
1135
1153
  default() {
1136
1154
  return b("div", {
1137
1155
  style: e
1138
- }, [r.runtimeProcessor(r.schemas.value)]);
1156
+ }, [t.runtimeProcessor(t.schemas.value)]);
1139
1157
  },
1140
1158
  ...s
1141
1159
  });
@@ -1143,247 +1161,247 @@ class gr {
1143
1161
  }
1144
1162
  class c {
1145
1163
  static getPreset(e) {
1146
- var r, i, s;
1147
- return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1164
+ var t, i, s;
1165
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1148
1166
  }
1149
1167
  static getUI(e) {
1150
- var r, i, s;
1151
- return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1168
+ var t, i, s;
1169
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1152
1170
  }
1153
1171
  }
1154
1172
  u(c, "presets");
1155
1173
  function X({
1156
- parentSchema: t,
1174
+ parentSchema: r,
1157
1175
  schema: e,
1158
- index: r
1176
+ index: t
1159
1177
  }) {
1160
- return t ? `${t.field}.${r}.${e.field}` : e.field;
1178
+ return r ? `${r.field}.${t}.${e.field}` : e.field;
1161
1179
  }
1162
1180
  const yr = {
1163
1181
  ArcoVue: {
1164
- getRuntimeField(t) {
1165
- const e = X(t);
1182
+ getRuntimeField(r) {
1183
+ const e = X(r);
1166
1184
  return o.isFunction(e) ? {
1167
1185
  field: e()
1168
1186
  } : {
1169
1187
  field: e
1170
1188
  };
1171
1189
  },
1172
- getRuntimeRequired(t) {
1190
+ getRuntimeRequired(r) {
1173
1191
  var e;
1174
- if (t.required)
1175
- if (!t.rules)
1176
- t.rules = [], t.rules.push({
1192
+ if (r.required)
1193
+ if (!r.rules)
1194
+ r.rules = [], r.rules.push({
1177
1195
  required: !0,
1178
- message: `${t.label}是必填项`
1196
+ message: `${r.label}是必填项`
1179
1197
  });
1180
1198
  else {
1181
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1182
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1199
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1200
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1183
1201
  required: !0,
1184
- message: `${t.label}是必填项`
1202
+ message: `${r.label}是必填项`
1185
1203
  });
1186
1204
  }
1187
- else if (t.rules) {
1188
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1189
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1205
+ else if (r.rules) {
1206
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1207
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1190
1208
  required: !0,
1191
- message: `${t.label}是必填项`
1209
+ message: `${r.label}是必填项`
1192
1210
  });
1193
1211
  }
1194
1212
  return {
1195
- rules: t.rules
1213
+ rules: r.rules
1196
1214
  };
1197
1215
  },
1198
1216
  getFormModelPropName() {
1199
1217
  return "model";
1200
1218
  },
1201
1219
  formComponentRenderer({
1202
- Component: t,
1220
+ Component: r,
1203
1221
  baseModel: e,
1204
- schema: r,
1222
+ schema: t,
1205
1223
  placeholder: i,
1206
1224
  componentSlots: s,
1207
1225
  props: n
1208
1226
  }) {
1209
1227
  let a;
1210
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1228
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1211
1229
  modelValue: a,
1212
1230
  "onUpdate:modelValue": (l) => {
1213
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1231
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1214
1232
  },
1215
1233
  placeholder: i
1216
1234
  }, n), {
1217
1235
  ...s
1218
1236
  });
1219
1237
  },
1220
- validateForm(t) {
1221
- return new Promise((e, r) => {
1222
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1238
+ validateForm(r) {
1239
+ return new Promise((e, t) => {
1240
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1223
1241
  });
1224
1242
  },
1225
- clearValidate(t) {
1226
- var e, r;
1227
- (r = (e = t.formRef.value) == null ? void 0 : e.clearValidate) == null || r.call(e);
1243
+ clearValidate(r) {
1244
+ var e, t;
1245
+ (t = (e = r.formRef.value) == null ? void 0 : e.clearValidate) == null || t.call(e);
1228
1246
  }
1229
1247
  },
1230
1248
  NutUI: {
1231
- getRuntimeField(t) {
1232
- const e = X(t);
1249
+ getRuntimeField(r) {
1250
+ const e = X(r);
1233
1251
  return o.isFunction(e) ? {
1234
1252
  prop: e()
1235
1253
  } : {
1236
1254
  prop: e
1237
1255
  };
1238
1256
  },
1239
- getRuntimeRequired(t) {
1257
+ getRuntimeRequired(r) {
1240
1258
  var e;
1241
- if (t.required)
1242
- if (!t.rules)
1243
- t.rules = [], t.rules.push({
1259
+ if (r.required)
1260
+ if (!r.rules)
1261
+ r.rules = [], r.rules.push({
1244
1262
  required: !0,
1245
- message: `${t.label}是必填项`
1263
+ message: `${r.label}是必填项`
1246
1264
  });
1247
1265
  else {
1248
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1249
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1266
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1267
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1250
1268
  required: !0,
1251
- message: `${t.label}是必填项`
1269
+ message: `${r.label}是必填项`
1252
1270
  });
1253
1271
  }
1254
- else if (t.rules) {
1255
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1256
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1272
+ else if (r.rules) {
1273
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1274
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1257
1275
  required: !0,
1258
- message: `${t.label}是必填项`
1276
+ message: `${r.label}是必填项`
1259
1277
  });
1260
1278
  }
1261
1279
  return {
1262
- rules: t.rules,
1263
- required: t.required
1280
+ rules: r.rules,
1281
+ required: r.required
1264
1282
  };
1265
1283
  },
1266
1284
  getFormModelPropName() {
1267
1285
  return "modelValue";
1268
1286
  },
1269
1287
  formComponentRenderer({
1270
- Component: t,
1288
+ Component: r,
1271
1289
  baseModel: e,
1272
- schema: r,
1290
+ schema: t,
1273
1291
  placeholder: i,
1274
1292
  componentSlots: s,
1275
1293
  props: n
1276
1294
  }) {
1277
1295
  let a;
1278
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1296
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1279
1297
  modelValue: a,
1280
1298
  "onUpdate:modelValue": (l) => {
1281
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1299
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1282
1300
  },
1283
1301
  placeholder: i
1284
1302
  }, n), {
1285
1303
  ...s
1286
1304
  });
1287
1305
  },
1288
- validateForm(t) {
1289
- return new Promise((e, r) => {
1290
- t.runtimeCore.formRef.value.validate().then(({
1306
+ validateForm(r) {
1307
+ return new Promise((e, t) => {
1308
+ r.runtimeCore.formRef.value.validate().then(({
1291
1309
  valid: i,
1292
1310
  errors: s
1293
1311
  }) => {
1294
- i ? e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))) : r(s);
1312
+ i ? e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))) : t(s);
1295
1313
  });
1296
1314
  });
1297
1315
  },
1298
- clearValidate(t) {
1299
- var e, r;
1300
- (r = (e = t.formRef.value) == null ? void 0 : e.reset) == null || r.call(e);
1316
+ clearValidate(r) {
1317
+ var e, t;
1318
+ (t = (e = r.formRef.value) == null ? void 0 : e.reset) == null || t.call(e);
1301
1319
  }
1302
1320
  },
1303
1321
  NaiveUI: {
1304
- getRuntimeField(t) {
1305
- const e = X(t);
1322
+ getRuntimeField(r) {
1323
+ const e = X(r);
1306
1324
  return o.isFunction(e) ? {
1307
1325
  path: e()
1308
1326
  } : {
1309
1327
  path: e
1310
1328
  };
1311
1329
  },
1312
- getRuntimeRequired(t) {
1330
+ getRuntimeRequired(r) {
1313
1331
  var e;
1314
- if (t.required)
1315
- if (!t.rules)
1316
- t.rules = [], t.rules.push({
1332
+ if (r.required)
1333
+ if (!r.rules)
1334
+ r.rules = [], r.rules.push({
1317
1335
  required: !0,
1318
- message: `${t.label}是必填项`,
1336
+ message: `${r.label}是必填项`,
1319
1337
  trigger: ["input", "blur"]
1320
1338
  });
1321
1339
  else {
1322
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1323
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1340
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1341
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1324
1342
  required: !0,
1325
- message: `${t.label}是必填项`,
1343
+ message: `${r.label}是必填项`,
1326
1344
  trigger: ["input", "blur"]
1327
1345
  });
1328
1346
  }
1329
- else if (t.rules) {
1330
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1331
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1347
+ else if (r.rules) {
1348
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1349
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1332
1350
  required: !0,
1333
- message: `${t.label}是必填项`,
1351
+ message: `${r.label}是必填项`,
1334
1352
  trigger: ["input", "blur"]
1335
1353
  });
1336
1354
  }
1337
1355
  return {
1338
- rule: t.rules
1356
+ rule: r.rules
1339
1357
  };
1340
1358
  },
1341
1359
  getFormModelPropName() {
1342
1360
  return "model";
1343
1361
  },
1344
1362
  formComponentRenderer({
1345
- Component: t,
1363
+ Component: r,
1346
1364
  baseModel: e,
1347
- schema: r,
1365
+ schema: t,
1348
1366
  placeholder: i,
1349
1367
  componentSlots: s,
1350
1368
  props: n
1351
1369
  }) {
1352
1370
  let a;
1353
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], b(t, q({
1371
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1354
1372
  value: a,
1355
1373
  "onUpdate:value": (l) => {
1356
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1374
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1357
1375
  },
1358
1376
  placeholder: i
1359
1377
  }, n), {
1360
1378
  ...s
1361
1379
  });
1362
1380
  },
1363
- validateForm(t) {
1364
- return new Promise((e, r) => {
1365
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1381
+ validateForm(r) {
1382
+ return new Promise((e, t) => {
1383
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1366
1384
  });
1367
1385
  },
1368
- clearValidate(t) {
1369
- var e, r;
1370
- (r = (e = t.formRef.value) == null ? void 0 : e.restoreValidation) == null || r.call(e);
1386
+ clearValidate(r) {
1387
+ var e, t;
1388
+ (t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
1371
1389
  }
1372
1390
  }
1373
- }, x = class x {
1391
+ }, E = class E {
1374
1392
  static getPlaceholderPrefixPresetByComponentName() {
1375
1393
  const e = {
1376
1394
  请选择: ["select", "tree"],
1377
1395
  请输入: ["input"]
1378
- }, r = {};
1396
+ }, t = {};
1379
1397
  for (const i in e)
1380
1398
  e[i].forEach((s) => {
1381
- r[s] = i;
1399
+ t[s] = i;
1382
1400
  });
1383
- return r;
1401
+ return t;
1384
1402
  }
1385
1403
  };
1386
- u(x, "schemaPreset", {
1404
+ u(E, "schemaPreset", {
1387
1405
  type: {
1388
1406
  defaultValue: "item"
1389
1407
  },
@@ -1429,15 +1447,15 @@ u(x, "schemaPreset", {
1429
1447
  runtime: {
1430
1448
  default: void 0
1431
1449
  }
1432
- }), u(x, "componentPropsPreset", {
1450
+ }), u(E, "componentPropsPreset", {
1433
1451
  options: {
1434
1452
  defaultValue: []
1435
1453
  }
1436
1454
  }), // 基于基本功能提出基本预设
1437
- u(x, "placeholderPresetByComponentName", x.getPlaceholderPrefixPresetByComponentName());
1438
- let k = x;
1455
+ u(E, "placeholderPresetByComponentName", E.getPlaceholderPrefixPresetByComponentName());
1456
+ let J = E;
1439
1457
  const C = {
1440
- ...k,
1458
+ ...J,
1441
1459
  adapters: {
1442
1460
  ...yr
1443
1461
  }
@@ -1448,13 +1466,13 @@ const C = {
1448
1466
  required: !0
1449
1467
  }
1450
1468
  },
1451
- setup(t) {
1452
- const e = new gr(t.setup);
1469
+ setup(r) {
1470
+ const e = new vr(r.setup);
1453
1471
  return () => e.exec();
1454
1472
  }
1455
1473
  });
1456
- function Ir(t) {
1457
- const e = new Ke(t);
1474
+ function Ir(r) {
1475
+ const e = new Ke(r);
1458
1476
  return [
1459
1477
  e.setup.bind(e),
1460
1478
  {
@@ -1466,33 +1484,33 @@ function Ir(t) {
1466
1484
  }
1467
1485
  ];
1468
1486
  }
1469
- function Sr(t) {
1470
- c.presets = t;
1487
+ function Sr(r) {
1488
+ c.presets = r;
1471
1489
  }
1472
- function re(t, e) {
1473
- return e === "native" && Object.defineProperty(t, "name", {
1474
- value: `__proform_raw_${t.name}`,
1490
+ function re(r, e) {
1491
+ return e === "native" && Object.defineProperty(r, "name", {
1492
+ value: `__proform_raw_${r.name}`,
1475
1493
  writable: !0
1476
- }), e === "structured_path_parsing_mark" && Object.defineProperty(t, "name", {
1477
- value: `__proform_structured_path_parsing_mark_${t.name}`,
1494
+ }), e === "structured_path_parsing_mark" && Object.defineProperty(r, "name", {
1495
+ value: `__proform_structured_path_parsing_mark_${r.name}`,
1478
1496
  writable: !0
1479
- }), e === "onetime" && Object.defineProperty(t, "name", {
1480
- value: `__proform_onetime_${t.name}`,
1497
+ }), e === "onetime" && Object.defineProperty(r, "name", {
1498
+ value: `__proform_onetime_${r.name}`,
1481
1499
  writable: !0
1482
- }), t;
1500
+ }), r;
1483
1501
  }
1484
- function Or(t) {
1485
- return re(t, "native");
1502
+ function Or(r) {
1503
+ return re(r, "native");
1486
1504
  }
1487
- function Fr(t) {
1488
- return t.__proform_raw_object = !0, t;
1505
+ function Fr(r) {
1506
+ return r.__proform_raw_object = !0, r;
1489
1507
  }
1490
- function jr(t) {
1491
- return re(t, "onetime");
1508
+ function jr(r) {
1509
+ return re(r, "onetime");
1492
1510
  }
1493
- function wr(t) {
1511
+ function wr(r) {
1494
1512
  function e() {
1495
- return t;
1513
+ return r;
1496
1514
  }
1497
1515
  return re(
1498
1516
  e,