@harbor-design/proform 1.3.24 → 1.3.25

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