@byteluck-fe/model-driven-driven 2.3.1-beta.2 → 2.3.1-beta.23

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.
@@ -130,7 +130,101 @@ function _createSuper(Derived) {
130
130
  return _possibleConstructorReturn(this, result);
131
131
  };
132
132
  }
133
- import regeneratorRuntime from "regenerator-runtime";
133
+ var __generator = this && this.__generator || function(thisArg, body) {
134
+ var f, y, t, g, _ = {
135
+ label: 0,
136
+ sent: function() {
137
+ if (t[0] & 1) throw t[1];
138
+ return t[1];
139
+ },
140
+ trys: [],
141
+ ops: []
142
+ };
143
+ return g = {
144
+ next: verb(0),
145
+ "throw": verb(1),
146
+ "return": verb(2)
147
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
148
+ return this;
149
+ }), g;
150
+ function verb(n) {
151
+ return function(v) {
152
+ return step([
153
+ n,
154
+ v
155
+ ]);
156
+ };
157
+ }
158
+ function step(op) {
159
+ if (f) throw new TypeError("Generator is already executing.");
160
+ while(_)try {
161
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
162
+ if (y = 0, t) op = [
163
+ op[0] & 2,
164
+ t.value
165
+ ];
166
+ switch(op[0]){
167
+ case 0:
168
+ case 1:
169
+ t = op;
170
+ break;
171
+ case 4:
172
+ _.label++;
173
+ return {
174
+ value: op[1],
175
+ done: false
176
+ };
177
+ case 5:
178
+ _.label++;
179
+ y = op[1];
180
+ op = [
181
+ 0
182
+ ];
183
+ continue;
184
+ case 7:
185
+ op = _.ops.pop();
186
+ _.trys.pop();
187
+ continue;
188
+ default:
189
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
190
+ _ = 0;
191
+ continue;
192
+ }
193
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
194
+ _.label = op[1];
195
+ break;
196
+ }
197
+ if (op[0] === 6 && _.label < t[1]) {
198
+ _.label = t[1];
199
+ t = op;
200
+ break;
201
+ }
202
+ if (t && _.label < t[2]) {
203
+ _.label = t[2];
204
+ _.ops.push(op);
205
+ break;
206
+ }
207
+ if (t[2]) _.ops.pop();
208
+ _.trys.pop();
209
+ continue;
210
+ }
211
+ op = body.call(thisArg, _);
212
+ } catch (e) {
213
+ op = [
214
+ 6,
215
+ e
216
+ ];
217
+ y = 0;
218
+ } finally{
219
+ f = t = 0;
220
+ }
221
+ if (op[0] & 5) throw op[1];
222
+ return {
223
+ value: op[0] ? op[1] : void 0,
224
+ done: true
225
+ };
226
+ }
227
+ };
134
228
  import { RegisterControls, controlHooksEmitter } from "@byteluck-fe/model-driven-core";
135
229
  import EventLogic from "./EventLogic";
136
230
  import { FieldTypes } from "@byteluck-fe/model-driven-shared";
@@ -194,17 +288,14 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
194
288
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
195
289
  args[_key] = arguments[_key];
196
290
  }
197
- return _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
198
- return regeneratorRuntime.wrap(function _callee$(_ctx) {
199
- while(1)switch(_ctx.prev = _ctx.next){
200
- case 0:
201
- return _ctx.abrupt("return", checkSchema.apply(void 0, _toConsumableArray(args)));
202
- case 1:
203
- case "end":
204
- return _ctx.stop();
205
- }
206
- }, _callee);
207
- }))();
291
+ return _asyncToGenerator(function() {
292
+ return __generator(this, function(_state) {
293
+ return [
294
+ 2,
295
+ checkSchema.apply(void 0, _toConsumableArray(args))
296
+ ];
297
+ });
298
+ })();
208
299
  };
209
300
  _proto.getModelBindInfoList = function getModelBindInfoList1() {
210
301
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
@@ -206,7 +206,7 @@ var applyingPluginName = "";
206
206
  // TODO 拿到permission_controls
207
207
  _this.generatePermissions = generatePermissions;
208
208
  _this.$options = Object.freeze(options);
209
- var _$options = _this.$options, _autoMount = _$options.autoMount, autoMount = _autoMount === void 0 ? false : _autoMount, tmp = _$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _$options.schema, _mode = _$options.mode, mode = _mode === void 0 ? "form" : _mode, tmp1 = _$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1;
209
+ var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? false : _this_$options_autoMount, tmp = _this_$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _this_$options.schema, _this_$options_mode = _this_$options.mode, mode = _this_$options_mode === void 0 ? "form" : _this_$options_mode, tmp1 = _this_$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1;
210
210
  _this.eventLogic = new EventLogic();
211
211
  _this.designer = new DesignerClass();
212
212
  _this.store = new Store(_objectSpread({
@@ -221,7 +221,7 @@ var applyingPluginName = "";
221
221
  var _proto = Driven.prototype;
222
222
  // 挂载
223
223
  _proto.mount = function mount() {
224
- var _$options = this.$options, _plugins = _$options.plugins, plugins = _plugins === void 0 ? [] : _plugins;
224
+ var _this_$options = this.$options, _this_$options_plugins = _this_$options.plugins, plugins = _this_$options_plugins === void 0 ? [] : _this_$options_plugins;
225
225
  this.__plugins = plugins;
226
226
  this.applyPlugins();
227
227
  this.isMounted = true;
@@ -237,8 +237,8 @@ var applyingPluginName = "";
237
237
  if (this.__pluginsApplied) return;
238
238
  this.__plugins.forEach(function(plugin) {
239
239
  try {
240
- var _pluginName;
241
- applyingPluginName = (_pluginName = plugin.pluginName) !== null && _pluginName !== void 0 ? _pluginName : plugin.constructor.name;
240
+ var _plugin_pluginName;
241
+ applyingPluginName = (_plugin_pluginName = plugin.pluginName) !== null && _plugin_pluginName !== void 0 ? _plugin_pluginName : plugin.constructor.name;
242
242
  plugin.apply(_this);
243
243
  applyingPluginName = "";
244
244
  } catch (e) {
@@ -277,7 +277,7 @@ var applyingPluginName = "";
277
277
  });
278
278
  };
279
279
  _proto.setSelectedInstanceSetting = function setSelectedInstanceSetting() {
280
- var ref;
280
+ var _instance_parent;
281
281
  var instance = this.store.selected;
282
282
  if (!instance) {
283
283
  return;
@@ -285,9 +285,9 @@ var applyingPluginName = "";
285
285
  var setting = this.getControlSetting(instance.type);
286
286
  // console.log('iswrap:', instance.parent?.controlType, instance.parent)
287
287
  // if (instance.parent instanceof DesignerWrapControl) {
288
- if (((ref = instance.parent) === null || ref === void 0 ? void 0 : ref.controlType) === CONTROL_BASE_TYPE.WRAP) {
289
- var ref1;
290
- var wrapSetting = this.getControlSetting((ref1 = instance.parent) === null || ref1 === void 0 ? void 0 : ref1.type);
288
+ if (((_instance_parent = instance.parent) === null || _instance_parent === void 0 ? void 0 : _instance_parent.controlType) === CONTROL_BASE_TYPE.WRAP) {
289
+ var _instance_parent1;
290
+ var wrapSetting = this.getControlSetting((_instance_parent1 = instance.parent) === null || _instance_parent1 === void 0 ? void 0 : _instance_parent1.type);
291
291
  setting = this.concatSetting(setting, wrapSetting, instance.parent.id);
292
292
  }
293
293
  this.store.setSelectInstanceSettings(setting);
@@ -303,10 +303,10 @@ var applyingPluginName = "";
303
303
  };
304
304
  _proto.concatSetting = function concatSetting(settings, otherSettings, settingFromId) {
305
305
  var _this = this;
306
- var ref, ref1, ref2, ref3;
306
+ var _settings_, _otherSettings_, _settings_1, _otherSettings_1;
307
307
  var result = settings;
308
308
  // tab
309
- if (((ref = settings[0]) === null || ref === void 0 ? void 0 : ref.type) === "tab" && ((ref1 = otherSettings[0]) === null || ref1 === void 0 ? void 0 : ref1.type) === "tab") {
309
+ if (((_settings_ = settings[0]) === null || _settings_ === void 0 ? void 0 : _settings_.type) === "tab" && ((_otherSettings_ = otherSettings[0]) === null || _otherSettings_ === void 0 ? void 0 : _otherSettings_.type) === "tab") {
310
310
  var tabSettings = settings;
311
311
  var otherTabSettings = otherSettings.slice(0);
312
312
  result = tabSettings.map(function(tab, index) {
@@ -329,7 +329,7 @@ var applyingPluginName = "";
329
329
  })));
330
330
  }
331
331
  // group
332
- } else if (((ref2 = settings[0]) === null || ref2 === void 0 ? void 0 : ref2.type) === "group" && ((ref3 = otherSettings[0]) === null || ref3 === void 0 ? void 0 : ref3.type) === "group") {
332
+ } else if (((_settings_1 = settings[0]) === null || _settings_1 === void 0 ? void 0 : _settings_1.type) === "group" && ((_otherSettings_1 = otherSettings[0]) === null || _otherSettings_1 === void 0 ? void 0 : _otherSettings_1.type) === "group") {
333
333
  var groupSettings = settings;
334
334
  var otherGroupSettings = otherSettings;
335
335
  result = _toConsumableArray(this.formatGroupSetting(otherGroupSettings, settingFromId)).concat(_toConsumableArray(groupSettings));
@@ -355,8 +355,8 @@ var applyingPluginName = "";
355
355
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
356
356
  args[_key] = arguments[_key];
357
357
  }
358
- var _designer;
359
- return (_designer = this.designer).registerControlConfig.apply(_designer, _toConsumableArray(args));
358
+ var _this_designer;
359
+ return (_this_designer = this.designer).registerControlConfig.apply(_this_designer, _toConsumableArray(args));
360
360
  };
361
361
  _proto.getControlConfig = function getControlConfig(control) {
362
362
  return this.designer.getControlConfig(control);
@@ -391,7 +391,7 @@ var applyingPluginName = "";
391
391
  };
392
392
  _proto.moveEnd = function moveEnd() {
393
393
  var instance = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.store.movingInstance;
394
- var ref;
394
+ var _this_store_selected;
395
395
  if (instance === null) return;
396
396
  var _instance = this.getInstance(instance);
397
397
  if (!_instance) return;
@@ -405,7 +405,7 @@ var applyingPluginName = "";
405
405
  var newParent = _instance.parent;
406
406
  // 移动之后清空movingInstance
407
407
  this.store.setMovingInstance(null);
408
- if (_instance.id !== ((ref = this.store.selected) === null || ref === void 0 ? void 0 : ref.id)) {
408
+ if (_instance.id !== ((_this_store_selected = this.store.selected) === null || _this_store_selected === void 0 ? void 0 : _this_store_selected.id)) {
409
409
  this.selectInstance(_instance);
410
410
  } else {
411
411
  this.store.setSelectInstance(_instance);
@@ -455,7 +455,7 @@ var applyingPluginName = "";
455
455
  });
456
456
  };
457
457
  _proto.updateInstancePropValue = function updateInstancePropValue(instance, propName, value, payload) {
458
- var ref;
458
+ var _this_store_selected;
459
459
  var result = updateValueFromKeys(instance.props, propName, value);
460
460
  if (!result) {
461
461
  return;
@@ -464,7 +464,7 @@ var applyingPluginName = "";
464
464
  if (propName.startsWith("dataBind")) {
465
465
  this.store.updateDataFieldCodeMap(instance);
466
466
  }
467
- if (instance.id === ((ref = this.store.selected) === null || ref === void 0 ? void 0 : ref.id)) {
467
+ if (instance.id === ((_this_store_selected = this.store.selected) === null || _this_store_selected === void 0 ? void 0 : _this_store_selected.id)) {
468
468
  this.callSelectedEffect(propName, payload);
469
469
  }
470
470
  this.emit("updated", {
@@ -565,8 +565,8 @@ var applyingPluginName = "";
565
565
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
566
566
  arg[_key] = arguments[_key];
567
567
  }
568
- var _designer;
569
- (_designer = this.designer).registerControl.apply(_designer, _toConsumableArray(arg));
568
+ var _this_designer;
569
+ (_this_designer = this.designer).registerControl.apply(_this_designer, _toConsumableArray(arg));
570
570
  return this;
571
571
  };
572
572
  /**
package/dist/esm/Store.js CHANGED
@@ -111,8 +111,8 @@ export var Store = /*#__PURE__*/ function() {
111
111
  this.movingInstance = null;
112
112
  this.movingInstanceOldParent = null;
113
113
  this.movingInstanceOldDataScopeParent = null;
114
- var _getParentBeforeInstanceMove;
115
- this.getParentBeforeInstanceMove = (_getParentBeforeInstanceMove = options.getParentBeforeInstanceMove) !== null && _getParentBeforeInstanceMove !== void 0 ? _getParentBeforeInstanceMove : function(instance) {
114
+ var _options_getParentBeforeInstanceMove;
115
+ this.getParentBeforeInstanceMove = (_options_getParentBeforeInstanceMove = options.getParentBeforeInstanceMove) !== null && _options_getParentBeforeInstanceMove !== void 0 ? _options_getParentBeforeInstanceMove : function(instance) {
116
116
  return instance.parent;
117
117
  };
118
118
  this.instance = options.instance;
@@ -133,8 +133,8 @@ export var Store = /*#__PURE__*/ function() {
133
133
  this.selectedInstanceSetting = settings;
134
134
  this.selectedInstanceSettingItems = [];
135
135
  this.selectedInstanceSetting.forEach(function(group) {
136
- var _selectedInstanceSettingItems;
137
- (_selectedInstanceSettingItems = _this.selectedInstanceSettingItems).push.apply(_selectedInstanceSettingItems, _toConsumableArray(_this.getSettingItems(group)));
136
+ var _this_selectedInstanceSettingItems;
137
+ (_this_selectedInstanceSettingItems = _this.selectedInstanceSettingItems).push.apply(_this_selectedInstanceSettingItems, _toConsumableArray(_this.getSettingItems(group)));
138
138
  });
139
139
  };
140
140
  _proto.getSettingItems = function getSettingItems(group) {
@@ -164,7 +164,7 @@ export var Store = /*#__PURE__*/ function() {
164
164
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
165
165
  try {
166
166
  for(var _iterator = map.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
167
- var _value = _slicedToArray(_step.value, 2), key = _value[0], value = _value[1];
167
+ var _step_value = _slicedToArray(_step.value, 2), key = _step_value[0], value = _step_value[1];
168
168
  if (value.id === instance.id) {
169
169
  map.delete(key);
170
170
  break;
@@ -267,7 +267,7 @@ export function isDataScopeInstance(instance) {
267
267
  return [
268
268
  CONTROL_TYPE.SUBTABLE,
269
269
  CONTROL_TYPE.DATA_VIEW,
270
- CONTROL_TYPE.LIST_VIEW,
270
+ CONTROL_TYPE.LIST_VIEW
271
271
  ].includes(instance.type);
272
272
  }
273
273
  export function findInstanceDataScopeParent(instance) {
@@ -1,9 +1,9 @@
1
1
  import { CONTROL_TYPE, FieldTypes } from "@byteluck-fe/model-driven-shared";
2
- // 使用ObjectDataBind的控件
2
+ // 使用 ObjectDataBind 的控件
3
3
  export var objectDataBindControlTypes = [
4
4
  CONTROL_TYPE.AMOUNT,
5
5
  CONTROL_TYPE.CALC,
6
- CONTROL_TYPE.DATE_RANGE,
6
+ CONTROL_TYPE.DATE_RANGE
7
7
  ];
8
8
  export var objectDataBindKeyToFieldType = {
9
9
  amount: {
@@ -14,9 +14,8 @@ export function loopFormControl(control, callback) {
14
14
  // @ts-ignore
15
15
  loopFormControl(item.props.headers, callback);
16
16
  } else if (hasChildrenControl(item)) {
17
- var // @ts-ignore
18
- ref;
19
- loopFormControl((ref = (item)) === null || ref === void 0 ? void 0 : ref.children, callback);
17
+ loopFormControl(// @ts-ignore
18
+ item === null || item === void 0 ? void 0 : item.children, callback);
20
19
  // @ts-ignore
21
20
  // } else if (item instanceof DesignerFormControl) {
22
21
  } else if (item.controlType === CONTROL_BASE_TYPE.FORM) {
package/dist/esm/utils.js CHANGED
@@ -85,7 +85,101 @@ function _unsupportedIterableToArray(o, minLen) {
85
85
  if (n === "Map" || n === "Set") return Array.from(n);
86
86
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
87
87
  }
88
- import regeneratorRuntime from "regenerator-runtime";
88
+ var __generator = this && this.__generator || function(thisArg, body) {
89
+ var f, y, t, g, _ = {
90
+ label: 0,
91
+ sent: function() {
92
+ if (t[0] & 1) throw t[1];
93
+ return t[1];
94
+ },
95
+ trys: [],
96
+ ops: []
97
+ };
98
+ return g = {
99
+ next: verb(0),
100
+ "throw": verb(1),
101
+ "return": verb(2)
102
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
103
+ return this;
104
+ }), g;
105
+ function verb(n) {
106
+ return function(v) {
107
+ return step([
108
+ n,
109
+ v
110
+ ]);
111
+ };
112
+ }
113
+ function step(op) {
114
+ if (f) throw new TypeError("Generator is already executing.");
115
+ while(_)try {
116
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
117
+ if (y = 0, t) op = [
118
+ op[0] & 2,
119
+ t.value
120
+ ];
121
+ switch(op[0]){
122
+ case 0:
123
+ case 1:
124
+ t = op;
125
+ break;
126
+ case 4:
127
+ _.label++;
128
+ return {
129
+ value: op[1],
130
+ done: false
131
+ };
132
+ case 5:
133
+ _.label++;
134
+ y = op[1];
135
+ op = [
136
+ 0
137
+ ];
138
+ continue;
139
+ case 7:
140
+ op = _.ops.pop();
141
+ _.trys.pop();
142
+ continue;
143
+ default:
144
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
145
+ _ = 0;
146
+ continue;
147
+ }
148
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
149
+ _.label = op[1];
150
+ break;
151
+ }
152
+ if (op[0] === 6 && _.label < t[1]) {
153
+ _.label = t[1];
154
+ t = op;
155
+ break;
156
+ }
157
+ if (t && _.label < t[2]) {
158
+ _.label = t[2];
159
+ _.ops.push(op);
160
+ break;
161
+ }
162
+ if (t[2]) _.ops.pop();
163
+ _.trys.pop();
164
+ continue;
165
+ }
166
+ op = body.call(thisArg, _);
167
+ } catch (e) {
168
+ op = [
169
+ 6,
170
+ e
171
+ ];
172
+ y = 0;
173
+ } finally{
174
+ f = t = 0;
175
+ }
176
+ if (op[0] & 5) throw op[1];
177
+ return {
178
+ value: op[0] ? op[1] : void 0,
179
+ done: true
180
+ };
181
+ }
182
+ };
89
183
  import { loopFormControl } from "./designerUtils";
90
184
  import { CONTROL_BASE_TYPE, CONTROL_TYPE, FieldTypeToColumnType, isArray } from "@byteluck-fe/model-driven-shared";
91
185
  import Designer from "./Designer";
@@ -226,35 +320,42 @@ function checkSchema(controls, messages, ignore) {
226
320
  return _checkSchema.apply(this, arguments);
227
321
  }
228
322
  function _checkSchema() {
229
- _checkSchema = _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(controls, messages, ignore) {
323
+ _checkSchema = _asyncToGenerator(function(controls, messages, ignore) {
230
324
  var result;
231
- return regeneratorRuntime.wrap(function _callee$(_ctx) {
232
- while(1)switch(_ctx.prev = _ctx.next){
325
+ return __generator(this, function(_state) {
326
+ switch(_state.label){
233
327
  case 0:
234
- if (!Array.isArray(controls)) {
235
- _ctx.next = 5;
236
- break;
237
- }
238
- _ctx.next = 3;
239
- return Promise.all(controls.map(function(control) {
240
- return control.validate(messages, ignore);
241
- }));
328
+ if (!Array.isArray(controls)) return [
329
+ 3,
330
+ 2
331
+ ];
332
+ return [
333
+ 4,
334
+ Promise.all(controls.map(function(control) {
335
+ return control.validate(messages, ignore);
336
+ }))
337
+ ];
338
+ case 1:
339
+ result = _state.sent();
340
+ return [
341
+ 2,
342
+ result.every(function(state) {
343
+ return state;
344
+ })
345
+ ];
346
+ case 2:
347
+ return [
348
+ 4,
349
+ controls.validate(messages, ignore)
350
+ ];
242
351
  case 3:
243
- result = _ctx.sent;
244
- return _ctx.abrupt("return", result.every(function(state) {
245
- return state;
246
- }));
247
- case 5:
248
- _ctx.next = 7;
249
- return controls.validate(messages, ignore);
250
- case 7:
251
- return _ctx.abrupt("return", _ctx.sent);
252
- case 8:
253
- case "end":
254
- return _ctx.stop();
352
+ return [
353
+ 2,
354
+ _state.sent()
355
+ ];
255
356
  }
256
- }, _callee);
257
- }));
357
+ });
358
+ });
258
359
  return _checkSchema.apply(this, arguments);
259
360
  }
260
361
  // 不可以被权限控制的控件
@@ -276,7 +377,7 @@ var PermissionExcludeControlTypes = [
276
377
  // 暂时不能控制权限
277
378
  CONTROL_TYPE.TAB_PANE,
278
379
  CONTROL_TYPE.TAB,
279
- CONTROL_TYPE.CARD_GROUP,
380
+ CONTROL_TYPE.CARD_GROUP
280
381
  ];
281
382
  // 不可以编辑的控件
282
383
  var cannotEditControlTypes = [
@@ -307,16 +408,16 @@ function generatePermissions(controls, parent) {
307
408
  }).flat()));
308
409
  } else {
309
410
  var type = controls.type;
310
- var _props = controls.props, caption = _props.caption, content = _props.content;
411
+ var _controls_props = controls.props, caption = _controls_props.caption, content = _controls_props.content;
311
412
  var permissionItem;
312
413
  if (!PermissionExcludeControlTypes.includes(type)) {
313
- var ref;
414
+ var _parent_controlId;
314
415
  permissionItem = {
315
416
  controlId: controls.id,
316
417
  caption: caption || content || controls.name,
317
418
  type: controls.type,
318
419
  controlType: controls.controlType,
319
- parentId: (ref = parent === null || parent === void 0 ? void 0 : parent.controlId) !== null && ref !== void 0 ? ref : null,
420
+ parentId: (_parent_controlId = parent === null || parent === void 0 ? void 0 : parent.controlId) !== null && _parent_controlId !== void 0 ? _parent_controlId : null,
320
421
  canEdit: !cannotEditControlTypes.includes(type),
321
422
  canRead: true,
322
423
  canHide: true,
@@ -335,29 +436,29 @@ function generatePermissions(controls, parent) {
335
436
  // ) {
336
437
  if (controls.controlType === CONTROL_BASE_TYPE.FORM || controls.controlType === CONTROL_BASE_TYPE.COLUMN) {
337
438
  var //@ts-ignore
338
- ref1, ref2, //@ts-ignore
339
- ref3, ref4;
340
- if (((ref1 = controls.props) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.dataBind) === null || ref2 === void 0 ? void 0 : ref2.fieldCode) !== undefined && ((ref3 = controls.props) === null || ref3 === void 0 ? void 0 : (ref4 = ref3.dataBind) === null || ref4 === void 0 ? void 0 : ref4.fieldCode) !== "") {
439
+ _controls_props1, _controls_props_dataBind, //@ts-ignore
440
+ _controls_props2, _controls_props_dataBind1;
441
+ if (((_controls_props1 = controls.props) === null || _controls_props1 === void 0 ? void 0 : (_controls_props_dataBind = _controls_props1.dataBind) === null || _controls_props_dataBind === void 0 ? void 0 : _controls_props_dataBind.fieldCode) !== undefined && ((_controls_props2 = controls.props) === null || _controls_props2 === void 0 ? void 0 : (_controls_props_dataBind1 = _controls_props2.dataBind) === null || _controls_props_dataBind1 === void 0 ? void 0 : _controls_props_dataBind1.fieldCode) !== "") {
341
442
  permissionItem.group = "field";
342
443
  }
343
444
  }
344
445
  result.push(permissionItem);
345
446
  //追加vue容器权限
346
447
  if (type === CONTROL_TYPE.VUE_FORM_ITEM) {
347
- var ref5, ref6, ref7, ref8;
448
+ var _controls_props3, _controls_props_dataBind2, _controls_props4, _controls_props_dataBind3;
348
449
  var vueFormItemGroup = "element";
349
- if (((ref5 = controls.props) === null || ref5 === void 0 ? void 0 : (ref6 = ref5.dataBind) === null || ref6 === void 0 ? void 0 : ref6.fieldCode) !== undefined && ((ref7 = controls.props) === null || ref7 === void 0 ? void 0 : (ref8 = ref7.dataBind) === null || ref8 === void 0 ? void 0 : ref8.fieldCode) !== "") {
450
+ if (((_controls_props3 = controls.props) === null || _controls_props3 === void 0 ? void 0 : (_controls_props_dataBind2 = _controls_props3.dataBind) === null || _controls_props_dataBind2 === void 0 ? void 0 : _controls_props_dataBind2.fieldCode) !== undefined && ((_controls_props4 = controls.props) === null || _controls_props4 === void 0 ? void 0 : (_controls_props_dataBind3 = _controls_props4.dataBind) === null || _controls_props_dataBind3 === void 0 ? void 0 : _controls_props_dataBind3.fieldCode) !== "") {
350
451
  vueFormItemGroup = "field";
351
452
  }
352
453
  var permissions = controls.props["permissions"];
353
454
  permissions === null || permissions === void 0 ? void 0 : permissions.map(function(item) {
354
- var _id;
455
+ var _controls_id;
355
456
  permissionItem = {
356
457
  controlId: item.key,
357
458
  caption: item.caption,
358
459
  type: controls.type,
359
460
  controlType: controls.controlType,
360
- parentId: (_id = controls.id) !== null && _id !== void 0 ? _id : null,
461
+ parentId: (_controls_id = controls.id) !== null && _controls_id !== void 0 ? _controls_id : null,
361
462
  canEdit: true,
362
463
  canRead: true,
363
464
  canHide: true,
@@ -369,17 +470,17 @@ function generatePermissions(controls, parent) {
369
470
  } else if (type === CONTROL_TYPE.OPERATION_COLUMN) {
370
471
  // 列表的操作列单独处理
371
472
  Object.entries(LIST_OPERATION_BUTTON_PERMISSIONS_MAPS).reduce(function(result, param) {
372
- var _param = _slicedToArray(param, 2), key = _param[0], ref = _param[1], caption = ref.caption, controlId = ref.id;
473
+ var _param = _slicedToArray(param, 2), key = _param[0], _param_ = _param[1], caption = _param_.caption, controlId = _param_.id;
373
474
  var operationItem = controls.props[key];
374
475
  if (operationItem && operationItem.isShow) {
375
- var ref1;
476
+ var _parent_controlId;
376
477
  // 只能控制是否显示
377
478
  result.push({
378
479
  controlId: controlId,
379
480
  caption: caption,
380
481
  type: controls.type,
381
482
  controlType: controls.controlType,
382
- parentId: (ref1 = parent === null || parent === void 0 ? void 0 : parent.controlId) !== null && ref1 !== void 0 ? ref1 : null,
483
+ parentId: (_parent_controlId = parent === null || parent === void 0 ? void 0 : parent.controlId) !== null && _parent_controlId !== void 0 ? _parent_controlId : null,
383
484
  canEdit: false,
384
485
  canRead: false,
385
486
  canHide: true,
package/dist/index.umd.js CHANGED
@@ -1,3 +1,3 @@
1
- var al=Object.defineProperty;var On=Object.getOwnPropertySymbols;var sl=Object.prototype.hasOwnProperty,cl=Object.prototype.propertyIsEnumerable;var $n=(A,D,R)=>D in A?al(A,D,{enumerable:!0,configurable:!0,writable:!0,value:R}):A[D]=R,X=(A,D)=>{for(var R in D||(D={}))sl.call(D,R)&&$n(A,R,D[R]);if(On)for(var R of On(D))cl.call(D,R)&&$n(A,R,D[R]);return A};var It=(A,D,R)=>new Promise((T,pe)=>{var Re=U=>{try{J(R.next(U))}catch(Q){pe(Q)}},Oe=U=>{try{J(R.throw(U))}catch(Q){pe(Q)}},J=U=>U.done?T(U.value):Promise.resolve(U.value).then(Re,Oe);J((R=R.apply(A,D)).next())});(function(A,D){typeof exports=="object"&&typeof module!="undefined"?D(exports,require("regenerator-runtime")):typeof define=="function"&&define.amd?define(["exports","regenerator-runtime"],D):(A=typeof globalThis!="undefined"?globalThis:A||self,D(A.modelDrivenDriven={},A.regeneratorRuntime))})(this,function(A,D){"use strict";function R(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var T=R(D),pe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Re="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Oe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",J="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",U="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Q="{caption}\u5FC5\u586B",Pn="\u8BF7\u8F93\u5165\u6807\u9898",Mn="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Tn="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Ln="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",jn="\u8BF7\u7ED1\u5B9A\u8868\u5355",xn="\u8BF7\u7ED1\u5B9A\u5217\u8868",Nn="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",Un="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Vn="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",qn="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Hn="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",kn="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Wn="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",zn="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Gn="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Kn="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",Xn="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Jn="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Qn="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Zn="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Yn="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",er="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",tr="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",nr="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",rr="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",ur="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",ir="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",or="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ar="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",sr="\u8BF7\u7ED1\u5B9A\u670D\u52A1",cr="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",lr="\u8BF7\u9009\u62E9\u7701",fr="\u8BF7\u9009\u62E9\u5E02",pr="\u8BF7\u9009\u62E9\u533A",dr="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",hr="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",yr="\u8BF7\u8F93\u5165\u5217\u5BBD",vr="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",gr="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",mr="\u8BF7\u9009\u62E9\u63A7\u4EF6",Er="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",br="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",Ar="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Br="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",Sr="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ir="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",_r="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Cr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Fr="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",wr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Dr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Rr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Or="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",$r="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Pr="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Mr="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Tr="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Lr="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",jr="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",xr="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Nr="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ur={isNotNumber:pe,isNotString:Re,isNotObject:Oe,isNotArray:J,isNotBoolean:U,runtimeRequired:Q,pleaseEnterCaption:Pn,pleaseEnterCaptionTip:Mn,pleaseEnterPlaceholder:Tn,pleaseEnterFieldCode:Ln,pleaseEnterForm:jn,pleaseEnterList:xn,pleaseEnterProcess:Nn,pleaseEnterLabel:Un,pleaseEnterValue:Vn,bizKeyNotBindFiled:qn,pleaseSelectOneField:Hn,pleaseEnterNumberRange:kn,pleaseEnterAValueGreaterThanMin:Wn,pleaseEnterAValueLessThanMax:zn,numberRangeSetError:Gn,stringRangeError:Kn,attachmentMaxSize:Xn,pleaseEnterTotalScoreSetting:Jn,theTotalScoreMustNotBeLessThan1:Qn,scoreDefaultValueRange:Zn,attachmentLimitError:Yn,PleaseReselectTheOptionalQuantity:er,TheMaximumLengthIsGreaterThanTheMinimumLength:tr,TheMinimumLengthIsGreaterThanTheMaximumLength:nr,PleaseSelectTheCorrectOptionSettings:rr,optionIdIsRepeat:ur,optionIsRequired:ir,pleaseEnterDataCode:or,pleaseEnterValueFieldCode:ar,pleaseEnterSvcCode:sr,pleaseBindAtLeastOneDisplayValue:cr,pleaseSelectProvince:lr,pleaseSelectCity:fr,pleaseSelectDistrict:pr,limitRowsCannotBeLessThan0:dr,TheNumberOfRowsCannotBeLessThanMinRows:hr,pleaseEnterColumnWidth:yr,pleaseSetTheLogicalRelationshipOfAllRuleConditions:vr,pleaseCompleteAllRulesAndConditions:gr,pleaseSelectControl:mr,pleaseSelectAtLeastOneColumn:Er,pleaseSelectFillBackMode:br,pleaseSelectDashboard:Ar,rootNodeIsRequired:Br,theViewNameCannotBeEmpty:Sr,pleaseSelectOcrType:Ir,pleaseSelectAtLeastOneFieldToFillIn:_r,pleaseChooseAtLeastOne:Cr,pleaseEnterButtonContent:Fr,pleaseEnterDataCodeInDataSetting:wr,pleaseEnterValueFieldCodeInDataSetting:Dr,pleaseEnterSvcCodeInDataSetting:Rr,pleaseBindAtLeastOneDisplayValueInDataSetting:Or,rootNodeIsRequiredInDataSetting:$r,pleaseEnterMaxHeight:Pr,pleaseEnter:Mr,pleaseEnterWatermark:Tr,pleaseEnterFileName:Lr,pleaseUploadAtLeastOnePrintTemplate:jr,pleaseAssignBusiness:xr,pleaseAssignExternal:Nr},Vr="Please enter a number",qr="Please enter a string",Hr="Please enter an object",kr="Please enter an array",Wr="Please enter a boolean",zr="{caption} Required",Gr="Please enter the title",Kr="Please enter the bubble prompt",Xr="Please enter the prompt text",Jr="Please bind data items",Qr="Please bind the form",Zr="Please bind the list",Yr="Please bind the process",eu="Please enter the displayed value",tu="Please enter the stored value",nu="The document number is not bound to the data item",ru="Please select at least one display field",uu="Please enter a value greater than or equal to {min} and less than or equal to {max}",iu="Please enter a value greater than or equal to {min}",ou="Please enter a value less than or equal to {max}",au="The value range is set incorrectly",su="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",cu="The attachment size must be between 0MB and 1000MB",lu="Please fill in the total score setting",fu="The total score cannot be less than 1",pu="The default value must be between {min} and {max}",du="The number of attachments uploaded must be between {min} and {max}",hu="Please re-select the optional quantity",yu="The maximum length of the control must be greater than the minimum length",vu="The minimum length of the control must be less than the maximum length",gu="Please select the correct option setting",mu="Option ID cannot be repeated",Eu="Please enter at least one option",bu="Please bind the data source",Au="Please bind the stored value",Bu="Please bind the service",Su="At least one display value must be bound",Iu="Please select a province",_u="Please select a city",Cu="Please select a district",Fu="The minimum number of lines to fill in cannot be less than 0",wu="The number of rows cannot be less than {min} rows",Du="Please enter the column width",Ru="Please set the logical relationship of all rule conditions",Ou="Please complete all rules and conditions",$u="please select control",Pu="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Mu="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Tu="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Lu="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ju="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",xu="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Nu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Uu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Vu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",qu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Hu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",ku="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Wu="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",zu="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Gu="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ku="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Xu="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ju="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Qu={isNotNumber:Vr,isNotString:qr,isNotObject:Hr,isNotArray:kr,isNotBoolean:Wr,runtimeRequired:zr,pleaseEnterCaption:Gr,pleaseEnterCaptionTip:Kr,pleaseEnterPlaceholder:Xr,pleaseEnterFieldCode:Jr,pleaseEnterForm:Qr,pleaseEnterList:Zr,pleaseEnterProcess:Yr,pleaseEnterLabel:eu,pleaseEnterValue:tu,bizKeyNotBindFiled:nu,pleaseSelectOneField:ru,pleaseEnterNumberRange:uu,pleaseEnterAValueGreaterThanMin:iu,pleaseEnterAValueLessThanMax:ou,numberRangeSetError:au,stringRangeError:su,attachmentMaxSize:cu,pleaseEnterTotalScoreSetting:lu,theTotalScoreMustNotBeLessThan1:fu,scoreDefaultValueRange:pu,attachmentLimitError:du,PleaseReselectTheOptionalQuantity:hu,TheMaximumLengthIsGreaterThanTheMinimumLength:yu,TheMinimumLengthIsGreaterThanTheMaximumLength:vu,PleaseSelectTheCorrectOptionSettings:gu,optionIdIsRepeat:mu,optionIsRequired:Eu,pleaseEnterDataCode:bu,pleaseEnterValueFieldCode:Au,pleaseEnterSvcCode:Bu,pleaseBindAtLeastOneDisplayValue:Su,pleaseSelectProvince:Iu,pleaseSelectCity:_u,pleaseSelectDistrict:Cu,limitRowsCannotBeLessThan0:Fu,TheNumberOfRowsCannotBeLessThanMinRows:wu,pleaseEnterColumnWidth:Du,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ru,pleaseCompleteAllRulesAndConditions:Ou,pleaseSelectControl:$u,pleaseSelectDashboard:Pu,theViewNameCannotBeEmpty:Mu,pleaseSelectOcrType:Tu,pleaseSelectAtLeastOneFieldToFillIn:Lu,pleaseChooseAtLeastOne:ju,pleaseEnterButtonContent:xu,pleaseEnterDataCodeInDataSetting:Nu,pleaseEnterValueFieldCodeInDataSetting:Uu,pleaseEnterSvcCodeInDataSetting:Vu,pleaseBindAtLeastOneDisplayValueInDataSetting:qu,rootNodeIsRequiredInDataSetting:Hu,pleaseEnterMaxHeight:ku,pleaseEnter:Wu,pleaseEnterWatermark:zu,pleaseEnterFileName:Gu,pleaseUploadAtLeastOnePrintTemplate:Ku,pleaseAssignBusiness:Xu,pleaseAssignExternal:Ju},Zu="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Yu="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ei="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ti="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ni="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ri="{caption}\u5FC5\u9808",ui="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ii="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",oi="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ai="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",si="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ci="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",li="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",fi="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",pi="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",di="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",hi="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",yi="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",vi="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",gi="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",mi="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ei="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",bi="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ai="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Bi="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Si="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ii="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",_i="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ci="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5927\u5024\u306F\u6700\u5C0F\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Fi="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u5024\u306F\u6700\u5927\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",wi="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Di="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Ri="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Oi="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",$i="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Pi="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Mi="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",Ti="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Li="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ji="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",xi="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ni="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Ui="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Vi="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",qi="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",Hi="please select control",ki="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Wi="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",zi="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Gi="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Ki="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Xi="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Ji="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Qi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Zi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Yi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",eo="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",to="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",no="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",ro="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",uo="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",io="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",oo="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ao="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",so={isNotNumber:Zu,isNotString:Yu,isNotObject:ei,isNotArray:ti,isNotBoolean:ni,runtimeRequired:ri,pleaseEnterCaption:ui,pleaseEnterCaptionTip:ii,pleaseEnterPlaceholder:oi,pleaseEnterFieldCode:ai,pleaseEnterForm:si,pleaseEnterList:ci,pleaseEnterProcess:li,pleaseEnterLabel:fi,pleaseEnterValue:pi,bizKeyNotBindFiled:di,pleaseSelectOneField:hi,pleaseEnterNumberRange:yi,pleaseEnterAValueGreaterThanMin:vi,pleaseEnterAValueLessThanMax:gi,numberRangeSetError:mi,stringRangeError:Ei,attachmentMaxSize:bi,pleaseEnterTotalScoreSetting:Ai,theTotalScoreMustNotBeLessThan1:Bi,scoreDefaultValueRange:Si,attachmentLimitError:Ii,PleaseReselectTheOptionalQuantity:_i,TheMaximumLengthIsGreaterThanTheMinimumLength:Ci,TheMinimumLengthIsGreaterThanTheMaximumLength:Fi,PleaseSelectTheCorrectOptionSettings:wi,optionIdIsRepeat:Di,optionIsRequired:Ri,pleaseEnterDataCode:Oi,pleaseEnterValueFieldCode:$i,pleaseEnterSvcCode:Pi,pleaseBindAtLeastOneDisplayValue:Mi,pleaseSelectProvince:Ti,pleaseSelectCity:Li,pleaseSelectDistrict:ji,limitRowsCannotBeLessThan0:xi,TheNumberOfRowsCannotBeLessThanMinRows:Ni,pleaseEnterColumnWidth:Ui,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Vi,pleaseCompleteAllRulesAndConditions:qi,pleaseSelectControl:Hi,pleaseSelectDashboard:ki,theViewNameCannotBeEmpty:Wi,pleaseSelectOcrType:zi,pleaseSelectAtLeastOneFieldToFillIn:Gi,pleaseChooseAtLeastOne:Ki,pleaseEnterButtonContent:Xi,pleaseEnterDataCodeInDataSetting:Ji,pleaseEnterValueFieldCodeInDataSetting:Qi,pleaseEnterSvcCodeInDataSetting:Zi,pleaseBindAtLeastOneDisplayValueInDataSetting:Yi,rootNodeIsRequiredInDataSetting:eo,pleaseEnterMaxHeight:to,pleaseEnter:no,pleaseEnterWatermark:ro,pleaseEnterFileName:uo,pleaseUploadAtLeastOnePrintTemplate:io,pleaseAssignBusiness:oo,pleaseAssignExternal:ao},co={zhCN:Ur,enUS:Qu,jaJP:so},_t;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(_t||(_t={}));var Ct;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(Ct||(Ct={}));var lo="zh-CN",fo=function(){};function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(O||(O={}));var h;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(h||(h={}));var _;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(_||(_={}));var $,po=($={},P($,_.ARRAY,h.ARRAY_COLUMN),P($,_.AUTO_NUMBER,h.AUTO_NUMBER_COLUMN),P($,_.DECIMAL,h.DECIMAL_COLUMN),P($,_.DEPARTMENTS,h.DEPARTMENT_COLUMN),P($,_.FILE,h.FILE_COLUMN),P($,_.IMAGE,h.IMAGE_COLUMN),P($,_.ADDRESS,h.LOCATION_COLUMN),P($,_.EMPLOYEES,h.EMPLOYEE_COLUMN),P($,_.TEXT,h.TEXT_COLUMN),P($,_.TIMESCOPE,h.TIMESCOPE_COLUMN),P($,_.TIMESTAMP,h.TIMESTAMP_COLUMN),P($,_.VARCHAR,h.VARCHAR_COLUMN),P($,_.RELATION,h.VARCHAR_COLUMN),$),Ft;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(Ft||(Ft={}));var wt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",ho=wt+"0123456789";function $e(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?wt:ho,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yo(e){if(Array.isArray(e))return Pe(e)}function vo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function go(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function de(e,t,n){return go()?de=Reflect.construct:de=function(u,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(u,s),f=new c;return a&&Y(f,a.prototype),f},de.apply(null,arguments)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Z(e)}function Rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}function mo(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Eo(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bo(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ao(e,t){return t&&(Bo(t)==="object"||typeof t=="function")?t:vo(e)}function Y(e,t){return Y=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Y(e,t)}function Ot(e){return yo(e)||Eo(e)||So(e)||bo()}var Bo=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function So(e,t){if(!!e){if(typeof e=="string")return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}}function Me(e){var t=typeof Map=="function"?new Map:void 0;return Me=function(r){if(r===null||!mo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return de(r,arguments,Z(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Y(u,r)},Me(e)}function Io(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function $t(e){var t=Io();return function(){var r=Z(e),u;if(t){var o=Z(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Ao(this,u)}}var Te=console;function he(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Te).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(Ot(u)))}function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Te).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(Ot(u)))}function _o(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Le=function(e){Rt(n,e);var t=$t(n);function n(r){Dt(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?_o(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Me(Error)),Co=function(e){Rt(n,e);var t=$t(n);function n(r){Dt(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Le);function ee(e){throw new Le(e)}function Mt(e){throw new Co(e)}function Fo(e){Te.error(new Le(e))}var wo=Object.prototype.toString;function Tt(e,t){return wo.call(e)==="[object "+t+"]"}function Do(e){return Tt(e,"String")}function Ro(e){return Tt(e,"Promise")}var Oo=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();Ro(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,o,a,s){if(u!==void 0){var c=u[o];if(!(a===s.length-1&&!Do(c)))return c}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var o=n[u];return o!==void 0?String(o):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function $o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Lt=function(){function e(){$o(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lo;return new Oo({locale:n,messages:co})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Lt.$i18n=Lt.resetI18n();function jt(e,t,n){var r=t.replace(/\[(\d)]/g,function(o,a){return"."+a}).split("."),u=!1;return r.reduce(function(o,a,s,c){var f=o;if(!!o){if(!Object.prototype.hasOwnProperty.call(o,a)){he("Can not set ".concat(t,"'s ").concat(a," property in current %o, Because there is no ").concat(a," property on the %o"),o,o);return}return s===c.length-1&&!Object.is(f[a],n)&&(f[a]=n,u=!0),f[a]}},e),u}var Po=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Mo={exports:{}};(function(e){(function(t){var n=function(l,y,F){if(!f(y)||m(y)||g(y)||b(y)||c(y))return y;var v,C=0,x=0;if(p(y))for(v=[],x=y.length;C<x;C++)v.push(n(l,y[C],F));else{v={};for(var I in y)Object.prototype.hasOwnProperty.call(y,I)&&(v[l(I,F)]=n(l,y[I],F))}return v},r=function(l,y){y=y||{};var F=y.separator||"_",v=y.split||/(?=[A-Z])/;return l.split(v).join(F)},u=function(l){return S(l)?l:(l=l.replace(/[\-_\s]+(.)?/g,function(y,F){return F?F.toUpperCase():""}),l.substr(0,1).toLowerCase()+l.substr(1))},o=function(l){var y=u(l);return y.substr(0,1).toUpperCase()+y.substr(1)},a=function(l,y){return r(l,y).toLowerCase()},s=Object.prototype.toString,c=function(l){return typeof l=="function"},f=function(l){return l===Object(l)},p=function(l){return s.call(l)=="[object Array]"},m=function(l){return s.call(l)=="[object Date]"},g=function(l){return s.call(l)=="[object RegExp]"},b=function(l){return s.call(l)=="[object Boolean]"},S=function(l){return l=l-0,l===l},d=function(l,y){var F=y&&"process"in y?y.process:y;return typeof F!="function"?l:function(v,C){return F(v,l,C)}},E={camelize:u,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(l,y){return n(d(u,y),l)},decamelizeKeys:function(l,y){return n(d(a,y),l,y)},pascalizeKeys:function(l,y){return n(d(o,y),l)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=E:t.humps=E})(Po)})(Mo);var xt={};Object.defineProperty(xt,"__esModule",{value:!0});function je(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(t=>typeof t!="object"||t===null?t:je(t));{const t={};for(const n in e){const r=e[n];t[n]=typeof r!="object"||r===null?r:je(r)}return t}}var To=xt.default=je;function te(e){if(e!==void 0)return typeof e=="object"?To(e):e}function xe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lo(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function ne(e){return Array.isArray(e)}function Ne(e){return typeof e=="string"}function jo(e){return Object.values(h).includes(e)}function Ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xo(e){if(Array.isArray(e))return Ue(e)}function Nt(e,t,n,r,u,o,a){try{var s=e[o](a),c=s.value}catch(f){n(f);return}s.done?t(c):Promise.resolve(c).then(r,u)}function No(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){Nt(o,r,u,a,s,"next",c)}function s(c){Nt(o,r,u,a,s,"throw",c)}a(void 0)})}}function Uo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vo(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qo(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ve(e){return xo(e)||Vo(e)||Ho(e)||qo()}function Ho(e,t){if(!!e){if(typeof e=="string")return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}}var Ut=function(){function e(){Uo(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,o=new Array(u>1?u-1:0),a=1;a<u;a++)o[a-1]=arguments[a];var s=this;return No(T.default.mark(function c(){var f,p,m,g,b,S,d,E,l,y;return T.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(f=s._events.get(r),p=[],!f){v.next=42;break}m=f.slice(),g=!0,b=!1,S=void 0,v.prev=5,d=m[Symbol.iterator]();case 7:if(g=(E=d.next()).done){v.next=28;break}if(l=E.value,f.includes(l)){v.next=11;break}return v.abrupt("continue",25);case 11:return v.prev=11,s.debug&&Pt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(l.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+l.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(o.map(function(){return"%o"}).join(","),"\u3002")].concat(Ve(o))),v.next=15,l.apply(null,Ve(o));case 15:if(y=v.sent,s.debug&&Pt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(l.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+l.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(o.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Ve(o),[y])),p.push(y),y!==!1){v.next=20;break}return v.abrupt("break",28);case 20:v.next=25;break;case 22:v.prev=22,v.t0=v.catch(11),Fo(String(v.t0));case 25:g=!0,v.next=7;break;case 28:v.next=34;break;case 30:v.prev=30,v.t1=v.catch(5),b=!0,S=v.t1;case 34:v.prev=34,v.prev=35,!g&&d.return!=null&&d.return();case 37:if(v.prev=37,!b){v.next=40;break}throw S;case 40:return v.finish(37);case 41:return v.finish(34);case 42:return v.abrupt("return",p);case 43:case"end":return v.stop()}},c,null,[[5,30,34,42],[11,22],[35,,37,41]])}))()},t.on=function(r,u){if(this._events.has(r)){var o;(o=this._events.get(r))===null||o===void 0||o.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var o=this._events.get(r),a=o==null?void 0:o.indexOf(u);o==null||o.splice(a,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Wo=[{key:"on_click",name:"\u70B9\u51FB\u65F6",code:"click"},{key:"on_click_finish",name:"\u6267\u884C\u5B8C\u6210\u65F6",code:"click-finish"},{key:"on_change",name:"\u503C\u53D1\u751F\u53D8\u5316\u65F6",code:"change"},{key:"on_search",name:"\u641C\u7D22\u65F6",code:"search"},{key:"on_list_change",name:"\u5217\u8868\u6570\u636E\u53D8\u5316\u65F6",code:"list-change"},{key:"on_list_search",name:"\u5217\u8868\u6570\u636E\u67E5\u8BE2\u6784\u5EFA\u65F6",code:"list-search"},{key:"on_list_mounted",name:"\u5217\u8868\u6570\u636E\u8FD4\u56DE\u65F6",code:"list-mounted"},{key:"on_list_delete",name:"\u5217\u8868\u6570\u636E\u5220\u9664\u65F6",code:"list-delete"},{key:"on_input",name:"\u7528\u6237\u8F93\u5165\u65F6",code:"input"},{key:"on_blur",name:"\u5931\u53BB\u7126\u70B9\u65F6",code:"blur"},{key:"on_focus",name:"\u83B7\u53D6\u7126\u70B9\u65F6",code:"focus"},{key:"on_wps_open",name:"\u6253\u5F00\u6587\u4EF6\u65F6",code:"wps-open"},{key:"on_wps_save",name:"\u4FDD\u5B58\u6587\u4EF6\u65F6",code:"wps-save"},{key:"on_wps_rename",name:"\u91CD\u547D\u540D\u65F6",code:"wps-rename"},{key:"on_list_actions",name:"\u70B9\u51FB\u64CD\u4F5C\u6309\u94AE\u65F6",code:"list-actions"},{key:"on_list_render_operation",name:"\u64CD\u4F5C\u5217\u6E32\u67D3\u65F6",code:"list-render-operation"},{key:"on_list_rowclick",name:"\u884C\u70B9\u51FB\u65F6",code:"list-rowclick"},{key:"on_list_before_rowdelete",name:"\u884C\u5220\u9664\u524D",code:"list-before-rowdelete"},{key:"on_list_before_import",name:"\u5217\u8868\u6570\u636E\u5BFC\u5165\u524D",code:"list-before-import"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rows-checked"},{key:"on_change_tab",name:"\u6807\u7B7E\u9875\u5207\u6362\u65F6",code:"change-tab"}],re=function(){function e(){ko(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return e.events.filter(function(o){return u.includes(o.key)})},e}();re.events=Wo;function zo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Vt=[],ye=function(){function e(n){zo(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var t=e.prototype;return t.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},t.getControlConfig=function(r){return this.controlConfigMap.get(r)},t.getControls=function(){return this._controls},t.register=function(r){r.__is_control__||ee("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(o){return o.controlType===r.controlType});return u>-1&&(he("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},t.isLayoutControl=function(r){return r.controlType===O.LAYOUT},t.isFormControl=function(r){return r.controlType===O.FORM},t.isListControl=function(r){return r.controlType===O.LIST},t.isColumnControl=function(r){return r.controlType===O.COLUMN},t.createControl=function(r,u){var o=this;if(Array.isArray(r))return r.map(function(p){return o.createControl(p,u)});r.children&&(r.children=r.children.map(function(p){return o.createControl(p,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(p){return o.createControl(p,u)}));var a=this.getControlFormType(r.type);if(a){var s=r;if(typeof u=="function"){var c=u(s);c&&(s=c)}var f=new a(s);return f}else ee("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(r,u){var o=this.getControlFormType(r);if(o)return new o(u)},t.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},t._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(o){u.register(o[r])})},e.register=function(r){var u=r.Designer,o=r.Runtime;(!u||!o||!u.__is_control__||!o.__is_control__)&&ee("".concat(r," is can't register as a Control"));var a=this.staticControls.findIndex(function(s){return s.Designer.controlType===u.controlType});return a>-1&&(he("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(a,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();ye.staticControls=Vt,ye.staticRegisteredTypes=new Set(Vt.map(function(e){return e.Designer.controlType})),ye.staticRegisteredConfigs=new Map;function qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Go=function e(t){qt(this,e);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},Ht;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(Ht||(Ht={}));var kt;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(kt||(kt={}));var qe;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(qe||(qe={}));var Ko=function e(t){qt(this,e);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var o;this.heightConfig=(o=t==null?void 0:t.heightConfig)!==null&&o!==void 0?o:"fill"};function Xo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function ve(e,t,n){return Jo()?ve=Reflect.construct:ve=function(u,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(u,s),f=new c;return a&&ie(f,a.prototype),f},ve.apply(null,arguments)}function ue(e){return ue=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ue(e)}function Qo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ie(e,t)}function Zo(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Yo(e,t){return t&&(ea(t)==="object"||typeof t=="function")?t:Xo(e)}function ie(e,t){return ie=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},ie(e,t)}var ea=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function ke(e){var t=typeof Map=="function"?new Map:void 0;return ke=function(r){if(r===null||!Zo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return ve(r,arguments,ue(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),ie(u,r)},ke(e)}function ta(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function na(e){var t=ta();return function(){var r=ue(e),u;if(t){var o=ue(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Yo(this,u)}}var ra=function e(t){He(this,e),this.isHide={type:"boolean"}},ua=function(e){Qo(n,e);var t=na(n);function n(r){return He(this,n),t.call(this)}return n}(ke(Array)),oe=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";He(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new Ko(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};oe.Rules=ra,oe.RuntimeRules=ua;function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function ia(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},We(e)}function ge(e,t){return ge=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},ge(e,t)}function oa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function me(e,t,n){return oa()?me=Reflect.construct:me=function(u,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(u,s),f=new c;return a&&ge(f,a.prototype),f},me.apply(null,arguments)}function aa(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ze(e){var t=typeof Map=="function"?new Map:void 0;return ze=function(r){if(r===null||!aa(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return me(r,arguments,We(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),ge(u,r)},ze(e)}var sa=/%[sdj%]/g,Wt=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Wt=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function Ge(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function M(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],o=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var a=String(u).replace(sa,function(s){if(s==="%%")return"%";if(r>=o)return s;switch(s){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(c){return"[Circular]"}break;default:return s}});return a}return u}function ca(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function w(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||ca(t)&&typeof e=="string"&&!e)}function la(e,t,n){var r=[],u=0,o=e.length;function a(s){r.push.apply(r,s),u++,u===o&&n(r)}e.forEach(function(s){t(s,a)})}function zt(e,t,n){var r=0,u=e.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<u?t(e[s],o):n([])}o([])}function fa(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var Gt=function(e){ia(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(ze(Error));function pa(e,t,n,r){if(t.first){var u=new Promise(function(m,g){var b=function(E){return r(E),E.length?g(new Gt(E,Ge(E))):m()},S=fa(e);zt(S,n,b)});return u.catch(function(m){return m}),u}var o=t.firstFields||[];o===!0&&(o=Object.keys(e));var a=Object.keys(e),s=a.length,c=0,f=[],p=new Promise(function(m,g){var b=function(d){if(f.push.apply(f,d),c++,c===s)return r(f),f.length?g(new Gt(f,Ge(f))):m()};a.length||(r(f),m()),a.forEach(function(S){var d=e[S];o.indexOf(S)!==-1?zt(d,n,b):la(d,n,b)})});return p.catch(function(m){return m}),p}function Kt(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function Xt(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=L(L({},e[n]),r):e[n]=r}}return e}function Jt(e,t,n,r,u,o){e.required&&(!n.hasOwnProperty(e.field)||w(t,o||e.type))&&r.push(M(u.messages.required,e.fullField))}function da(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(M(u.messages.whitespace,e.fullField))}var Ke={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ae={integer:function(t){return ae.number(t)&&parseInt(t,10)===t},float:function(t){return ae.number(t)&&!ae.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ae.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(Ke.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(Ke.url)},hex:function(t){return typeof t=="string"&&!!t.match(Ke.hex)}};function ha(e,t,n,r,u){if(e.required&&t===void 0){Jt(e,t,n,r,u);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;o.indexOf(a)>-1?ae[a](t)||r.push(M(u.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(M(u.messages.types[a],e.fullField,e.type))}function ya(e,t,n,r,u){var o=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=t,p=null,m=typeof t=="number",g=typeof t=="string",b=Array.isArray(t);if(m?p="number":g?p="string":b&&(p="array"),!p)return!1;b&&(f=t.length),g&&(f=t.replace(c,"_").length),o?f!==e.len&&r.push(M(u.messages[p].len,e.fullField,e.len)):a&&!s&&f<e.min?r.push(M(u.messages[p].min,e.fullField,e.min)):s&&!a&&f>e.max?r.push(M(u.messages[p].max,e.fullField,e.max)):a&&s&&(f<e.min||f>e.max)&&r.push(M(u.messages[p].range,e.fullField,e.min,e.max))}var W="enum";function va(e,t,n,r,u){e[W]=Array.isArray(e[W])?e[W]:[],e[W].indexOf(t)===-1&&r.push(M(u.messages[W],e.fullField,e[W].join(", ")))}function ga(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(M(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(t)||r.push(M(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var B={required:Jt,whitespace:da,type:ha,range:ya,enum:va,pattern:ga};function ma(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t,"string")&&!e.required)return n();B.required(e,t,r,o,u,"string"),w(t,"string")||(B.type(e,t,r,o,u),B.range(e,t,r,o,u),B.pattern(e,t,r,o,u),e.whitespace===!0&&B.whitespace(e,t,r,o,u))}n(o)}function Ea(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&B.type(e,t,r,o,u)}n(o)}function ba(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t===""&&(t=void 0),w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&(B.type(e,t,r,o,u),B.range(e,t,r,o,u))}n(o)}function Aa(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&B.type(e,t,r,o,u)}n(o)}function Ba(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),w(t)||B.type(e,t,r,o,u)}n(o)}function Sa(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&(B.type(e,t,r,o,u),B.range(e,t,r,o,u))}n(o)}function Ia(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&(B.type(e,t,r,o,u),B.range(e,t,r,o,u))}n(o)}function _a(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t==null&&!e.required)return n();B.required(e,t,r,o,u,"array"),t!=null&&(B.type(e,t,r,o,u),B.range(e,t,r,o,u))}n(o)}function Ca(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&B.type(e,t,r,o,u)}n(o)}var Fa="enum";function wa(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u),t!==void 0&&B[Fa](e,t,r,o,u)}n(o)}function Da(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t,"string")&&!e.required)return n();B.required(e,t,r,o,u),w(t,"string")||B.pattern(e,t,r,o,u)}n(o)}function Ra(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t,"date")&&!e.required)return n();if(B.required(e,t,r,o,u),!w(t,"date")){var s;t instanceof Date?s=t:s=new Date(t),B.type(e,s,r,o,u),s&&B.range(e,s.getTime(),r,o,u)}}n(o)}function Oa(e,t,n,r,u){var o=[],a=Array.isArray(t)?"array":typeof t;B.required(e,t,r,o,u,a),n(o)}function Xe(e,t,n,r,u){var o=e.type,a=[],s=e.required||!e.required&&r.hasOwnProperty(e.field);if(s){if(w(t,o)&&!e.required)return n();B.required(e,t,r,a,u,o),w(t,o)||B.type(e,t,r,a,u)}n(a)}function $a(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(w(t)&&!e.required)return n();B.required(e,t,r,o,u)}n(o)}var se={string:ma,method:Ea,number:ba,boolean:Aa,regexp:Ba,integer:Sa,float:Ia,array:_a,object:Ca,enum:wa,pattern:Da,date:Ra,url:Xe,hex:Xe,email:Xe,required:Oa,any:$a};function Je(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Qe=Je();function q(e){this.rules=null,this._messages=Qe,this.define(e)}q.prototype={messages:function(t){return t&&(this._messages=Xt(Je(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var o=t,a=n,s=r;if(typeof a=="function"&&(s=a,a={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(),Promise.resolve();function c(d){var E,l=[],y={};function F(v){if(Array.isArray(v)){var C;l=(C=l).concat.apply(C,v)}else l.push(v)}for(E=0;E<d.length;E++)F(d[E]);l.length?y=Ge(l):(l=null,y=null),s(l,y)}if(a.messages){var f=this.messages();f===Qe&&(f=Je()),Xt(f,a.messages),a.messages=f}else a.messages=this.messages();var p,m,g={},b=a.keys||Object.keys(this.rules);b.forEach(function(d){p=u.rules[d],m=o[d],p.forEach(function(E){var l=E;typeof l.transform=="function"&&(o===t&&(o=L({},o)),m=o[d]=l.transform(m)),typeof l=="function"?l={validator:l}:l=L({},l),l.validator=u.getValidationMethod(l),l.field=d,l.fullField=l.fullField||d,l.type=u.getType(l),l.validator&&(g[d]=g[d]||[],g[d].push({rule:l,value:m,source:o,field:d}))})});var S={};return pa(g,a,function(d,E){var l=d.rule,y=(l.type==="object"||l.type==="array")&&(typeof l.fields=="object"||typeof l.defaultField=="object");y=y&&(l.required||!l.required&&d.value),l.field=d.field;function F(x,I){return L(L({},I),{},{fullField:l.fullField+"."+x})}function v(x){x===void 0&&(x=[]);var I=x;if(Array.isArray(I)||(I=[I]),!a.suppressWarning&&I.length&&q.warning("async-validator:",I),I.length&&l.message!==void 0&&(I=[].concat(l.message)),I=I.map(Kt(l)),a.first&&I.length)return S[l.field]=1,E(I);if(!y)E(I);else{if(l.required&&!d.value)return l.message!==void 0?I=[].concat(l.message).map(Kt(l)):a.error&&(I=[a.error(l,M(a.messages.required,l.field))]),E(I);var N={};if(l.defaultField)for(var Dn in d.value)d.value.hasOwnProperty(Dn)&&(N[Dn]=l.defaultField);N=L(L({},N),d.rule.fields);for(var G in N)if(N.hasOwnProperty(G)){var ol=Array.isArray(N[G])?N[G]:[N[G]];N[G]=ol.map(F.bind(null,G))}var Rn=new q(N);Rn.messages(a.messages),d.rule.options&&(d.rule.options.messages=a.messages,d.rule.options.error=a.error),Rn.validate(d.value,d.rule.options||a,function(St){var K=[];I&&I.length&&K.push.apply(K,I),St&&St.length&&K.push.apply(K,St),E(K.length?K:null)})}}var C;l.asyncValidator?C=l.asyncValidator(l,d.value,v,d.source,a):l.validator&&(C=l.validator(l,d.value,v,d.source,a),C===!0?v():C===!1?v(l.message||l.field+" fails"):C instanceof Array?v(C):C instanceof Error&&v(C.message)),C&&C.then&&C.then(function(){return v()},function(x){return v(x)})},function(d){c(d)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!se.hasOwnProperty(t.type))throw new Error(M("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?se.required:se[this.getType(t)]||!1}},q.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");se[t]=n},q.warning=Wt,q.messages=Qe,q.validators=se;var Pa={required:"%s \u5FC5\u586B",maxLength:"%s \u8D85\u51FA\u6700\u5927\u957F\u5EA6\u9650\u5236",minLength:"%s \u5C0F\u4E8E\u6700\u5C0F\u957F\u5EA6\u9650\u5236",string:{range:"%s \u4E0D\u5728\u6307\u5B9A\u957F\u5EA6\u5185"}};function Ma(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new q(e);return n.messages(Object.assign(Pa,t)),n}var Qt=new Ut;function Ze(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ta(e){if(Array.isArray(e))return e}function La(e){if(Array.isArray(e))return Ze(e)}function Zt(e,t,n,r,u,o,a){try{var s=e[o](a),c=s.value}catch(f){n(f);return}s.done?t(c):Promise.resolve(c).then(r,u)}function Yt(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){Zt(o,r,u,a,s,"next",c)}function s(c){Zt(o,r,u,a,s,"throw",c)}a(void 0)})}}function ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xa(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),e}function Na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tn(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function nn(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ua(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Va(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){Na(e,u,n[u])})}return e}function qa(e){return Ta(e)||nn(e)||un(e,i)||Ua()}function Ye(e){return La(e)||nn(e)||un(e)||Va()}function un(e,t){if(!!e){if(typeof e=="string")return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}}var j=function(){function t(r){var u=this;ja(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=an,this.removeSetting=on,this._callControlHooks("preInstance",r);var o=tn(this,t)?this.constructor:void 0,a=o.controlName,s=o.controlIcon,c=o.controlType,f=o.controlFieldType,p=o.controlEventKeys,m=o.controlCustomEvents,g=o.name,b=o.setting;a&&s&&c||Mt("The ".concat(g," controlName,controlIcon,controlType is not define"));var S;this.id=(S=r==null?void 0:r.id)!==null&&S!==void 0?S:$e(10),this.name=a,this.icon=s;var d;this.type=(d=r==null?void 0:r.type)!==null&&d!==void 0?d:c,this.props=new oe(r==null?void 0:r.props,(tn(this,t)?this.constructor:void 0).controlName);var E;this.controlType=(E=r==null?void 0:r.controlType)!==null&&E!==void 0?E:"base",this.setting=te(b);var l;this.fieldType=(l=r==null?void 0:r.fieldType)!==null&&l!==void 0?l:f,this.eventKeys=te(p),this.customEvents=te(m),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=t.prototype;return n._callControlHooks=function(){for(var u=arguments.length,o=new Array(u),a=0;a<u;a++)o[a]=arguments[a];var s,c=qa(o),f=c[0],p=c.slice(1);return(s=Qt).emit.apply(s,[f,this].concat(Ye(p)))},n.preUpdate=function(u,o){this._callControlHooks("preUpdateProps",u,o)},n.postUpdate=function(u,o){this._callControlHooks("postUpdateProps",u,o)},n.updateProps=function(u,o){this.preUpdate(u,o),jt(this.props,u,o),this.postUpdate(u,o)},n.preValidate=function(){var u=this;return Yt(T.default.mark(function o(){var a,s,c;return T.default.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return a=rn({},u.rules),p.next=3,u._callControlHooks("preValidate",a);case 3:return s=p.sent,c=s[s.length-1],p.abrupt("return",c===!1?void 0:c);case 6:case"end":return p.stop()}},o)}))()},n.validate=function(u,o){var a=this;return Yt(T.default.mark(function s(){var c,f,p;return T.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,a.preValidate();case 2:return c=g.sent,f=c!==void 0?c:rn({},a.rules),Array.isArray(o)&&o.forEach(function(b){f.hasOwnProperty(b)&&delete f[b]}),p=Ma(f,u),g.prev=6,g.next=9,p.validate(a.props);case 9:return g.abrupt("return",!0);case 12:throw g.prev=12,g.t0=g.catch(6),g.t0.control||(g.t0.control=a),g.t0;case 16:case"end":return g.stop()}},s,null,[[6,12]])}))()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=this.fieldType,a=this.id,s=this.type,c=this.props,f=c.dataBind,p=c.datasourceBind,m=c.optionConfig,g=c.caption,b=c.required,S=c.maxLength,d=c.options,E=c.encrypted,l=c.encryptedMode;if(!(!o&&!f&&!p)){var y={parentId:u,fieldType:o,controlId:a,caption:g,type:s,props:{}};switch(f&&(y.dataBind=f),m){case"datasource":case void 0:p&&(y.datasourceBind=p);break;case"custom":y.props.options=d;break}return b!==void 0&&(y.required=b),S!==void 0&&(y.maxLength=S),E!==void 0&&(y.encrypted=E),l!==void 0&&(y.encryptedMode=l),y}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:te(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,o){if(u==="setting"){if(o.add){var a;(a=this.setting).push.apply(a,Ye(o.add))}o.remove&&this.removeSettingItem(o.remove),o.update}},xa(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();j.controlName="\u63A7\u4EF6",j.controlIcon="icon",j.controlType="control",j.controlEventKeys=[],j.controlCustomEvents=[],j.setting=[],j.__is_control__=!0,j.removeSettingItem=on,j.updateSettingItem=an;function on(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",o=t.setting.findIndex(function(c){return c.key===(u?r.key:r)});if(o!==-1){var a,s;u?t.setting[o].showItems=(a=t.setting[o].showItems)===null||a===void 0?void 0:a.filter(function(c){return!r.hideItems.includes(c)}):t.setting.splice(o,1),u&&!(!((s=t.setting[o].showItems)===null||s===void 0)&&s.length)&&t.setting.splice(o,1)}})}function an(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var o=n.setting.find(function(f){return f.key===u});if(o){if(typeof t=="boolean")o.visible=t;else if(typeof t=="object"){var a,s=(a=t.type)!==null&&a!==void 0?a:"replace";if(s==="replace")o.showItems=t.showItems;else{var c;(c=o.showItems).push.apply(c,Ye(t.showItems))}}}})}function Ha(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ka(e,t,n){return t&&sn(e.prototype,t),n&&sn(e,n),e}function Wa(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var et=function(){function t(n){Ha(this,t),this.customEvents=[],this.parent=null;var r=Wa(this,t)?this.constructor:void 0,u=r.controlType,o=r.controlFieldType,a=r.name,s=r.controlCustomEvents;u||Mt("The ".concat(a," controlType is not define"));var c;this.id=(c=n==null?void 0:n.id)!==null&&c!==void 0?c:$e(10);var f;this.type=(f=n==null?void 0:n.type)!==null&&f!==void 0?f:u,this.props=new oe(n==null?void 0:n.props),this.customEvents=s;var p;this.controlType=(p=n==null?void 0:n.controlType)!==null&&p!==void 0?p:"base";var m;this.fieldType=(m=n==null?void 0:n.fieldType)!==null&&m!==void 0?m:o;var g;this.pageStatus=(g=n==null?void 0:n.pageStatus)!==null&&g!==void 0?g:qe.UNKNOWN}return ka(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();et.controlType="control",et.__is_control__=!0,et.controlCustomEvents=[];function za(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ee(e)}function Ka(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tt(e,t)}function Xa(e,t){return t&&(Ja(t)==="object"||typeof t=="function")?t:za(e)}function tt(e,t){return tt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},tt(e,t)}var Ja=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Qa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Za(e){var t=Qa();return function(){var r=Ee(e),u;if(t){var o=Ee(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Xa(this,u)}}var Ya=function(e){Ka(n,e);var t=Za(n);function n(r){return Ga(this,n),t.call(this,r)}return n}(oe);function nt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function es(e){if(Array.isArray(e))return nt(e)}function ts(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ns(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cn(e){return es(e)||ts(e)||rs(e)||ns()}function rs(e,t){if(!!e){if(typeof e=="string")return nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nt(e,t)}}function us(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function ln(e,t){e.parent=t,us(e,"parent")}function is(e,t){e.forEach(function(n){ln(n,t)})}var fn=Symbol("targetKey");function pn(e){var t;return(t=e[fn])!==null&&t!==void 0?t:e}function dn(e,t){return is(e,t),new Proxy(e,{get:function(r,u){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];var c;return u===fn?r:(c=Reflect).get.apply(c,[r,u].concat(cn(a)))},set:function(r,u,o){for(var a=arguments.length,s=new Array(a>3?a-3:0),c=3;c<a;c++)s[c-3]=arguments[c];var f;if(ne(e)&&u==="length"&&o===e.length)return!0;var p=(f=Reflect).set.apply(f,[r,u,o].concat(cn(s)));return xe(o)&&ln(o,t),p}})}function os(e,t,n,r){var u=r!=null?r:e,o=dn(pn(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return o},set:function(s){o=dn(pn(s),u)},enumerable:!0})}function rt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function as(e){if(Array.isArray(e))return rt(e)}function hn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yn(e,t,n,r,u,o,a){try{var s=e[o](a),c=s.value}catch(f){n(f);return}s.done?t(c):Promise.resolve(c).then(r,u)}function ss(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){yn(o,r,u,a,s,"next",c)}function s(c){yn(o,r,u,a,s,"throw",c)}a(void 0)})}}function cs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ls(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?z=Reflect.get:z=function(u,o,a){var s=Es(u,o);if(!!s){var c=Object.getOwnPropertyDescriptor(s,o);return c.get?c.get.call(a):c.value}},z(e,t,n||e)}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},H(e)}function fs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ut(e,t)}function ps(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ds(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hs(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){ls(e,u,n[u])})}return e}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function gs(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vs(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ms(e,t){return t&&(bs(t)==="object"||typeof t=="function")?t:hn(e)}function ut(e,t){return ut=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},ut(e,t)}function Es(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=H(e),e!==null););return e}function vn(e){return as(e)||ds(e)||As(e)||hs()}var bs=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function As(e,t){if(!!e){if(typeof e=="string")return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rt(e,t)}}function Bs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ss(e){var t=Bs();return function(){var r=H(e),u;if(t){var o=H(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return ms(this,u)}}var Is=1e4,gn=function(t){fs(r,t);var n=Ss(r);function r(o){cs(this,r);var a;a=n.call(this,o),a.controlType="layout";var s=ps(this,r)?this.constructor:void 0,c=s.excludes,f=s.childrenMaxLength;return a.props=new Ya(o==null?void 0:o.props),os(hn(a),"children",o==null?void 0:o.children),a.excludes=te(c),a.childrenMaxLength=f,a}var u=r.prototype;return u.judgeExcludesChildren=function(a){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(a)},u.judgeJoinChildren=function(a){var s=this.judgeExcludesChildren(a);return s&&this.childrenMaxLength>this.children.length},u.validate=function(a,s){var c=this,f=this,p=function(){return z(H(r.prototype),"validate",c)};return ss(T.default.mark(function m(){return T.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,p().call(f,a,s);case 2:return b.next=4,Promise.all(f.children.map(function(S){return S.validate(a,s)}));case 4:return b.abrupt("return",!0);case 5:case"end":return b.stop()}},m)}))()},u.toDataBindModel=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=z(H(r.prototype),"toDataBindModel",this).call(this),c=s?[s]:[];return this.children.reduce(function(f,p){var m=p.toDataBindModel(a);if(Array.isArray(m)){var g=m.filter(function(b){return!!b});return vn(f).concat(vn(g))}return m&&f.push(m),f},c)},u.toSchema=function(){var a=z(H(r.prototype),"toSchema",this).call(this),s=this.children.map(function(c){var f=c.toSchema();return f});return gs(ys({},a),{children:s})},r}(j);gn.excludes=!1,gn.childrenMaxLength=Is,_.LIST,console.log("sourcemap 4");function it(e){return"children"in e&&ne(e.children)}function mn(e){return"headers"in e.props&&ne(e.props.headers)}function be(e,t){Array.isArray(e)&&e.map(n=>{n.type===h.SUBTABLE?be(n.props.headers,t):it(n)?be(n==null?void 0:n.children,t):n.controlType===O.FORM&&t(n)})}const En=[h.AMOUNT,h.CALC,h.DATE_RANGE],bn={amount:{caption:"\u91D1\u989D",fieldType:_.DECIMAL},currency:{caption:"\u5E01\u79CD",fieldType:_.VARCHAR},result:{caption:"\u7ED3\u679C",fieldType:_.DECIMAL},unit:{caption:"\u5355\u4F4D",fieldType:_.VARCHAR},min:{caption:"\u5F00\u59CB\u65F6\u95F4",fieldType:_.TIMESTAMP},max:{caption:"\u7ED3\u675F\u65F6\u95F4",fieldType:_.TIMESTAMP}};function _s(e){let t=[];return be(e,n=>{n.controlType===O.FORM?t.push(n):(n.type,h.SUBTABLE)}),t}function Cs(e,t=""){return!e||!Array.isArray(e)?[]:e.map(n=>{if(!n.dataBind||n.type===h.TITLE)return n;if(En.includes(n.type)){const r=n.dataBind;Object.keys(r).forEach(u=>{const o=r[u],a=n.controlId+"_"+u;o.fieldCode=An(a),o.dataCode=t})}else n.dataBind.fieldCode=An(n.controlId),n.dataBind.dataCode=t;return n})}function An(e){const t="field_";return e.startsWith(t)?e:t+e}function Ae(e){return po[e]}function Fs(e){const t=new k,n=[];return e.forEach(r=>{if(!(r.parentId||!r.dataBind))if(En.includes(r.type)){const u=r.dataBind,o=r.datasourceBind;Object.keys(u).forEach(a=>{const s=u[a],c=bn[a].fieldType,f=r.caption+"_"+bn[a].caption,p=Ae(c);if(!p)return;const m={caption:f,dataBind:s};a==="currency"&&(m.optionConfig="datasource",m.datasourceBind=o);const g=t.createControlInstance(p,{props:m});g&&n.push(g)})}else{const u=Ae(r.fieldType);if(!u)return;const o=t.createControlInstance(u,{props:{caption:r.caption,dataBind:r.dataBind,datasourceBind:r.datasourceBind}});o&&n.push(o)}}),n}function ws(e){const t=new k,r=(Array.isArray(e)?e:[e]).map(u=>{const o=Ae(u);return t.createControlInstance(o)});return Array.isArray(e)?r:r[0]}function ot(e){return Array.isArray(e)?e.map(t=>t.toSchema()):e.toSchema()}function at(e){return Array.isArray(e)?e.map(t=>t.toDataBindModel()).filter(t=>!!t).flat():e.toDataBindModel()}function st(e,t,n){return It(this,null,function*(){return Array.isArray(e)?(yield Promise.all(e.map(u=>u.validate(t,n)))).every(u=>u):yield e.validate(t,n)})}const Ds=[h.TITLE,h.GRID_TABLE_COLUMN,h.SUBTABLE_COLUMN,h.OPERATION_COLUMN,h.DATA_VIEW,h.LIST_VIEW,h.HEADER,h.FOOTER,h.SIMPLE_SEARCH,h.ROW,h.GRID_ROW,h.COL,h.GRID,h.DIVIDER,h.TAB_PANE,h.TAB,h.CARD_GROUP],Rs=[h.CALC],Os={check:{id:"listPageCheckBtnId",caption:"\u67E5\u770B"},edit:{id:"listPageEditBtnId",caption:"\u7F16\u8F91"},delete:{id:"listPageDeleteBtnId",caption:"\u5220\u9664"}};function ce(e,t){var r,u,o,a,s,c,f,p,m;const n=[];if(ne(e))n.push(...e.map(g=>ce(g,t)).flat());else{const g=e.type,{caption:b,content:S}=e.props;let d;if(Ds.includes(g))g===h.OPERATION_COLUMN&&Object.entries(Os).reduce((E,[l,{caption:y,id:F}])=>{var C;const v=e.props[l];return v&&v.isShow&&E.push({controlId:F,caption:y,type:e.type,controlType:e.controlType,parentId:(C=t==null?void 0:t.controlId)!=null?C:null,canEdit:!1,canRead:!1,canHide:!0,group:"element"}),E},n);else if(d={controlId:e.id,caption:b||S||e.name,type:e.type,controlType:e.controlType,parentId:(r=t==null?void 0:t.controlId)!=null?r:null,canEdit:!Rs.includes(g),canRead:!0,canHide:!0,group:"element"},t&&t.type===h.SUBTABLE&&(d.caption=t.caption+"_"+d.caption),g===h.VUE_FORM_ITEM&&(d.caption=e.props.controlExportName||e.name),(e.controlType===O.FORM||e.controlType===O.COLUMN)&&((o=(u=e.props)==null?void 0:u.dataBind)==null?void 0:o.fieldCode)!==void 0&&((s=(a=e.props)==null?void 0:a.dataBind)==null?void 0:s.fieldCode)!==""&&(d.group="field"),n.push(d),g===h.VUE_FORM_ITEM){let E="element";((f=(c=e.props)==null?void 0:c.dataBind)==null?void 0:f.fieldCode)!==void 0&&((m=(p=e.props)==null?void 0:p.dataBind)==null?void 0:m.fieldCode)!==""&&(E="field");const l=e.props.permissions;l==null||l.map(y=>{var F;d={controlId:y.key,caption:y.caption,type:e.type,controlType:e.controlType,parentId:(F=e.id)!=null?F:null,canEdit:!0,canRead:!0,canHide:!0,group:E},n.push(d)})}e.children&&n.push(...e.children.map(E=>ce(E,t)).flat()),e.controlType===O.LIST&&n.push(...e.props.headers.map(E=>ce(E,d)).flat())}return n}class k extends ye{constructor(){super("Designer"),this.toolbox=[],this.services={},this.eventLogic=new re,this.fieldTypes=_,this.controlSettingMap=new Map,new.target.staticControls.forEach(t=>{const{Designer:n,Setting:r}=t;this.controlSettingMap.set(n.controlType,r)})}registerControl(t){this.constructor.register(t);const{Designer:n,Setting:r}=t;this.register(n),this.registeredControlTypes.add(n.controlType),this.controlSettingMap.set(n.controlType,r)}getControlSetting(t){const n=this.controlSettingMap.get(t);return n||null}setInstance(t,n,r){try{if(!t)return;t.updateProps(n,r)}catch(u){throw u}}eachControls(t){this.getControls().forEach(t)}getInitControl(){return[this.createControlInstance("grid")]}checkSchema(...t){return It(this,null,function*(){return st(...t)})}getModelBindInfoList(...t){return at(...t)}getSchema(...t){return ot(...t)}listenControlHook(...t){return Qt.on(...t)}}k.EventLogic=re;class $s{constructor(){this.designer=new k}ListPageBuilder(){const t=this.designer.createControlInstance(h.LIST_VIEW),n=this.designer.createControlInstance(h.SIMPLE_SEARCH),r=this.designer.createControlInstance(h.GRID_TABLE),u=this.designer.createControlInstance(h.CREATE_FORM_LIST_BUTTON),o=this.designer.createControlInstance(h.IMPORT_RECORD_LIST_BUTTON),a=this.designer.createControlInstance(h.EXPORT_LIST_BUTTON),s=this.designer.createControlInstance(h.EXPORT_RECORD_LIST_BUTTON);return r.children.push(u),r.children.push(o),r.children.push(a),r.children.push(s),t.children.push(n),t.children.push(r),t}ProListPageBuilder(){const t=this.designer.createControlInstance(h.LIST_VIEW);t.props.countType="async";const n=this.designer.createControlInstance(h.SIMPLE_SEARCH),r=this.designer.createControlInstance(h.GRID_TABLE),u=this.designer.createControlInstance(h.EXPORT_LIST_BUTTON),o=this.designer.createControlInstance(h.EXPORT_RECORD_LIST_BUTTON);return r.children.push(u),r.children.push(o),t.children.push(n),t.children.push(r),t}FormPageBuilder(){const t=this.designer.createControlInstance(h.DATA_VIEW),n=this.designer.createControlInstance(h.TITLE),r=this.designer.createControlInstance(h.GRID);return t.children.push(n),t.children.push(r),t}VuePageBuilder(){const t=this.designer.createControlInstance(h.GRID),n=this.designer.createControlInstance(h.VUE_FORM_ITEM);return n.props.isHideCaption=!0,n.props.controlExportName="VuePage",t.children.push(n),t}}function Ps(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ms(e,t,n){return t&&Bn(e.prototype,t),n&&Bn(e,n),e}var V=function(){function e(t){Ps(this,e);var n;this.visible=(n=t==null?void 0:t.visible)!==null&&n!==void 0?n:!0;var r;this.expression=(r=t==null?void 0:t.expression)!==null&&r!==void 0?r:!1}return Ms(e,[{key:"isAtomicComponent",get:function(){return!0}}]),e}();function Ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ls=function(){function e(n){Ts(this,e),this.type=n.type,this.label=n.label,this.key=n.key,this.component=n.component;var r;this.effect=(r=n.effect)!==null&&r!==void 0?r:{};var u;this.scopeEffect=(u=n.scopeEffect)!==null&&u!==void 0?u:fo,this.defaultValue=n.defaultValue,this.validator=n.validator;var o;this.props=(o=n.props)!==null&&o!==void 0?o:new V,this.effectKeys=Object.keys(this.effect)}var t=e.prototype;return t.filterEffects=function(r){var u=this;return r===""?Object.values(this.effect):this.effectKeys.filter(function(o){var a=new RegExp("^".concat(o,"(\\.\\w+)*$"));return a.test(r)}).map(function(o){return u.effect[o]})},t.callEffectFn=function(r,u){try{var o=r.apply(null,u);xe(o)&&Object.assign(this.props,o)}catch(a){ee(`effect error
2
- `.concat(a))}},t.callEffect=function(r){for(var u=arguments.length,o=new Array(u>1?u-1:0),a=1;a<u;a++)o[a-1]=arguments[a];var s=this;this.filterEffects(r).forEach(function(c){return s.callEffectFn(c,o)})},t.callScopeEffect=function(){for(var r=arguments.length,u=new Array(r),o=0;o<r;o++)u[o]=arguments[o];this.callEffectFn(this.scopeEffect,u)},e}();function js(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ct=function e(t){js(this,e),this.type="group";var n;this.title=(n=t.title)!==null&&n!==void 0?n:"";var r;this.required=(r=t.required)!==null&&r!==void 0?r:!1,this.items=t.items,this.tips=t.tips};function xs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ns(e){return"type"in e&&e.type==="tab"}var lt=function e(t){xs(this,e),this.type="tab",this.title=t.title,this.items=t.items};function Sn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Us(e){if(Array.isArray(e))return e}function Vs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(e)}function Hs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ft(e,t)}function ks(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],u=!0,o=!1,a,s;try{for(n=n.call(e);!(u=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));u=!0);}catch(c){o=!0,s=c}finally{try{!u&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function Ws(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function zs(e,t){return t&&(Ks(t)==="object"||typeof t=="function")?t:Vs(e)}function ft(e,t){return ft=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},ft(e,t)}function Gs(e,t){return Us(e)||ks(e,t)||Xs(e,t)||Ws()}var Ks=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Xs(e,t){if(!!e){if(typeof e=="string")return Sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sn(e,t)}}function Js(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Qs(e){var t=Js();return function(){var r=Be(e),u;if(t){var o=Be(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return zs(this,u)}}var Zs=function(e){Hs(n,e);var t=Qs(n);function n(r){qs(this,n);var u;return u=t.call(this,r),xe(r)&&Object.entries(r).forEach(function(o){var a=Gs(o,2),s=a[0],c=a[1];u[s]=c}),u}return n}(V);function Ys(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(e)}function tc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pt(e,t)}function nc(e,t){return t&&(rc(t)==="object"||typeof t=="function")?t:Ys(e)}function pt(e,t){return pt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},pt(e,t)}var rc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function uc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function ic(e){var t=uc();return function(){var r=Se(e),u;if(t){var o=Se(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return nc(this,u)}}var oc=function(e){tc(n,e);var t=ic(n);function n(r){ec(this,n);var u;u=t.call(this,r);var o;u.maxLength=(o=r==null?void 0:r.maxLength)!==null&&o!==void 0?o:"";var a;u.minLength=(a=r==null?void 0:r.minLength)!==null&&a!==void 0?a:"";var s;u.placeholder=(s=r==null?void 0:r.placeholder)!==null&&s!==void 0?s:"";var c;return u.i18n=(c=r==null?void 0:r.i18n)!==null&&c!==void 0?c:!1,u}return n}(V);function ac(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ie(e)}function cc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dt(e,t)}function lc(e,t){return t&&(fc(t)==="object"||typeof t=="function")?t:ac(e)}function dt(e,t){return dt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},dt(e,t)}var fc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function pc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function dc(e){var t=pc();return function(){var r=Ie(e),u;if(t){var o=Ie(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return lc(this,u)}}var hc=function(e){cc(n,e);var t=dc(n);function n(r){sc(this,n);var u;u=t.call(this,r);var o;u.max=(o=r==null?void 0:r.max)!==null&&o!==void 0?o:"";var a;u.min=(a=r==null?void 0:r.min)!==null&&a!==void 0?a:"";var s;return u.placeholder=(s=r==null?void 0:r.placeholder)!==null&&s!==void 0?s:"",u}return n}(V);function yc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_e(e)}function gc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ht(e,t)}function mc(e,t){return t&&(Ec(t)==="object"||typeof t=="function")?t:yc(e)}function ht(e,t){return ht=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},ht(e,t)}var Ec=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function bc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ac(e){var t=bc();return function(){var r=_e(e),u;if(t){var o=_e(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return mc(this,u)}}var Bc=function(e){gc(n,e);var t=Ac(n);function n(r){vc(this,n);var u;u=t.call(this,r);var o;u.showType=(o=r==null?void 0:r.showType)!==null&&o!==void 0?o:"switch";var a;u.tips=(a=r==null?void 0:r.tips)!==null&&a!==void 0?a:"";var s;return u.disabled=(s=r==null?void 0:r.disabled)!==null&&s!==void 0?s:!1,u}return n}(V);function Sc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ic(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ce(e)}function _c(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yt(e,t)}function Cc(e,t){return t&&(Fc(t)==="object"||typeof t=="function")?t:Sc(e)}function yt(e,t){return yt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},yt(e,t)}var Fc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function wc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Dc(e){var t=wc();return function(){var r=Ce(e),u;if(t){var o=Ce(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Cc(this,u)}}var Rc=function(e){_c(n,e);var t=Dc(n);function n(r){Ic(this,n);var u;u=t.call(this,r);var o;return u.options=(o=r==null?void 0:r.options)!==null&&o!==void 0?o:[],u}return n}(V);function Oc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fe(e)}function Pc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vt(e,t)}function Mc(e,t){return t&&(Tc(t)==="object"||typeof t=="function")?t:Oc(e)}function vt(e,t){return vt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},vt(e,t)}var Tc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Lc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function jc(e){var t=Lc();return function(){var r=Fe(e),u;if(t){var o=Fe(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Mc(this,u)}}var xc=function(e){Pc(n,e);var t=jc(n);function n(r){$c(this,n);var u;u=t.call(this,r);var o;u.placeholder=(o=r==null?void 0:r.placeholder)!==null&&o!==void 0?o:"";var a;return u.options=(a=r==null?void 0:r.options)!==null&&a!==void 0?a:[],u}return n}(V);function Nc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},we(e)}function Vc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}function qc(e,t){return t&&(Hc(t)==="object"||typeof t=="function")?t:Nc(e)}function gt(e,t){return gt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},gt(e,t)}var Hc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function kc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Wc(e){var t=kc();return function(){var r=we(e),u;if(t){var o=we(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return qc(this,u)}}var zc=function(e){Vc(n,e);var t=Wc(n);function n(r){Uc(this,n);var u;u=t.call(this,r);var o;u.options=(o=r==null?void 0:r.options)!==null&&o!==void 0?o:[];var a;return u.showType=(a=r==null?void 0:r.showType)!==null&&a!==void 0?a:"outline",u}return n}(V);function Gc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},De(e)}function Xc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}function Jc(e,t){return t&&(Qc(t)==="object"||typeof t=="function")?t:Gc(e)}function mt(e,t){return mt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},mt(e,t)}var Qc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Zc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Yc(e){var t=Zc();return function(){var r=De(e),u;if(t){var o=De(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Jc(this,u)}}var el=function(e){Xc(n,e);var t=Yc(n);function n(r){Kc(this,n);var u;u=t.call(this,r);var o;u.maxLength=(o=r==null?void 0:r.maxLength)!==null&&o!==void 0?o:"";var a;u.minLength=(a=r==null?void 0:r.minLength)!==null&&a!==void 0?a:"";var s;u.placeholder=(s=r==null?void 0:r.placeholder)!==null&&s!==void 0?s:"";var c;u.maxRows=(c=r==null?void 0:r.maxRows)!==null&&c!==void 0?c:"";var f;u.minRows=(f=r==null?void 0:r.minRows)!==null&&f!==void 0?f:"";var p;return u.i18n=(p=r==null?void 0:r.i18n)!==null&&p!==void 0?p:!1,u}return n}(V);function tl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){tl(e,u,n[u])})}return e}function nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function bt(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function rl(e,t){switch(e){case"input":return new oc(t);case"textarea":return new el(t);case"input-number":return new hc(t);case"switch":return new Bc(t);case"radio":return new zc(t);case"checkbox":return new Rc(t);case"select":return new xc(t);default:return new Zs(t)}}function ul(e){return function(t){var n=e.get(t);if(!!n)return new Ls(bt(Et({},n),{props:rl(n.component,"props"in n?n.props:void 0)}))}}function il(e){var t=function(o){return new ct(bt(Et({},o),{items:o.items.map(ul(r)).filter(Boolean)}))},n=function(o){return o.map(t)},r=e.fields.reduce(function(u,o){return u.set(o.key,o),u},new Map);return e.groups.map(function(u){return Ns(u)?new lt(bt(Et({},u),{items:n(u.items)})):t(u)})}class In{constructor(t){var n;this.selected=null,this.selectedInstanceDataScopeParent=null,this.selectedDataScopeFlatInstances=[],this.selectedInstanceSetting=[],this.selectedInstanceSettingItems=[],this.selectedFieldItem=null,this.external={},this.movingInstance=null,this.movingInstanceOldParent=null,this.movingInstanceOldDataScopeParent=null,this.getParentBeforeInstanceMove=(n=t.getParentBeforeInstanceMove)!=null?n:r=>r.parent,this.instance=t.instance,this.getFlatInstances()}get selectedRules(){return this.selected?this.selected.rules:null}get selectedAntdRules(){const t=this.selectedRules;return t||null}setInstances(t){this.instance=t,this.getFlatInstances()}setSelectInstance(t){this.selected=t,this.selectedInstanceDataScopeParent=t?fe(t):null,this.selectedDataScopeFlatInstances=this.selectedInstanceDataScopeParent?Fn(this.selectedInstanceDataScopeParent):[]}setSelectInstanceSettings(t){this.selectedInstanceSetting=t,this.selectedInstanceSettingItems=[],this.selectedInstanceSetting.forEach(n=>{this.selectedInstanceSettingItems.push(...this.getSettingItems(n))})}getSettingItems(t){return t instanceof ct?t.items:t.items.reduce((n,r)=>(n.push(...r.items),n),[])}setSelectedFieldItem(t){this.selectedFieldItem=t}setMovingInstance(t){this.movingInstance=t,this.movingInstanceOldParent=t?this.getParentBeforeInstanceMove(t):null,this.movingInstanceOldDataScopeParent=fe(t)}updateDataFieldCodeMap(t){const n=fe(t);if(!n)return;const r=this.dataFieldCodeMap.get(n.props.datasourceBind.dataCode);if(!!r){for(const[u,o]of r.entries())if(o.id===t.id){r.delete(u);break}Cn(t,this.dataFieldCodeMap)}}getFlatInstances(){const t=[],n=new Map,r=new Map;le(this.instance,u=>{t.push(u),n.set(u.id,u),Cn(u,r)}),this.flatInstances=t,this.instanceIdMap=n,this.dataFieldCodeMap=r}}function _n(e,t,n){const{dataCode:r,fieldCode:u}=t;r&&u&&(e.has(r)||e.set(r,new Map),e.get(r).set(u,n))}function Cn(e,t){if(e.controlType===O.FORM){const n=e.props.dataBind;n instanceof Go?_n(t,n,e):Object.values(n).forEach(r=>{_n(t,r,e)})}}function le(e,t){(Array.isArray(e)?e:[e]).forEach(r=>{t(r),it(r)&&le(r.children,t),mn(r)&&le(r.props.headers,t)})}function At(e){return[h.SUBTABLE,h.DATA_VIEW,h.LIST_VIEW].includes(e.type)}function fe(e){let t=e?e.parent:null;if(!t)return null;for(;t&&!At(t);)t=t.parent;return t}function Fn(e){const t=[e];return le(e,n=>{n!==e&&t.includes(n.parent)&&!At(n)&&t.push(n)}),t}let Bt="";class wn extends Ut{constructor(t){super(),this.isMounted=!1,this.id=$e(8),this.__pluginsApplied=!1,this.getSchema=ot,this.getModelBindInfoList=at,this.generatePermissions=ce,this.$options=Object.freeze(t);const{autoMount:n=!1,Designer:r=k,schema:u,mode:o="form",store:a={}}=this.$options;this.eventLogic=new re,this.designer=new r,this.store=new In(X({instance:this.designer.createControl(Array.isArray(u)?u:[u])},a)),this.mode=o,n&&this.mount()}mount(){const{plugins:t=[]}=this.$options;this.__plugins=t,this.applyPlugins(),this.isMounted=!0}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Bt=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this),Bt=""}catch(r){ee(`${Bt||t.constructor.name} Plugin apply Error
3
- ${r}`)}}),this.__pluginsApplied=!0)}emit(t,...n){return super.emit(t,n)}on(t,n){return super.on(t,n)}setInstances(t,n){this.store.setInstances(this.designer.createControl(Array.isArray(t)?t:[t],n))}beforeSelectInstance(){this.store.setSelectInstance(null),this.setSelectedFieldItem(null),this.store.setSelectInstanceSettings([])}afterSelectInstance(){const t=this.store.selected;!t||(this.setSelectedInstanceSetting(),this.emit("select",{instance:t}))}setSelectedInstanceSetting(){var u,o;const t=this.store.selected;if(!t)return;let n=this.getControlSetting(t.type);if(((u=t.parent)==null?void 0:u.controlType)===O.WRAP){const a=this.getControlSetting((o=t.parent)==null?void 0:o.type);n=this.concatSetting(n,a,t.parent.id)}this.store.setSelectInstanceSettings(n),this.callSelectedEffect("");const r={from:null,current:this.store.selectedInstanceDataScopeParent,oldParent:null,newParent:t.parent};this.callSelectedScopeEffect(r)}concatSetting(t,n,r){var o,a,s,c;let u=t;if(((o=t[0])==null?void 0:o.type)==="tab"&&((a=n[0])==null?void 0:a.type)==="tab"){const f=t,p=n.slice(0);u=f.map((m,g)=>{const b=new lt(m),S=p.findIndex(E=>E.title===m.title);if(S===-1)return b;const d=p.splice(S,1)[0];return d&&(b.items=[...this.formatGroupSetting(d.items,r),...b.items]),b}),p.length&&(u=[...u,...p.map(m=>this.formatGroupSetting(m,r))])}else if(((s=t[0])==null?void 0:s.type)==="group"&&((c=n[0])==null?void 0:c.type)==="group"){const f=t,p=n;u=[...this.formatGroupSetting(p,r),...f]}return u}formatGroupSetting(t,n){if(ne(t))return t.map(r=>{const u=new ct(r);return u.fromId=n,u});{const r=new lt(t);return r.items=this.formatGroupSetting(r.items,n),r}}setControlConfig(...t){return this.designer.registerControlConfig(...t)}getControlConfig(t){return this.designer.getControlConfig(t)}getControlSetting(t){const n=this.designer.getControlSetting(t);return n?il(n):[]}selectInstance(t){this.beforeSelectInstance(),this.store.setSelectInstance(t),this.afterSelectInstance()}setSelectedFieldItem(t){this.store.setSelectedFieldItem(t),this.callSelectedEffect("dataBind",{fieldItem:t})}moveStart(t){const n=this.getInstance(t);n&&this.store.setMovingInstance(n)}moveEnd(t=this.store.movingInstance){var c;if(t===null)return;const n=this.getInstance(t);if(!n)return;const r=this.store.movingInstanceOldDataScopeParent,u=fe(n),o=this.store.movingInstanceOldParent,a=n.parent;this.store.setMovingInstance(null),n.id!==((c=this.store.selected)==null?void 0:c.id)?this.selectInstance(n):this.store.setSelectInstance(n),this.store.getFlatInstances();const s={from:r,current:u,oldParent:o,newParent:a};this.callSelectedScopeEffect(s),o?this.emit("moved",X({},s)):this.emit("joined",X({},s))}createInstance(t,n){return this.designer.createControlInstance(t,n)}getInstance(t){return typeof t=="string"?this.store.instanceIdMap.get(t):t}getInstances(){return this.store.flatInstances}getInstancesFromType(t){return this.getInstances().filter(n=>n.type===t)}getDataScopeInstances(){return this.store.selectedDataScopeFlatInstances}getDataScopeInstancesFromType(t){return this.getDataScopeInstances().filter(n=>n.type===t)}updateInstancePropValue(t,n,r,u){var a;!jt(t.props,n,r)||(n.startsWith("dataBind")&&this.store.updateDataFieldCodeMap(t),t.id===((a=this.store.selected)==null?void 0:a.id)&&this.callSelectedEffect(n,u),this.emit("updated",{instance:t,propName:n,value:r}))}updateInstanceProps(t,n,r,u=""){Object.entries(n).forEach(([o,a])=>{const s=`${u?u+".":""}${o}`;Lo(a)?this.updateInstanceProps(t,a,r,s):this.updateInstancePropValue(t,s,a,r)})}setInstance(t,n,r,u){Ne(n)?this.updateInstancePropValue(t,String(n),r,u):this.updateInstanceProps(t,n,r)}removeInstance(t){const n=t.parent;if(!n)return;const r=n.controlType===O.LIST&&n.props.headers.includes(t)?n.props.headers:n.children,u=r.findIndex(o=>o===t);u>-1&&r.splice(u,1),this.store.getFlatInstances(),this.emit("removed",{instance:t,index:u,parent:n})}replaceInstance(t,n){const r=t.parent;if(!r)return;const u=r.controlType===O.LIST&&r.props.headers.includes(t)?r.props.headers:r.children,o=u.findIndex(a=>a===t);o>-1&&u.splice(o,1,n),this.store.getFlatInstances()}updateInstanceType(t,n){const r=t.toSchema(),u=this.createInstance(n,{id:r.id,props:r.props});if(!u){he(`can\u2018t update instance type to ${n}`);return}return u}validate(t,n){return st(this.store.instance,t,n)}getCustomControlsInUse(){return this.getInstances().filter(this.assertInstanceIsCustomControl).reduce((t,n)=>(t.includes(n.type)||t.push(n.type),t),[])}assertInstanceIsCustomControl(t){return!jo(Ne(t)?t:t.type)}static register(...t){return k.register(...t),this}static judgeControlIsRegistered(t){return k.staticRegisteredTypes.has(t.Designer.controlType)}judgeControlIsRegistered(t){return this.designer.registeredControlTypes.has(t.Designer.controlType)}register(...t){return this.designer.registerControl(...t),this}assertInstance(t,n){return Ne(n)?t.type===n:n.includes(t.type)}getInstanceInListControl(t){let n=t;for(;n;){if(n.controlType===O.LIST)return!0;n=n.parent}return!1}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}callSelectedEffect(t,n={}){this.store.selectedInstanceSettingItems.forEach(r=>{r.callEffect(t,this,X({control:this.store.selected},n))})}callSelectedScopeEffect(t={}){this.store.selectedInstanceSettingItems.forEach(n=>{n.callScopeEffect(this,X({control:this.store.selected},t))})}}wn.EventLogic=re,A.Builder=$s,A.Designer=k,A.Driven=wn,A.Store=In,A.checkSchema=st,A.fillModelBindInfoListFieldCode=Cs,A.findInstanceDataScopeParent=fe,A.generatePermissions=ce,A.getColumnTypeFromFiledType=Ae,A.getColumnsFromFiledType=ws,A.getColumnsFromModelBindInfoList=Fs,A.getDataScopeFlatInstances=Fn,A.getMasterFormControls=_s,A.getModelBindInfoList=at,A.hasChildrenControl=it,A.hasHeaderControl=mn,A.isDataScopeInstance=At,A.loop=le,A.loopFormControl=be,A.toSchema=ot,Object.defineProperty(A,"__esModule",{value:!0})});
1
+ var ol=Object.defineProperty;var On=Object.getOwnPropertySymbols;var al=Object.prototype.hasOwnProperty,sl=Object.prototype.propertyIsEnumerable;var $n=(E,F,D)=>F in E?ol(E,F,{enumerable:!0,configurable:!0,writable:!0,value:D}):E[F]=D,z=(E,F)=>{for(var D in F||(F={}))al.call(F,D)&&$n(E,D,F[D]);if(On)for(var D of On(F))sl.call(F,D)&&$n(E,D,F[D]);return E};var Bt=(E,F,D)=>new Promise((Fe,le)=>{var De=j=>{try{K(D.next(j))}catch(X){le(X)}},Re=j=>{try{K(D.throw(j))}catch(X){le(X)}},K=j=>j.done?Fe(j.value):Promise.resolve(j.value).then(De,Re);K((D=D.apply(E,F)).next())});(function(E,F){typeof exports=="object"&&typeof module!="undefined"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(E=typeof globalThis!="undefined"?globalThis:E||self,F(E.modelDrivenDriven={}))})(this,function(E){"use strict";var F="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",D="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Fe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",le="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",De="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Re="{caption}\u5FC5\u586B",K="\u8BF7\u8F93\u5165\u6807\u9898",j="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",X="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Pn="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",Tn="\u8BF7\u7ED1\u5B9A\u8868\u5355",Mn="\u8BF7\u7ED1\u5B9A\u5217\u8868",Ln="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",xn="\u8BF7\u8F93\u5165\u663E\u793A\u503C",jn="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Nn="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Un="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",Vn="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",qn="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Hn="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",kn="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Wn="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",Gn="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",zn="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Kn="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Xn="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Jn="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Qn="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Zn="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Yn="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",er="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",tr="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",nr="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",rr="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ur="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",ir="\u8BF7\u7ED1\u5B9A\u670D\u52A1",or="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",ar="\u8BF7\u9009\u62E9\u7701",sr="\u8BF7\u9009\u62E9\u5E02",cr="\u8BF7\u9009\u62E9\u533A",lr="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",fr="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",pr="\u8BF7\u8F93\u5165\u5217\u5BBD",dr="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",hr="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",yr="\u8BF7\u9009\u62E9\u63A7\u4EF6",vr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",gr="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",mr="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Er="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",br="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",_r="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Ar="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Br="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Sr="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Cr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Ir="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",wr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Fr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Dr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Rr="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Or="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",$r="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Pr="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Tr="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Mr="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Lr="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",xr={isNotNumber:F,isNotString:D,isNotObject:Fe,isNotArray:le,isNotBoolean:De,runtimeRequired:Re,pleaseEnterCaption:K,pleaseEnterCaptionTip:j,pleaseEnterPlaceholder:X,pleaseEnterFieldCode:Pn,pleaseEnterForm:Tn,pleaseEnterList:Mn,pleaseEnterProcess:Ln,pleaseEnterLabel:xn,pleaseEnterValue:jn,bizKeyNotBindFiled:Nn,pleaseSelectOneField:Un,pleaseEnterNumberRange:Vn,pleaseEnterAValueGreaterThanMin:qn,pleaseEnterAValueLessThanMax:Hn,numberRangeSetError:kn,stringRangeError:Wn,attachmentMaxSize:Gn,pleaseEnterTotalScoreSetting:zn,theTotalScoreMustNotBeLessThan1:Kn,scoreDefaultValueRange:Xn,attachmentLimitError:Jn,PleaseReselectTheOptionalQuantity:Qn,TheMaximumLengthIsGreaterThanTheMinimumLength:Zn,TheMinimumLengthIsGreaterThanTheMaximumLength:Yn,PleaseSelectTheCorrectOptionSettings:er,optionIdIsRepeat:tr,optionIsRequired:nr,pleaseEnterDataCode:rr,pleaseEnterValueFieldCode:ur,pleaseEnterSvcCode:ir,pleaseBindAtLeastOneDisplayValue:or,pleaseSelectProvince:ar,pleaseSelectCity:sr,pleaseSelectDistrict:cr,limitRowsCannotBeLessThan0:lr,TheNumberOfRowsCannotBeLessThanMinRows:fr,pleaseEnterColumnWidth:pr,pleaseSetTheLogicalRelationshipOfAllRuleConditions:dr,pleaseCompleteAllRulesAndConditions:hr,pleaseSelectControl:yr,pleaseSelectAtLeastOneColumn:vr,pleaseSelectFillBackMode:gr,pleaseSelectDashboard:mr,rootNodeIsRequired:Er,theViewNameCannotBeEmpty:br,pleaseSelectOcrType:_r,pleaseSelectAtLeastOneFieldToFillIn:Ar,pleaseChooseAtLeastOne:Br,pleaseEnterButtonContent:Sr,pleaseEnterDataCodeInDataSetting:Cr,pleaseEnterValueFieldCodeInDataSetting:Ir,pleaseEnterSvcCodeInDataSetting:wr,pleaseBindAtLeastOneDisplayValueInDataSetting:Fr,rootNodeIsRequiredInDataSetting:Dr,pleaseEnterMaxHeight:Rr,pleaseEnter:Or,pleaseEnterWatermark:$r,pleaseEnterFileName:Pr,pleaseUploadAtLeastOnePrintTemplate:Tr,pleaseAssignBusiness:Mr,pleaseAssignExternal:Lr},jr="Please enter a number",Nr="Please enter a string",Ur="Please enter an object",Vr="Please enter an array",qr="Please enter a boolean",Hr="{caption} Required",kr="Please enter the title",Wr="Please enter the bubble prompt",Gr="Please enter the prompt text",zr="Please bind data items",Kr="Please bind the form",Xr="Please bind the list",Jr="Please bind the process",Qr="Please enter the displayed value",Zr="Please enter the stored value",Yr="The document number is not bound to the data item",eu="Please select at least one display field",tu="Please enter a value greater than or equal to {min} and less than or equal to {max}",nu="Please enter a value greater than or equal to {min}",ru="Please enter a value less than or equal to {max}",uu="The value range is set incorrectly",iu="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",ou="The attachment size must be between 0MB and 1000MB",au="Please fill in the total score setting",su="The total score cannot be less than 1",cu="The default value must be between {min} and {max}",lu="The number of attachments uploaded must be between {min} and {max}",fu="Please re-select the optional quantity",pu="The maximum length of the control must be greater than the minimum length",du="The minimum length of the control must be less than the maximum length",hu="Please select the correct option setting",yu="Option ID cannot be repeated",vu="Please enter at least one option",gu="Please bind the data source",mu="Please bind the stored value",Eu="Please bind the service",bu="At least one display value must be bound",_u="Please select a province",Au="Please select a city",Bu="Please select a district",Su="The minimum number of lines to fill in cannot be less than 0",Cu="The number of rows cannot be less than {min} rows",Iu="Please enter the column width",wu="Please set the logical relationship of all rule conditions",Fu="Please complete all rules and conditions",Du="please select control",Ru="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Ou="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",$u="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Pu="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Tu="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Mu="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Lu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",xu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ju="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Nu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Uu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Vu="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",qu="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Hu="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ku="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Wu="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Gu="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",zu="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ku={isNotNumber:jr,isNotString:Nr,isNotObject:Ur,isNotArray:Vr,isNotBoolean:qr,runtimeRequired:Hr,pleaseEnterCaption:kr,pleaseEnterCaptionTip:Wr,pleaseEnterPlaceholder:Gr,pleaseEnterFieldCode:zr,pleaseEnterForm:Kr,pleaseEnterList:Xr,pleaseEnterProcess:Jr,pleaseEnterLabel:Qr,pleaseEnterValue:Zr,bizKeyNotBindFiled:Yr,pleaseSelectOneField:eu,pleaseEnterNumberRange:tu,pleaseEnterAValueGreaterThanMin:nu,pleaseEnterAValueLessThanMax:ru,numberRangeSetError:uu,stringRangeError:iu,attachmentMaxSize:ou,pleaseEnterTotalScoreSetting:au,theTotalScoreMustNotBeLessThan1:su,scoreDefaultValueRange:cu,attachmentLimitError:lu,PleaseReselectTheOptionalQuantity:fu,TheMaximumLengthIsGreaterThanTheMinimumLength:pu,TheMinimumLengthIsGreaterThanTheMaximumLength:du,PleaseSelectTheCorrectOptionSettings:hu,optionIdIsRepeat:yu,optionIsRequired:vu,pleaseEnterDataCode:gu,pleaseEnterValueFieldCode:mu,pleaseEnterSvcCode:Eu,pleaseBindAtLeastOneDisplayValue:bu,pleaseSelectProvince:_u,pleaseSelectCity:Au,pleaseSelectDistrict:Bu,limitRowsCannotBeLessThan0:Su,TheNumberOfRowsCannotBeLessThanMinRows:Cu,pleaseEnterColumnWidth:Iu,pleaseSetTheLogicalRelationshipOfAllRuleConditions:wu,pleaseCompleteAllRulesAndConditions:Fu,pleaseSelectControl:Du,pleaseSelectDashboard:Ru,theViewNameCannotBeEmpty:Ou,pleaseSelectOcrType:$u,pleaseSelectAtLeastOneFieldToFillIn:Pu,pleaseChooseAtLeastOne:Tu,pleaseEnterButtonContent:Mu,pleaseEnterDataCodeInDataSetting:Lu,pleaseEnterValueFieldCodeInDataSetting:xu,pleaseEnterSvcCodeInDataSetting:ju,pleaseBindAtLeastOneDisplayValueInDataSetting:Nu,rootNodeIsRequiredInDataSetting:Uu,pleaseEnterMaxHeight:Vu,pleaseEnter:qu,pleaseEnterWatermark:Hu,pleaseEnterFileName:ku,pleaseUploadAtLeastOnePrintTemplate:Wu,pleaseAssignBusiness:Gu,pleaseAssignExternal:zu},Xu="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ju="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Qu="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Zu="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Yu="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ei="{caption}\u5FC5\u9808",ti="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ni="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",ri="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ui="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ii="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",oi="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ai="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",si="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ci="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",li="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",fi="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",pi="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",di="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",hi="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",yi="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",vi="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",gi="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",mi="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ei="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",bi="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",_i="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Ai="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Bi="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5927\u5024\u306F\u6700\u5C0F\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Si="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u5024\u306F\u6700\u5927\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ci="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ii="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",wi="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Fi="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Di="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Ri="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Oi="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",$i="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Pi="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ti="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Mi="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Li="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",xi="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ji="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ni="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",Ui="please select control",Vi="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",qi="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Hi="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ki="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Wi="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Gi="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",zi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Ki="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Xi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Ji="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Qi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Zi="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Yi="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",eo="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",to="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",no="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ro="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",uo="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",io={isNotNumber:Xu,isNotString:Ju,isNotObject:Qu,isNotArray:Zu,isNotBoolean:Yu,runtimeRequired:ei,pleaseEnterCaption:ti,pleaseEnterCaptionTip:ni,pleaseEnterPlaceholder:ri,pleaseEnterFieldCode:ui,pleaseEnterForm:ii,pleaseEnterList:oi,pleaseEnterProcess:ai,pleaseEnterLabel:si,pleaseEnterValue:ci,bizKeyNotBindFiled:li,pleaseSelectOneField:fi,pleaseEnterNumberRange:pi,pleaseEnterAValueGreaterThanMin:di,pleaseEnterAValueLessThanMax:hi,numberRangeSetError:yi,stringRangeError:vi,attachmentMaxSize:gi,pleaseEnterTotalScoreSetting:mi,theTotalScoreMustNotBeLessThan1:Ei,scoreDefaultValueRange:bi,attachmentLimitError:_i,PleaseReselectTheOptionalQuantity:Ai,TheMaximumLengthIsGreaterThanTheMinimumLength:Bi,TheMinimumLengthIsGreaterThanTheMaximumLength:Si,PleaseSelectTheCorrectOptionSettings:Ci,optionIdIsRepeat:Ii,optionIsRequired:wi,pleaseEnterDataCode:Fi,pleaseEnterValueFieldCode:Di,pleaseEnterSvcCode:Ri,pleaseBindAtLeastOneDisplayValue:Oi,pleaseSelectProvince:$i,pleaseSelectCity:Pi,pleaseSelectDistrict:Ti,limitRowsCannotBeLessThan0:Mi,TheNumberOfRowsCannotBeLessThanMinRows:Li,pleaseEnterColumnWidth:xi,pleaseSetTheLogicalRelationshipOfAllRuleConditions:ji,pleaseCompleteAllRulesAndConditions:Ni,pleaseSelectControl:Ui,pleaseSelectDashboard:Vi,theViewNameCannotBeEmpty:qi,pleaseSelectOcrType:Hi,pleaseSelectAtLeastOneFieldToFillIn:ki,pleaseChooseAtLeastOne:Wi,pleaseEnterButtonContent:Gi,pleaseEnterDataCodeInDataSetting:zi,pleaseEnterValueFieldCodeInDataSetting:Ki,pleaseEnterSvcCodeInDataSetting:Xi,pleaseBindAtLeastOneDisplayValueInDataSetting:Ji,rootNodeIsRequiredInDataSetting:Qi,pleaseEnterMaxHeight:Zi,pleaseEnter:Yi,pleaseEnterWatermark:eo,pleaseEnterFileName:to,pleaseUploadAtLeastOnePrintTemplate:no,pleaseAssignBusiness:ro,pleaseAssignExternal:uo},oo={zhCN:xr,enUS:Ku,jaJP:io},St;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(St||(St={}));var Ct;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(Ct||(Ct={}));var ao="zh-CN",so=function(){};function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(R||(R={}));var p;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(p||(p={}));var S;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(S||(S={}));var O,co=(O={},$(O,S.ARRAY,p.ARRAY_COLUMN),$(O,S.AUTO_NUMBER,p.AUTO_NUMBER_COLUMN),$(O,S.DECIMAL,p.DECIMAL_COLUMN),$(O,S.DEPARTMENTS,p.DEPARTMENT_COLUMN),$(O,S.FILE,p.FILE_COLUMN),$(O,S.IMAGE,p.IMAGE_COLUMN),$(O,S.ADDRESS,p.LOCATION_COLUMN),$(O,S.EMPLOYEES,p.EMPLOYEE_COLUMN),$(O,S.TEXT,p.TEXT_COLUMN),$(O,S.TIMESCOPE,p.TIMESCOPE_COLUMN),$(O,S.TIMESTAMP,p.TIMESTAMP_COLUMN),$(O,S.VARCHAR,p.VARCHAR_COLUMN),$(O,S.RELATION,p.VARCHAR_COLUMN),O),It;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(It||(It={}));var wt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",lo=wt+"0123456789";function Oe(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",r=0;r<e;r++){var n=r===0?wt:lo,u=Math.random()*n.length;t+=n[parseInt(String(u),10)]}return t}function $e(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fo(e){if(Array.isArray(e))return $e(e)}function po(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ho(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function fe(e,t,r){return ho()?fe=Reflect.construct:fe=function(u,i,o){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),a=new c;return o&&Q(a,o.prototype),a},fe.apply(null,arguments)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},J(e)}function Dt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}function yo(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function vo(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function go(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mo(e,t){return t&&(Eo(t)==="object"||typeof t=="function")?t:po(e)}function Q(e,t){return Q=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},Q(e,t)}function Rt(e){return fo(e)||vo(e)||bo(e)||go()}var Eo=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function bo(e,t){if(!!e){if(typeof e=="string")return $e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $e(e,t)}}function Pe(e){var t=typeof Map=="function"?new Map:void 0;return Pe=function(n){if(n===null||!yo(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,u)}function u(){return fe(n,arguments,J(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Q(u,n)},Pe(e)}function _o(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ot(e){var t=_o();return function(){var n=J(e),u;if(t){var i=J(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return mo(this,u)}}var Te=console;function pe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,u=t.slice(1);(n=Te).warn.apply(n,["\u{1F9D0} Driven Warning:"+t[0]].concat(Rt(u)))}function $t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,u=t.slice(1);(n=Te).log.apply(n,["\u{1F680} Driven Log:"+t[0]].concat(Rt(u)))}function Ao(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Me=function(e){Dt(r,e);var t=Ot(r);function r(n){Ft(this,r);var u;return u=t.call(this,n),u.name="\u{1F4A5} Driven Error",u.message=n?Ao(n):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return r}(Pe(Error)),Bo=function(e){Dt(r,e);var t=Ot(r);function r(n){Ft(this,r);var u;return u=t.call(this,n),u.name="\u{1F6A8} Driven Reference Error",u}return r}(Me);function Z(e){throw new Me(e)}function Pt(e){throw new Bo(e)}function So(e){Te.error(new Me(e))}var Co=Object.prototype.toString;function Tt(e,t){return Co.call(e)==="[object "+t+"]"}function Io(e){return Tt(e,"String")}function wo(e){return Tt(e,"Promise")}var Fo=function(){function e(t){var r,n;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((n=(r=t.messages)!==null&&r!==void 0?r:this.getPreImport(t.locale))!==null&&n!==void 0?n:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var r=this;this.locale=t,this._messageCache.clear();var n=this.getMessageData();wo(n)?n.then(function(u){r._messageCache.clear(),r.messages[r.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=n},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,r,n){var u=this.getMessage(t);return u?this.formatMessage(u,n):this.formatMessage(r,n)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var r=this.getPathArray(t),n=r.reduce(function(u,i,o,s){if(u!==void 0){var c=u[i];if(!(o===s.length-1&&!Io(c)))return c}},this.message);return this._messageCache.set(t,n),n},e.prototype.formatMessage=function(t,r){return r?t.replace(this.variableRegExp,function(n,u){var i=r[u];return i!==void 0?String(i):n}):t},e.prototype.getPreImport=function(t){var r;if(window.okI18nPreImport){var n=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(n)?window.okI18nPreImport:(r={},r[n]=window.okI18nPreImport,r)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function Do(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Mt=function(){function e(){Do(this,e)}return e.getMessage=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(r,"",n)},e.resetI18n=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ao;return new Fo({locale:r,messages:oo})},e.setLocale=function(r){return this.$i18n.setLocale(r)},e}();Mt.$i18n=Mt.resetI18n();function Lt(e,t,r){var n=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return n.reduce(function(i,o,s,c){var a=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){pe("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return s===c.length-1&&!Object.is(a[o],r)&&(a[o]=r,u=!0),a[o]}},e),u}var Ro=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Oo={exports:{}};(function(e){(function(t){var r=function(l,h,C){if(!a(h)||y(h)||g(h)||_(h)||c(h))return h;var b,I=0,L=0;if(f(h))for(b=[],L=h.length;I<L;I++)b.push(r(l,h[I],C));else{b={};for(var B in h)Object.prototype.hasOwnProperty.call(h,B)&&(b[l(B,C)]=r(l,h[B],C))}return b},n=function(l,h){h=h||{};var C=h.separator||"_",b=h.split||/(?=[A-Z])/;return l.split(b).join(C)},u=function(l){return A(l)?l:(l=l.replace(/[\-_\s]+(.)?/g,function(h,C){return C?C.toUpperCase():""}),l.substr(0,1).toLowerCase()+l.substr(1))},i=function(l){var h=u(l);return h.substr(0,1).toUpperCase()+h.substr(1)},o=function(l,h){return n(l,h).toLowerCase()},s=Object.prototype.toString,c=function(l){return typeof l=="function"},a=function(l){return l===Object(l)},f=function(l){return s.call(l)=="[object Array]"},y=function(l){return s.call(l)=="[object Date]"},g=function(l){return s.call(l)=="[object RegExp]"},_=function(l){return s.call(l)=="[object Boolean]"},A=function(l){return l=l-0,l===l},d=function(l,h){var C=h&&"process"in h?h.process:h;return typeof C!="function"?l:function(b,I){return C(b,l,I)}},v={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(l,h){return r(d(u,h),l)},decamelizeKeys:function(l,h){return r(d(o,h),l,h)},pascalizeKeys:function(l,h){return r(d(i,h),l)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=v:t.humps=v})(Ro)})(Oo);var xt={};Object.defineProperty(xt,"__esModule",{value:!0});function Le(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(t=>typeof t!="object"||t===null?t:Le(t));{const t={};for(const r in e){const n=e[r];t[r]=typeof n!="object"||n===null?n:Le(n)}return t}}var $o=xt.default=Le;function Y(e){if(e!==void 0)return typeof e=="object"?$o(e):e}function xe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Po(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function ee(e){return Array.isArray(e)}function je(e){return typeof e=="string"}function To(e){return Object.values(p).includes(e)}function Ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mo(e){if(Array.isArray(e))return Ne(e)}function jt(e,t,r,n,u,i,o){try{var s=e[i](o),c=s.value}catch(a){r(a);return}s.done?t(c):Promise.resolve(c).then(n,u)}function Lo(e){return function(){var t=this,r=arguments;return new Promise(function(n,u){var i=e.apply(t,r);function o(c){jt(i,n,u,o,s,"next",c)}function s(c){jt(i,n,u,o,s,"throw",c)}o(void 0)})}}function xo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function No(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ue(e){return Mo(e)||jo(e)||Uo(e)||No()}function Uo(e,t){if(!!e){if(typeof e=="string")return Ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ne(e,t)}}var Vo=function(e,t){var r,n,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(a){return function(f){return c([a,f])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(u=a[0]&2?n.return:a[0]?n.throw||((u=n.return)&&u.call(n),0):n.next)&&!(u=u.call(n,a[1])).done)return u;switch(n=0,u&&(a=[a[0]&2,u.value]),a[0]){case 0:case 1:u=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){o.label=a[1];break}if(a[0]===6&&o.label<u[1]){o.label=u[1],u=a;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(a);break}u[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(f){a=[6,f],n=0}finally{r=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Nt=function(){function e(){xo(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(n){for(var u=arguments.length,i=new Array(u>1?u-1:0),o=1;o<u;o++)i[o-1]=arguments[o];var s=this;return Lo(function(){var c,a,f,y,g,_,A,d,v,l,h,C;return Vo(this,function(b){switch(b.label){case 0:if(c=s._events.get(n),a=[],!c)return[3,10];f=c.slice(),y=!0,g=!1,_=void 0,b.label=1;case 1:b.trys.push([1,8,9,10]),A=f[Symbol.iterator](),b.label=2;case 2:if(y=(d=A.next()).done)return[3,7];if(v=d.value,!c.includes(v))return[3,6];b.label=3;case 3:return b.trys.push([3,5,,6]),s.debug&&$t.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Ue(i))),[4,v.apply(null,Ue(i))];case 4:return l=b.sent(),s.debug&&$t.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Ue(i),[l])),a.push(l),l===!1?[3,7]:[3,6];case 5:return h=b.sent(),So(String(h)),[3,6];case 6:return y=!0,[3,2];case 7:return[3,10];case 8:return C=b.sent(),g=!0,_=C,[3,10];case 9:try{!y&&A.return!=null&&A.return()}finally{if(g)throw _}return[7];case 10:return[2,a]}})})()},t.on=function(n,u){if(this._events.has(n)){var i;(i=this._events.get(n))===null||i===void 0||i.push(u)}else this._events.set(n,[u])},t.off=function(n,u){if(this._events.has(n)){var i=this._events.get(n),o=i==null?void 0:i.indexOf(u);i==null||i.splice(o,1)}},t.delete=function(n){this._events.has(n)&&this._events.delete(n)},t.clear=function(){this._events=new Map},e}();function qo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ho=[{key:"on_click",name:"\u70B9\u51FB\u65F6",code:"click"},{key:"on_click_finish",name:"\u6267\u884C\u5B8C\u6210\u65F6",code:"click-finish"},{key:"on_change",name:"\u503C\u53D1\u751F\u53D8\u5316\u65F6",code:"change"},{key:"on_search",name:"\u641C\u7D22\u65F6",code:"search"},{key:"on_list_change",name:"\u5217\u8868\u6570\u636E\u53D8\u5316\u65F6",code:"list-change"},{key:"on_list_search",name:"\u5217\u8868\u6570\u636E\u67E5\u8BE2\u6784\u5EFA\u65F6",code:"list-search"},{key:"on_list_mounted",name:"\u5217\u8868\u6570\u636E\u8FD4\u56DE\u65F6",code:"list-mounted"},{key:"on_list_delete",name:"\u5217\u8868\u6570\u636E\u5220\u9664\u65F6",code:"list-delete"},{key:"on_list_before_insert",name:"\u5217\u8868\u6570\u636E\u63D2\u5165\u524D",code:"list-before-insert"},{key:"on_input",name:"\u7528\u6237\u8F93\u5165\u65F6",code:"input"},{key:"on_blur",name:"\u5931\u53BB\u7126\u70B9\u65F6",code:"blur"},{key:"on_focus",name:"\u83B7\u53D6\u7126\u70B9\u65F6",code:"focus"},{key:"on_wps_open",name:"\u6253\u5F00\u6587\u4EF6\u65F6",code:"wps-open"},{key:"on_wps_save",name:"\u4FDD\u5B58\u6587\u4EF6\u65F6",code:"wps-save"},{key:"on_wps_rename",name:"\u91CD\u547D\u540D\u65F6",code:"wps-rename"},{key:"on_list_actions",name:"\u70B9\u51FB\u64CD\u4F5C\u6309\u94AE\u65F6",code:"list-actions"},{key:"on_list_render_operation",name:"\u64CD\u4F5C\u5217\u6E32\u67D3\u65F6",code:"list-render-operation"},{key:"on_list_rowclick",name:"\u884C\u70B9\u51FB\u65F6",code:"list-rowclick"},{key:"on_list_before_rowdelete",name:"\u884C\u5220\u9664\u524D",code:"list-before-rowdelete"},{key:"on_list_before_import",name:"\u5217\u8868\u6570\u636E\u5BFC\u5165\u524D",code:"list-before-import"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rows-checked"},{key:"on_change_tab",name:"\u6807\u7B7E\u9875\u5207\u6362\u65F6",code:"change-tab"},{key:"on_modal_ok",name:"\u5F39\u7A97\u786E\u8BA4\u65F6",code:"modal-ok"}],te=function(){function e(){qo(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(n){var u=typeof n=="string"?[n]:n;return e.events.filter(function(i){return u.includes(i.key)})},e}();te.events=Ho;function ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ut=[],de=function(){function e(r){ko(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=r,this._initControls(r)}var t=e.prototype;return t.registerControlConfig=function(n,u){return this.controlConfigMap.set(n,u),this},t.getControlConfig=function(n){return this.controlConfigMap.get(n)},t.getControls=function(){return this._controls},t.register=function(n){n.__is_control__||Z("".concat(n.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===n.controlType});return u>-1&&(pe("The ".concat(n.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(n.controlType),this._controls.push(n),this},t.isLayoutControl=function(n){return n.controlType===R.LAYOUT},t.isFormControl=function(n){return n.controlType===R.FORM},t.isListControl=function(n){return n.controlType===R.LIST},t.isColumnControl=function(n){return n.controlType===R.COLUMN},t.createControl=function(n,u){var i=this;if(Array.isArray(n))return n.map(function(f){return i.createControl(f,u)});n.children&&(n.children=n.children.map(function(f){return i.createControl(f,u)})),this.isListControl(n)&&n.props.headers&&(n.props.headers=n.props.headers.map(function(f){return i.createControl(f,u)}));var o=this.getControlFormType(n.type);if(o){var s=n;if(typeof u=="function"){var c=u(s);c&&(s=c)}var a=new o(s);return a}else Z("The constructor of ".concat(n.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(n,u){var i=this.getControlFormType(n);if(i)return new i(u)},t.getControlFormType=function(n){return this._controls.find(function(u){return u.controlType===n})},t._initControls=function(n){var u=this;this.constructor.staticControls.forEach(function(i){u.register(i[n])})},e.register=function(n){var u=n.Designer,i=n.Runtime;(!u||!i||!u.__is_control__||!i.__is_control__)&&Z("".concat(n," is can't register as a Control"));var o=this.staticControls.findIndex(function(s){return s.Designer.controlType===u.controlType});return o>-1&&(pe("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(n),this},e}();de.staticControls=Ut,de.staticRegisteredTypes=new Set(Ut.map(function(e){return e.Designer.controlType})),de.staticRegisteredConfigs=new Map;function Vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Wo=function e(t){Vt(this,e);var r;this.dataCode=(r=t==null?void 0:t.dataCode)!==null&&r!==void 0?r:"";var n;this.fieldCode=(n=t==null?void 0:t.fieldCode)!==null&&n!==void 0?n:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},qt;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(qt||(qt={}));var Ht;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(Ht||(Ht={}));var Ve;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Ve||(Ve={}));var Go=function e(t){Vt(this,e);var r;this.width=(r=t==null?void 0:t.width)!==null&&r!==void 0?r:"";var n;this.height=(n=t==null?void 0:t.height)!==null&&n!==void 0?n:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var i;this.heightConfig=(i=t==null?void 0:t.heightConfig)!==null&&i!==void 0?i:"fill"};function zo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function he(e,t,r){return Ko()?he=Reflect.construct:he=function(u,i,o){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),a=new c;return o&&re(a,o.prototype),a},he.apply(null,arguments)}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ne(e)}function Xo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}function Jo(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Qo(e,t){return t&&(Zo(t)==="object"||typeof t=="function")?t:zo(e)}function re(e,t){return re=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},re(e,t)}var Zo=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function He(e){var t=typeof Map=="function"?new Map:void 0;return He=function(n){if(n===null||!Jo(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,u)}function u(){return he(n,arguments,ne(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),re(u,n)},He(e)}function Yo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function ea(e){var t=Yo();return function(){var n=ne(e),u;if(t){var i=ne(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Qo(this,u)}}var ta=function e(t){qe(this,e),this.isHide={type:"boolean"}},na=function(e){Xo(r,e);var t=ea(r);function r(n){return qe(this,r),t.call(this)}return r}(He(Array)),ue=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";qe(this,e);var n;this.isHide=(n=t==null?void 0:t.isHide)!==null&&n!==void 0?n:!1,this.style=new Go(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:r};ue.Rules=ta,ue.RuntimeRules=na;function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}function ra(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ke(e)}function ye(e,t){return ye=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},ye(e,t)}function ua(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function ve(e,t,r){return ua()?ve=Reflect.construct:ve=function(u,i,o){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),a=new c;return o&&ye(a,o.prototype),a},ve.apply(null,arguments)}function ia(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function We(e){var t=typeof Map=="function"?new Map:void 0;return We=function(n){if(n===null||!ia(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,u)}function u(){return ve(n,arguments,ke(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),ye(u,n)},We(e)}var oa=/%[sdj%]/g,kt=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(kt=function(t,r){typeof console!="undefined"&&console.warn&&r.every(function(n){return typeof n=="string"})&&console.warn(t,r)});function Ge(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function P(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=1,u=t[0],i=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var o=String(u).replace(oa,function(s){if(s==="%%")return"%";if(n>=i)return s;switch(s){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch(c){return"[Circular]"}break;default:return s}});return o}return u}function aa(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function w(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||aa(t)&&typeof e=="string"&&!e)}function sa(e,t,r){var n=[],u=0,i=e.length;function o(s){n.push.apply(n,s),u++,u===i&&r(n)}e.forEach(function(s){t(s,o)})}function Wt(e,t,r){var n=0,u=e.length;function i(o){if(o&&o.length){r(o);return}var s=n;n=n+1,s<u?t(e[s],i):r([])}i([])}function ca(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r])}),t}var Gt=function(e){ra(t,e);function t(r,n){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=r,u.fields=n,u}return t}(We(Error));function la(e,t,r,n){if(t.first){var u=new Promise(function(y,g){var _=function(v){return n(v),v.length?g(new Gt(v,Ge(v))):y()},A=ca(e);Wt(A,r,_)});return u.catch(function(y){return y}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),s=o.length,c=0,a=[],f=new Promise(function(y,g){var _=function(d){if(a.push.apply(a,d),c++,c===s)return n(a),a.length?g(new Gt(a,Ge(a))):y()};o.length||(n(a),y()),o.forEach(function(A){var d=e[A];i.indexOf(A)!==-1?Wt(d,r,_):sa(d,r,_)})});return f.catch(function(y){return y}),f}function zt(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function Kt(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=T(T({},e[r]),n):e[r]=n}}return e}function Xt(e,t,r,n,u,i){e.required&&(!r.hasOwnProperty(e.field)||w(t,i||e.type))&&n.push(P(u.messages.required,e.fullField))}function fa(e,t,r,n,u){(/^\s+$/.test(t)||t==="")&&n.push(P(u.messages.whitespace,e.fullField))}var ze={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ie={integer:function(t){return ie.number(t)&&parseInt(t,10)===t},float:function(t){return ie.number(t)&&!ie.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(r){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ie.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(ze.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(ze.url)},hex:function(t){return typeof t=="string"&&!!t.match(ze.hex)}};function pa(e,t,r,n,u){if(e.required&&t===void 0){Xt(e,t,r,n,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?ie[o](t)||n.push(P(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&n.push(P(u.messages.types[o],e.fullField,e.type))}function da(e,t,r,n,u){var i=typeof e.len=="number",o=typeof e.min=="number",s=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=t,f=null,y=typeof t=="number",g=typeof t=="string",_=Array.isArray(t);if(y?f="number":g?f="string":_&&(f="array"),!f)return!1;_&&(a=t.length),g&&(a=t.replace(c,"_").length),i?a!==e.len&&n.push(P(u.messages[f].len,e.fullField,e.len)):o&&!s&&a<e.min?n.push(P(u.messages[f].min,e.fullField,e.min)):s&&!o&&a>e.max?n.push(P(u.messages[f].max,e.fullField,e.max)):o&&s&&(a<e.min||a>e.max)&&n.push(P(u.messages[f].range,e.fullField,e.min,e.max))}var H="enum";function ha(e,t,r,n,u){e[H]=Array.isArray(e[H])?e[H]:[],e[H].indexOf(t)===-1&&n.push(P(u.messages[H],e.fullField,e[H].join(", ")))}function ya(e,t,r,n,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(P(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var i=new RegExp(e.pattern);i.test(t)||n.push(P(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var m={required:Xt,whitespace:fa,type:pa,range:da,enum:ha,pattern:ya};function va(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t,"string")&&!e.required)return r();m.required(e,t,n,i,u,"string"),w(t,"string")||(m.type(e,t,n,i,u),m.range(e,t,n,i,u),m.pattern(e,t,n,i,u),e.whitespace===!0&&m.whitespace(e,t,n,i,u))}r(i)}function ga(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&m.type(e,t,n,i,u)}r(i)}function ma(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&(m.type(e,t,n,i,u),m.range(e,t,n,i,u))}r(i)}function Ea(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&m.type(e,t,n,i,u)}r(i)}function ba(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),w(t)||m.type(e,t,n,i,u)}r(i)}function _a(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&(m.type(e,t,n,i,u),m.range(e,t,n,i,u))}r(i)}function Aa(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&(m.type(e,t,n,i,u),m.range(e,t,n,i,u))}r(i)}function Ba(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return r();m.required(e,t,n,i,u,"array"),t!=null&&(m.type(e,t,n,i,u),m.range(e,t,n,i,u))}r(i)}function Sa(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&m.type(e,t,n,i,u)}r(i)}var Ca="enum";function Ia(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u),t!==void 0&&m[Ca](e,t,n,i,u)}r(i)}function wa(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t,"string")&&!e.required)return r();m.required(e,t,n,i,u),w(t,"string")||m.pattern(e,t,n,i,u)}r(i)}function Fa(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t,"date")&&!e.required)return r();if(m.required(e,t,n,i,u),!w(t,"date")){var s;t instanceof Date?s=t:s=new Date(t),m.type(e,s,n,i,u),s&&m.range(e,s.getTime(),n,i,u)}}r(i)}function Da(e,t,r,n,u){var i=[],o=Array.isArray(t)?"array":typeof t;m.required(e,t,n,i,u,o),r(i)}function Ke(e,t,r,n,u){var i=e.type,o=[],s=e.required||!e.required&&n.hasOwnProperty(e.field);if(s){if(w(t,i)&&!e.required)return r();m.required(e,t,n,o,u,i),w(t,i)||m.type(e,t,n,o,u)}r(o)}function Ra(e,t,r,n,u){var i=[],o=e.required||!e.required&&n.hasOwnProperty(e.field);if(o){if(w(t)&&!e.required)return r();m.required(e,t,n,i,u)}r(i)}var oe={string:va,method:ga,number:ma,boolean:Ea,regexp:ba,integer:_a,float:Aa,array:Ba,object:Sa,enum:Ia,pattern:wa,date:Fa,url:Ke,hex:Ke,email:Ke,required:Da,any:Ra};function Xe(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Je=Xe();function U(e){this.rules=null,this._messages=Je,this.define(e)}U.prototype={messages:function(t){return t&&(this._messages=Kt(Xe(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var r,n;for(r in t)t.hasOwnProperty(r)&&(n=t[r],this.rules[r]=Array.isArray(n)?n:[n])},validate:function(t,r,n){var u=this;r===void 0&&(r={}),n===void 0&&(n=function(){});var i=t,o=r,s=n;if(typeof o=="function"&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(),Promise.resolve();function c(d){var v,l=[],h={};function C(b){if(Array.isArray(b)){var I;l=(I=l).concat.apply(I,b)}else l.push(b)}for(v=0;v<d.length;v++)C(d[v]);l.length?h=Ge(l):(l=null,h=null),s(l,h)}if(o.messages){var a=this.messages();a===Je&&(a=Xe()),Kt(a,o.messages),o.messages=a}else o.messages=this.messages();var f,y,g={},_=o.keys||Object.keys(this.rules);_.forEach(function(d){f=u.rules[d],y=i[d],f.forEach(function(v){var l=v;typeof l.transform=="function"&&(i===t&&(i=T({},i)),y=i[d]=l.transform(y)),typeof l=="function"?l={validator:l}:l=T({},l),l.validator=u.getValidationMethod(l),l.field=d,l.fullField=l.fullField||d,l.type=u.getType(l),l.validator&&(g[d]=g[d]||[],g[d].push({rule:l,value:y,source:i,field:d}))})});var A={};return la(g,o,function(d,v){var l=d.rule,h=(l.type==="object"||l.type==="array")&&(typeof l.fields=="object"||typeof l.defaultField=="object");h=h&&(l.required||!l.required&&d.value),l.field=d.field;function C(L,B){return T(T({},B),{},{fullField:l.fullField+"."+L})}function b(L){L===void 0&&(L=[]);var B=L;if(Array.isArray(B)||(B=[B]),!o.suppressWarning&&B.length&&U.warning("async-validator:",B),B.length&&l.message!==void 0&&(B=[].concat(l.message)),B=B.map(zt(l)),o.first&&B.length)return A[l.field]=1,v(B);if(!h)v(B);else{if(l.required&&!d.value)return l.message!==void 0?B=[].concat(l.message).map(zt(l)):o.error&&(B=[o.error(l,P(o.messages.required,l.field))]),v(B);var x={};if(l.defaultField)for(var Dn in d.value)d.value.hasOwnProperty(Dn)&&(x[Dn]=l.defaultField);x=T(T({},x),d.rule.fields);for(var W in x)if(x.hasOwnProperty(W)){var il=Array.isArray(x[W])?x[W]:[x[W]];x[W]=il.map(C.bind(null,W))}var Rn=new U(x);Rn.messages(o.messages),d.rule.options&&(d.rule.options.messages=o.messages,d.rule.options.error=o.error),Rn.validate(d.value,d.rule.options||o,function(At){var G=[];B&&B.length&&G.push.apply(G,B),At&&At.length&&G.push.apply(G,At),v(G.length?G:null)})}}var I;l.asyncValidator?I=l.asyncValidator(l,d.value,b,d.source,o):l.validator&&(I=l.validator(l,d.value,b,d.source,o),I===!0?b():I===!1?b(l.message||l.field+" fails"):I instanceof Array?b(I):I instanceof Error&&b(I.message)),I&&I.then&&I.then(function(){return b()},function(L){return b(L)})},function(d){c(d)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!oe.hasOwnProperty(t.type))throw new Error(P("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?oe.required:oe[this.getType(t)]||!1}},U.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");oe[t]=r},U.warning=kt,U.messages=Je,U.validators=oe;var Oa={required:"%s \u5FC5\u586B",maxLength:"%s \u8D85\u51FA\u6700\u5927\u957F\u5EA6\u9650\u5236",minLength:"%s \u5C0F\u4E8E\u6700\u5C0F\u957F\u5EA6\u9650\u5236",string:{range:"%s \u4E0D\u5728\u6307\u5B9A\u957F\u5EA6\u5185"}};function $a(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new U(e);return r.messages(Object.assign(Oa,t)),r}var Jt=new Nt;function Qe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pa(e){if(Array.isArray(e))return e}function Ta(e){if(Array.isArray(e))return Qe(e)}function Qt(e,t,r,n,u,i,o){try{var s=e[i](o),c=s.value}catch(a){r(a);return}s.done?t(c):Promise.resolve(c).then(n,u)}function Zt(e){return function(){var t=this,r=arguments;return new Promise(function(n,u){var i=e.apply(t,r);function o(c){Qt(i,n,u,o,s,"next",c)}function s(c){Qt(i,n,u,o,s,"throw",c)}o(void 0)})}}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function La(e,t,r){return t&&Yt(e.prototype,t),r&&Yt(e,r),e}function xa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function en(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function tn(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ja(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Na(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable}))),n.forEach(function(u){xa(e,u,r[u])})}return e}function Ua(e){return Pa(e)||tn(e)||rn(e)||ja()}function Ze(e){return Ta(e)||tn(e)||rn(e)||Na()}function rn(e,t){if(!!e){if(typeof e=="string")return Qe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qe(e,t)}}var un=function(e,t){var r,n,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(a){return function(f){return c([a,f])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(u=a[0]&2?n.return:a[0]?n.throw||((u=n.return)&&u.call(n),0):n.next)&&!(u=u.call(n,a[1])).done)return u;switch(n=0,u&&(a=[a[0]&2,u.value]),a[0]){case 0:case 1:u=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){o.label=a[1];break}if(a[0]===6&&o.label<u[1]){o.label=u[1],u=a;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(a);break}u[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(f){a=[6,f],n=0}finally{r=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},M=function(){function t(n){var u=this;Ma(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=an,this.removeSetting=on,this._callControlHooks("preInstance",n);var i=en(this,t)?this.constructor:void 0,o=i.controlName,s=i.controlIcon,c=i.controlType,a=i.controlFieldType,f=i.controlEventKeys,y=i.controlCustomEvents,g=i.name,_=i.setting;o&&s&&c||Pt("The ".concat(g," controlName,controlIcon,controlType is not define"));var A;this.id=(A=n==null?void 0:n.id)!==null&&A!==void 0?A:Oe(10),this.name=o,this.icon=s;var d;this.type=(d=n==null?void 0:n.type)!==null&&d!==void 0?d:c,this.props=new ue(n==null?void 0:n.props,(en(this,t)?this.constructor:void 0).controlName);var v;this.controlType=(v=n==null?void 0:n.controlType)!==null&&v!==void 0?v:"base",this.setting=Y(_);var l;this.fieldType=(l=n==null?void 0:n.fieldType)!==null&&l!==void 0?l:a,this.eventKeys=Y(f),this.customEvents=Y(y),Promise.resolve().then(function(){u._callControlHooks("postInstance",n)})}var r=t.prototype;return r._callControlHooks=function(){for(var u=arguments.length,i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];var s,c=Ua(i),a=c[0],f=c.slice(1);return(s=Jt).emit.apply(s,[a,this].concat(Ze(f)))},r.preUpdate=function(u,i){this._callControlHooks("preUpdateProps",u,i)},r.postUpdate=function(u,i){this._callControlHooks("postUpdateProps",u,i)},r.updateProps=function(u,i){this.preUpdate(u,i),Lt(this.props,u,i),this.postUpdate(u,i)},r.preValidate=function(){var u=this;return Zt(function(){var i,o,s;return un(this,function(c){switch(c.label){case 0:return i=nn({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return o=c.sent(),s=o[o.length-1],[2,s===!1?void 0:s]}})})()},r.validate=function(u,i){var o=this;return Zt(function(){var s,c,a,f;return un(this,function(y){switch(y.label){case 0:return[4,o.preValidate()];case 1:s=y.sent(),c=s!==void 0?s:nn({},o.rules),Array.isArray(i)&&i.forEach(function(g){c.hasOwnProperty(g)&&delete c[g]}),a=$a(c,u),y.label=2;case 2:return y.trys.push([2,4,,5]),[4,a.validate(o.props)];case 3:return y.sent(),[2,!0];case 4:throw f=y.sent(),f.control||(f.control=o),f;case 5:return[2]}})})()},r.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,o=this.id,s=this.type,c=this.props,a=c.dataBind,f=c.datasourceBind,y=c.optionConfig,g=c.caption,_=c.required,A=c.maxLength,d=c.options,v=c.encrypted,l=c.encryptedMode;if(!(!i&&!a&&!f)){var h={parentId:u,fieldType:i,controlId:o,caption:g,type:s,props:{}};switch(a&&(h.dataBind=a),y){case"datasource":case void 0:f&&(h.datasourceBind=f);break;case"custom":h.props.options=d;break}return _!==void 0&&(h.required=_),A!==void 0&&(h.maxLength=A),v!==void 0&&(h.encrypted=v),l!==void 0&&(h.encryptedMode=l),h}},r.preToSchema=function(){this._callControlHooks("preToSchema",this)},r.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:Y(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var o;(o=this.setting).push.apply(o,Ze(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},La(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();M.controlName="\u63A7\u4EF6",M.controlIcon="icon",M.controlType="control",M.controlEventKeys=[],M.controlCustomEvents=[],M.setting=[],M.__is_control__=!0,M.removeSettingItem=on,M.updateSettingItem=an;function on(e){var t=this,r=Array.isArray(e)?e:[e];r.forEach(function(n){var u=typeof n!="string",i=t.setting.findIndex(function(c){return c.key===(u?n.key:n)});if(i!==-1){var o,s;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(c){return!n.hideItems.includes(c)}):t.setting.splice(i,1),u&&!(!((s=t.setting[i].showItems)===null||s===void 0)&&s.length)&&t.setting.splice(i,1)}})}function an(e,t){var r=this,n=typeof e=="string"?[e]:e;n.forEach(function(u){var i=r.setting.find(function(a){return a.key===u});if(i){if(typeof t=="boolean")i.visible=t;else if(typeof t=="object"){var o,s=(o=t.type)!==null&&o!==void 0?o:"replace";if(s==="replace")i.showItems=t.showItems;else{var c;(c=i.showItems).push.apply(c,Ze(t.showItems))}}}})}function Va(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qa(e,t,r){return t&&sn(e.prototype,t),r&&sn(e,r),e}function Ha(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var Ye=function(){function t(r){Va(this,t),this.customEvents=[],this.parent=null;var n=Ha(this,t)?this.constructor:void 0,u=n.controlType,i=n.controlFieldType,o=n.name,s=n.controlCustomEvents;u||Pt("The ".concat(o," controlType is not define"));var c;this.id=(c=r==null?void 0:r.id)!==null&&c!==void 0?c:Oe(10);var a;this.type=(a=r==null?void 0:r.type)!==null&&a!==void 0?a:u,this.props=new ue(r==null?void 0:r.props),this.customEvents=s;var f;this.controlType=(f=r==null?void 0:r.controlType)!==null&&f!==void 0?f:"base";var y;this.fieldType=(y=r==null?void 0:r.fieldType)!==null&&y!==void 0?y:i;var g;this.pageStatus=(g=r==null?void 0:r.pageStatus)!==null&&g!==void 0?g:Ve.UNKNOWN}return qa(t,[{key:"rules",get:function(){var n=this.props.constructor.RuntimeRules;if(n){var u=new n(this.props);return Array.from(u)}return[]}}]),t}();Ye.controlType="control",Ye.__is_control__=!0,Ye.controlCustomEvents=[];function ka(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ge(e)}function Ga(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&et(e,t)}function za(e,t){return t&&(Ka(t)==="object"||typeof t=="function")?t:ka(e)}function et(e,t){return et=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},et(e,t)}var Ka=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Xa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ja(e){var t=Xa();return function(){var n=ge(e),u;if(t){var i=ge(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return za(this,u)}}var Qa=function(e){Ga(r,e);var t=Ja(r);function r(n){return Wa(this,r),t.call(this,n)}return r}(ue);function tt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Za(e){if(Array.isArray(e))return tt(e)}function Ya(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function es(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cn(e){return Za(e)||Ya(e)||ts(e)||es()}function ts(e,t){if(!!e){if(typeof e=="string")return tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tt(e,t)}}function ns(e,t){var r;!((r=Object.getOwnPropertyDescriptors(e)[t])===null||r===void 0)&&r.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function ln(e,t){e.parent=t,ns(e,"parent")}function rs(e,t){e.forEach(function(r){ln(r,t)})}var fn=Symbol("targetKey");function pn(e){var t;return(t=e[fn])!==null&&t!==void 0?t:e}function dn(e,t){return rs(e,t),new Proxy(e,{get:function(n,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];var c;return u===fn?n:(c=Reflect).get.apply(c,[n,u].concat(cn(o)))},set:function(n,u,i){for(var o=arguments.length,s=new Array(o>3?o-3:0),c=3;c<o;c++)s[c-3]=arguments[c];var a;if(ee(e)&&u==="length"&&i===e.length)return!0;var f=(a=Reflect).set.apply(a,[n,u,i].concat(cn(s)));return xe(i)&&ln(i,t),f}})}function us(e,t,r,n){var u=n!=null?n:e,i=dn(pn(r!=null?r:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(s){i=dn(pn(s),u)},enumerable:!0})}function nt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function is(e){if(Array.isArray(e))return nt(e)}function hn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yn(e,t,r,n,u,i,o){try{var s=e[i](o),c=s.value}catch(a){r(a);return}s.done?t(c):Promise.resolve(c).then(n,u)}function os(e){return function(){var t=this,r=arguments;return new Promise(function(n,u){var i=e.apply(t,r);function o(c){yn(i,n,u,o,s,"next",c)}function s(c){yn(i,n,u,o,s,"throw",c)}o(void 0)})}}function as(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ss(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(e,t,r){return typeof Reflect!="undefined"&&Reflect.get?k=Reflect.get:k=function(u,i,o){var s=gs(u,i);if(!!s){var c=Object.getOwnPropertyDescriptor(s,i);return c.get?c.get.call(o):c.value}},k(e,t,r||e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},V(e)}function cs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rt(e,t)}function ls(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function fs(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ps(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ds(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable}))),n.forEach(function(u){ss(e,u,r[u])})}return e}function hs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function ys(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hs(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function vs(e,t){return t&&(ms(t)==="object"||typeof t=="function")?t:hn(e)}function rt(e,t){return rt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},rt(e,t)}function gs(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=V(e),e!==null););return e}function vn(e){return is(e)||fs(e)||Es(e)||ps()}var ms=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Es(e,t){if(!!e){if(typeof e=="string")return nt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nt(e,t)}}function bs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _s(e){var t=bs();return function(){var n=V(e),u;if(t){var i=V(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return vs(this,u)}}var As=function(e,t){var r,n,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(a){return function(f){return c([a,f])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(u=a[0]&2?n.return:a[0]?n.throw||((u=n.return)&&u.call(n),0):n.next)&&!(u=u.call(n,a[1])).done)return u;switch(n=0,u&&(a=[a[0]&2,u.value]),a[0]){case 0:case 1:u=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){o.label=a[1];break}if(a[0]===6&&o.label<u[1]){o.label=u[1],u=a;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(a);break}u[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(f){a=[6,f],n=0}finally{r=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Bs=1e4,gn=function(t){cs(n,t);var r=_s(n);function n(i){as(this,n);var o;o=r.call(this,i),o.controlType="layout";var s=ls(this,n)?this.constructor:void 0,c=s.excludes,a=s.childrenMaxLength;return o.props=new Qa(i==null?void 0:i.props),us(hn(o),"children",i==null?void 0:i.children),o.excludes=Y(c),o.childrenMaxLength=a,o}var u=n.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var s=this.judgeExcludesChildren(o);return s&&this.childrenMaxLength>this.children.length},u.validate=function(o,s){var c=this,a=this,f=function(){return k(V(n.prototype),"validate",c)};return os(function(){return As(this,function(y){switch(y.label){case 0:return[4,f().call(a,o,s)];case 1:return y.sent(),[4,Promise.all(a.children.map(function(g){return g.validate(o,s)}))];case 2:return y.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=k(V(n.prototype),"toDataBindModel",this).call(this),c=s?[s]:[];return this.children.reduce(function(a,f){var y=f.toDataBindModel(o);if(Array.isArray(y)){var g=y.filter(function(_){return!!_});return vn(a).concat(vn(g))}return y&&a.push(y),a},c)},u.toSchema=function(){var o=k(V(n.prototype),"toSchema",this).call(this),s=this.children.map(function(c){var a=c.toSchema();return a});return ys(ds({},o),{children:s})},n}(M);gn.excludes=!1,gn.childrenMaxLength=Bs,S.LIST;function ut(e){return"children"in e&&ee(e.children)}function mn(e){return"headers"in e.props&&ee(e.props.headers)}function me(e,t){Array.isArray(e)&&e.map(r=>{r.type===p.SUBTABLE?me(r.props.headers,t):ut(r)?me(r==null?void 0:r.children,t):r.controlType===R.FORM&&t(r)})}const En=[p.AMOUNT,p.CALC,p.DATE_RANGE],bn={amount:{caption:"\u91D1\u989D",fieldType:S.DECIMAL},currency:{caption:"\u5E01\u79CD",fieldType:S.VARCHAR},result:{caption:"\u7ED3\u679C",fieldType:S.DECIMAL},unit:{caption:"\u5355\u4F4D",fieldType:S.VARCHAR},min:{caption:"\u5F00\u59CB\u65F6\u95F4",fieldType:S.TIMESTAMP},max:{caption:"\u7ED3\u675F\u65F6\u95F4",fieldType:S.TIMESTAMP}};function Ss(e){let t=[];return me(e,r=>{r.controlType===R.FORM?t.push(r):(r.type,p.SUBTABLE)}),t}function Cs(e,t=""){return!e||!Array.isArray(e)?[]:e.map(r=>{if(!r.dataBind||r.type===p.TITLE)return r;if(En.includes(r.type)){const n=r.dataBind;Object.keys(n).forEach(u=>{const i=n[u],o=r.controlId+"_"+u;i.fieldCode=_n(o),i.dataCode=t})}else r.dataBind.fieldCode=_n(r.controlId),r.dataBind.dataCode=t;return r})}function _n(e){const t="field_";return e.startsWith(t)?e:t+e}function Ee(e){return co[e]}function Is(e){const t=new q,r=[];return e.forEach(n=>{if(!(n.parentId||!n.dataBind))if(En.includes(n.type)){const u=n.dataBind,i=n.datasourceBind;Object.keys(u).forEach(o=>{const s=u[o],c=bn[o].fieldType,a=n.caption+"_"+bn[o].caption,f=Ee(c);if(!f)return;const y={caption:a,dataBind:s};o==="currency"&&(y.optionConfig="datasource",y.datasourceBind=i);const g=t.createControlInstance(f,{props:y});g&&r.push(g)})}else{const u=Ee(n.fieldType);if(!u)return;const i=t.createControlInstance(u,{props:{caption:n.caption,dataBind:n.dataBind,datasourceBind:n.datasourceBind}});i&&r.push(i)}}),r}function ws(e){const t=new q,n=(Array.isArray(e)?e:[e]).map(u=>{const i=Ee(u);return t.createControlInstance(i)});return Array.isArray(e)?n:n[0]}function it(e){return Array.isArray(e)?e.map(t=>t.toSchema()):e.toSchema()}function ot(e){return Array.isArray(e)?e.map(t=>t.toDataBindModel()).filter(t=>!!t).flat():e.toDataBindModel()}function at(e,t,r){return Bt(this,null,function*(){return Array.isArray(e)?(yield Promise.all(e.map(u=>u.validate(t,r)))).every(u=>u):yield e.validate(t,r)})}const Fs=[p.TITLE,p.GRID_TABLE_COLUMN,p.SUBTABLE_COLUMN,p.OPERATION_COLUMN,p.DATA_VIEW,p.LIST_VIEW,p.HEADER,p.FOOTER,p.SIMPLE_SEARCH,p.ROW,p.GRID_ROW,p.COL,p.GRID,p.DIVIDER,p.TAB_PANE,p.TAB,p.CARD_GROUP],Ds=[p.CALC],Rs={check:{id:"listPageCheckBtnId",caption:"\u67E5\u770B"},edit:{id:"listPageEditBtnId",caption:"\u7F16\u8F91"},delete:{id:"listPageDeleteBtnId",caption:"\u5220\u9664"}};function ae(e,t){var n,u,i,o,s,c,a,f,y;const r=[];if(ee(e))r.push(...e.map(g=>ae(g,t)).flat());else{const g=e.type,{caption:_,content:A}=e.props;let d;if(Fs.includes(g))g===p.OPERATION_COLUMN&&Object.entries(Rs).reduce((v,[l,{caption:h,id:C}])=>{var I;const b=e.props[l];return b&&b.isShow&&v.push({controlId:C,caption:h,type:e.type,controlType:e.controlType,parentId:(I=t==null?void 0:t.controlId)!=null?I:null,canEdit:!1,canRead:!1,canHide:!0,group:"element"}),v},r);else if(d={controlId:e.id,caption:_||A||e.name,type:e.type,controlType:e.controlType,parentId:(n=t==null?void 0:t.controlId)!=null?n:null,canEdit:!Ds.includes(g),canRead:!0,canHide:!0,group:"element"},t&&t.type===p.SUBTABLE&&(d.caption=t.caption+"_"+d.caption),g===p.VUE_FORM_ITEM&&(d.caption=e.props.controlExportName||e.name),(e.controlType===R.FORM||e.controlType===R.COLUMN)&&((i=(u=e.props)==null?void 0:u.dataBind)==null?void 0:i.fieldCode)!==void 0&&((s=(o=e.props)==null?void 0:o.dataBind)==null?void 0:s.fieldCode)!==""&&(d.group="field"),r.push(d),g===p.VUE_FORM_ITEM){let v="element";((a=(c=e.props)==null?void 0:c.dataBind)==null?void 0:a.fieldCode)!==void 0&&((y=(f=e.props)==null?void 0:f.dataBind)==null?void 0:y.fieldCode)!==""&&(v="field");const l=e.props.permissions;l==null||l.map(h=>{var C;d={controlId:h.key,caption:h.caption,type:e.type,controlType:e.controlType,parentId:(C=e.id)!=null?C:null,canEdit:!0,canRead:!0,canHide:!0,group:v},r.push(d)})}e.children&&r.push(...e.children.map(v=>ae(v,t)).flat()),e.controlType===R.LIST&&r.push(...e.props.headers.map(v=>ae(v,d)).flat())}return r}class q extends de{constructor(){super("Designer"),this.toolbox=[],this.services={},this.eventLogic=new te,this.fieldTypes=S,this.controlSettingMap=new Map,new.target.staticControls.forEach(t=>{const{Designer:r,Setting:n}=t;this.controlSettingMap.set(r.controlType,n)})}registerControl(t){this.constructor.register(t);const{Designer:r,Setting:n}=t;this.register(r),this.registeredControlTypes.add(r.controlType),this.controlSettingMap.set(r.controlType,n)}getControlSetting(t){const r=this.controlSettingMap.get(t);return r||null}setInstance(t,r,n){try{if(!t)return;t.updateProps(r,n)}catch(u){throw u}}eachControls(t){this.getControls().forEach(t)}getInitControl(){return[this.createControlInstance("grid")]}checkSchema(...t){return Bt(this,null,function*(){return at(...t)})}getModelBindInfoList(...t){return ot(...t)}getSchema(...t){return it(...t)}listenControlHook(...t){return Jt.on(...t)}}q.EventLogic=te;class Os{constructor(){this.designer=new q}ListPageBuilder(){const t=this.designer.createControlInstance(p.LIST_VIEW),r=this.designer.createControlInstance(p.SIMPLE_SEARCH),n=this.designer.createControlInstance(p.GRID_TABLE),u=this.designer.createControlInstance(p.CREATE_FORM_LIST_BUTTON),i=this.designer.createControlInstance(p.IMPORT_RECORD_LIST_BUTTON),o=this.designer.createControlInstance(p.EXPORT_LIST_BUTTON),s=this.designer.createControlInstance(p.EXPORT_RECORD_LIST_BUTTON);return n.children.push(u),n.children.push(i),n.children.push(o),n.children.push(s),t.children.push(r),t.children.push(n),t}ProListPageBuilder(){const t=this.designer.createControlInstance(p.LIST_VIEW);t.props.countType="async";const r=this.designer.createControlInstance(p.SIMPLE_SEARCH),n=this.designer.createControlInstance(p.GRID_TABLE),u=this.designer.createControlInstance(p.EXPORT_LIST_BUTTON),i=this.designer.createControlInstance(p.EXPORT_RECORD_LIST_BUTTON);return n.children.push(u),n.children.push(i),t.children.push(r),t.children.push(n),t}FormPageBuilder(){const t=this.designer.createControlInstance(p.DATA_VIEW),r=this.designer.createControlInstance(p.TITLE),n=this.designer.createControlInstance(p.GRID);return t.children.push(r),t.children.push(n),t}VuePageBuilder(){const t=this.designer.createControlInstance(p.GRID),r=this.designer.createControlInstance(p.VUE_FORM_ITEM);return r.props.isHideCaption=!0,r.props.controlExportName="VuePage",t.children.push(r),t}}function $s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ps(e,t,r){return t&&An(e.prototype,t),r&&An(e,r),e}var N=function(){function e(t){$s(this,e);var r;this.visible=(r=t==null?void 0:t.visible)!==null&&r!==void 0?r:!0;var n;this.expression=(n=t==null?void 0:t.expression)!==null&&n!==void 0?n:!1}return Ps(e,[{key:"isAtomicComponent",get:function(){return!0}}]),e}();function Ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ms=function(){function e(r){Ts(this,e),this.type=r.type,this.label=r.label,this.key=r.key,this.component=r.component;var n;this.effect=(n=r.effect)!==null&&n!==void 0?n:{};var u;this.scopeEffect=(u=r.scopeEffect)!==null&&u!==void 0?u:so,this.defaultValue=r.defaultValue,this.validator=r.validator;var i;this.props=(i=r.props)!==null&&i!==void 0?i:new N,this.effectKeys=Object.keys(this.effect)}var t=e.prototype;return t.filterEffects=function(n){var u=this;return n===""?Object.values(this.effect):this.effectKeys.filter(function(i){var o=new RegExp("^".concat(i,"(\\.\\w+)*$"));return o.test(n)}).map(function(i){return u.effect[i]})},t.callEffectFn=function(n,u){try{var i=n.apply(null,u);xe(i)&&Object.assign(this.props,i)}catch(o){Z(`effect error
2
+ `.concat(o))}},t.callEffect=function(n){for(var u=arguments.length,i=new Array(u>1?u-1:0),o=1;o<u;o++)i[o-1]=arguments[o];var s=this;this.filterEffects(n).forEach(function(c){return s.callEffectFn(c,i)})},t.callScopeEffect=function(){for(var n=arguments.length,u=new Array(n),i=0;i<n;i++)u[i]=arguments[i];this.callEffectFn(this.scopeEffect,u)},e}();function Ls(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var st=function e(t){Ls(this,e),this.type="group";var r;this.title=(r=t.title)!==null&&r!==void 0?r:"";var n;this.required=(n=t.required)!==null&&n!==void 0?n:!1,this.items=t.items,this.tips=t.tips};function xs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function js(e){return"type"in e&&e.type==="tab"}var ct=function e(t){xs(this,e),this.type="tab",this.title=t.title,this.items=t.items};function Bn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ns(e){if(Array.isArray(e))return e}function Us(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},be(e)}function qs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lt(e,t)}function Hs(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],u=!0,i=!1,o,s;try{for(r=r.call(e);!(u=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));u=!0);}catch(c){i=!0,s=c}finally{try{!u&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function ks(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ws(e,t){return t&&(zs(t)==="object"||typeof t=="function")?t:Us(e)}function lt(e,t){return lt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},lt(e,t)}function Gs(e,t){return Ns(e)||Hs(e,t)||Ks(e,t)||ks()}var zs=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Ks(e,t){if(!!e){if(typeof e=="string")return Bn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bn(e,t)}}function Xs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Js(e){var t=Xs();return function(){var n=be(e),u;if(t){var i=be(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Ws(this,u)}}var Qs=function(e){qs(r,e);var t=Js(r);function r(n){Vs(this,r);var u;return u=t.call(this,n),xe(n)&&Object.entries(n).forEach(function(i){var o=Gs(i,2),s=o[0],c=o[1];u[s]=c}),u}return r}(N);function Zs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ys(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_e(e)}function ec(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ft(e,t)}function tc(e,t){return t&&(nc(t)==="object"||typeof t=="function")?t:Zs(e)}function ft(e,t){return ft=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},ft(e,t)}var nc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function rc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function uc(e){var t=rc();return function(){var n=_e(e),u;if(t){var i=_e(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return tc(this,u)}}var ic=function(e){ec(r,e);var t=uc(r);function r(n){Ys(this,r);var u;u=t.call(this,n);var i;u.maxLength=(i=n==null?void 0:n.maxLength)!==null&&i!==void 0?i:"";var o;u.minLength=(o=n==null?void 0:n.minLength)!==null&&o!==void 0?o:"";var s;u.placeholder=(s=n==null?void 0:n.placeholder)!==null&&s!==void 0?s:"";var c;return u.i18n=(c=n==null?void 0:n.i18n)!==null&&c!==void 0?c:!1,u}return r}(N);function oc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ac(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ae(e)}function sc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pt(e,t)}function cc(e,t){return t&&(lc(t)==="object"||typeof t=="function")?t:oc(e)}function pt(e,t){return pt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},pt(e,t)}var lc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function fc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function pc(e){var t=fc();return function(){var n=Ae(e),u;if(t){var i=Ae(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return cc(this,u)}}var dc=function(e){sc(r,e);var t=pc(r);function r(n){ac(this,r);var u;u=t.call(this,n);var i;u.max=(i=n==null?void 0:n.max)!==null&&i!==void 0?i:"";var o;u.min=(o=n==null?void 0:n.min)!==null&&o!==void 0?o:"";var s;return u.placeholder=(s=n==null?void 0:n.placeholder)!==null&&s!==void 0?s:"",u}return r}(N);function hc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Be(e)}function vc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dt(e,t)}function gc(e,t){return t&&(mc(t)==="object"||typeof t=="function")?t:hc(e)}function dt(e,t){return dt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},dt(e,t)}var mc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Ec(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function bc(e){var t=Ec();return function(){var n=Be(e),u;if(t){var i=Be(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return gc(this,u)}}var _c=function(e){vc(r,e);var t=bc(r);function r(n){yc(this,r);var u;u=t.call(this,n);var i;u.showType=(i=n==null?void 0:n.showType)!==null&&i!==void 0?i:"switch";var o;u.tips=(o=n==null?void 0:n.tips)!==null&&o!==void 0?o:"";var s;return u.disabled=(s=n==null?void 0:n.disabled)!==null&&s!==void 0?s:!1,u}return r}(N);function Ac(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Se(e)}function Sc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ht(e,t)}function Cc(e,t){return t&&(Ic(t)==="object"||typeof t=="function")?t:Ac(e)}function ht(e,t){return ht=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},ht(e,t)}var Ic=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function wc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Fc(e){var t=wc();return function(){var n=Se(e),u;if(t){var i=Se(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Cc(this,u)}}var Dc=function(e){Sc(r,e);var t=Fc(r);function r(n){Bc(this,r);var u;u=t.call(this,n);var i;return u.options=(i=n==null?void 0:n.options)!==null&&i!==void 0?i:[],u}return r}(N);function Rc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ce(e)}function $c(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yt(e,t)}function Pc(e,t){return t&&(Tc(t)==="object"||typeof t=="function")?t:Rc(e)}function yt(e,t){return yt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},yt(e,t)}var Tc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Mc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Lc(e){var t=Mc();return function(){var n=Ce(e),u;if(t){var i=Ce(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Pc(this,u)}}var xc=function(e){$c(r,e);var t=Lc(r);function r(n){Oc(this,r);var u;u=t.call(this,n);var i;u.placeholder=(i=n==null?void 0:n.placeholder)!==null&&i!==void 0?i:"";var o;return u.options=(o=n==null?void 0:n.options)!==null&&o!==void 0?o:[],u}return r}(N);function jc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ie(e)}function Uc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vt(e,t)}function Vc(e,t){return t&&(qc(t)==="object"||typeof t=="function")?t:jc(e)}function vt(e,t){return vt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},vt(e,t)}var qc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Hc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function kc(e){var t=Hc();return function(){var n=Ie(e),u;if(t){var i=Ie(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Vc(this,u)}}var Wc=function(e){Uc(r,e);var t=kc(r);function r(n){Nc(this,r);var u;u=t.call(this,n);var i;u.options=(i=n==null?void 0:n.options)!==null&&i!==void 0?i:[];var o;return u.showType=(o=n==null?void 0:n.showType)!==null&&o!==void 0?o:"outline",u}return r}(N);function Gc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},we(e)}function Kc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}function Xc(e,t){return t&&(Jc(t)==="object"||typeof t=="function")?t:Gc(e)}function gt(e,t){return gt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},gt(e,t)}var Jc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Qc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Zc(e){var t=Qc();return function(){var n=we(e),u;if(t){var i=we(this).constructor;u=Reflect.construct(n,arguments,i)}else u=n.apply(this,arguments);return Xc(this,u)}}var Yc=function(e){Kc(r,e);var t=Zc(r);function r(n){zc(this,r);var u;u=t.call(this,n);var i;u.maxLength=(i=n==null?void 0:n.maxLength)!==null&&i!==void 0?i:"";var o;u.minLength=(o=n==null?void 0:n.minLength)!==null&&o!==void 0?o:"";var s;u.placeholder=(s=n==null?void 0:n.placeholder)!==null&&s!==void 0?s:"";var c;u.maxRows=(c=n==null?void 0:n.maxRows)!==null&&c!==void 0?c:"";var a;u.minRows=(a=n==null?void 0:n.minRows)!==null&&a!==void 0?a:"";var f;return u.i18n=(f=n==null?void 0:n.i18n)!==null&&f!==void 0?f:!1,u}return r}(N);function el(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable}))),n.forEach(function(u){el(e,u,r[u])})}return e}function tl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Et(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tl(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function nl(e,t){switch(e){case"input":return new ic(t);case"textarea":return new Yc(t);case"input-number":return new dc(t);case"switch":return new _c(t);case"radio":return new Wc(t);case"checkbox":return new Dc(t);case"select":return new xc(t);default:return new Qs(t)}}function rl(e){return function(t){var r=e.get(t);if(!!r)return new Ms(Et(mt({},r),{props:nl(r.component,"props"in r?r.props:void 0)}))}}function ul(e){var t=function(i){return new st(Et(mt({},i),{items:i.items.map(rl(n)).filter(Boolean)}))},r=function(i){return i.map(t)},n=e.fields.reduce(function(u,i){return u.set(i.key,i),u},new Map);return e.groups.map(function(u){return js(u)?new ct(Et(mt({},u),{items:r(u.items)})):t(u)})}class Sn{constructor(t){var r;this.selected=null,this.selectedInstanceDataScopeParent=null,this.selectedDataScopeFlatInstances=[],this.selectedInstanceSetting=[],this.selectedInstanceSettingItems=[],this.selectedFieldItem=null,this.external={},this.movingInstance=null,this.movingInstanceOldParent=null,this.movingInstanceOldDataScopeParent=null,this.getParentBeforeInstanceMove=(r=t.getParentBeforeInstanceMove)!=null?r:n=>n.parent,this.instance=t.instance,this.getFlatInstances()}get selectedRules(){return this.selected?this.selected.rules:null}get selectedAntdRules(){const t=this.selectedRules;return t||null}setInstances(t){this.instance=t,this.getFlatInstances()}setSelectInstance(t){this.selected=t,this.selectedInstanceDataScopeParent=t?ce(t):null,this.selectedDataScopeFlatInstances=this.selectedInstanceDataScopeParent?wn(this.selectedInstanceDataScopeParent):[]}setSelectInstanceSettings(t){this.selectedInstanceSetting=t,this.selectedInstanceSettingItems=[],this.selectedInstanceSetting.forEach(r=>{this.selectedInstanceSettingItems.push(...this.getSettingItems(r))})}getSettingItems(t){return t instanceof st?t.items:t.items.reduce((r,n)=>(r.push(...n.items),r),[])}setSelectedFieldItem(t){this.selectedFieldItem=t}setMovingInstance(t){this.movingInstance=t,this.movingInstanceOldParent=t?this.getParentBeforeInstanceMove(t):null,this.movingInstanceOldDataScopeParent=ce(t)}updateDataFieldCodeMap(t){const r=ce(t);if(!r)return;const n=this.dataFieldCodeMap.get(r.props.datasourceBind.dataCode);if(!!n){for(const[u,i]of n.entries())if(i.id===t.id){n.delete(u);break}In(t,this.dataFieldCodeMap)}}getFlatInstances(){const t=[],r=new Map,n=new Map;se(this.instance,u=>{t.push(u),r.set(u.id,u),In(u,n)}),this.flatInstances=t,this.instanceIdMap=r,this.dataFieldCodeMap=n}}function Cn(e,t,r){const{dataCode:n,fieldCode:u}=t;n&&u&&(e.has(n)||e.set(n,new Map),e.get(n).set(u,r))}function In(e,t){if(e.controlType===R.FORM){const r=e.props.dataBind;r instanceof Wo?Cn(t,r,e):Object.values(r).forEach(n=>{Cn(t,n,e)})}}function se(e,t){(Array.isArray(e)?e:[e]).forEach(n=>{t(n),ut(n)&&se(n.children,t),mn(n)&&se(n.props.headers,t)})}function bt(e){return[p.SUBTABLE,p.DATA_VIEW,p.LIST_VIEW].includes(e.type)}function ce(e){let t=e?e.parent:null;if(!t)return null;for(;t&&!bt(t);)t=t.parent;return t}function wn(e){const t=[e];return se(e,r=>{r!==e&&t.includes(r.parent)&&!bt(r)&&t.push(r)}),t}let _t="";class Fn extends Nt{constructor(t){super(),this.isMounted=!1,this.id=Oe(8),this.__pluginsApplied=!1,this.getSchema=it,this.getModelBindInfoList=ot,this.generatePermissions=ae,this.$options=Object.freeze(t);const{autoMount:r=!1,Designer:n=q,schema:u,mode:i="form",store:o={}}=this.$options;this.eventLogic=new te,this.designer=new n,this.store=new Sn(z({instance:this.designer.createControl(Array.isArray(u)?u:[u])},o)),this.mode=i,r&&this.mount()}mount(){const{plugins:t=[]}=this.$options;this.__plugins=t,this.applyPlugins(),this.isMounted=!0}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var r;try{_t=(r=t.pluginName)!=null?r:t.constructor.name,t.apply(this),_t=""}catch(n){Z(`${_t||t.constructor.name} Plugin apply Error
3
+ ${n}`)}}),this.__pluginsApplied=!0)}emit(t,...r){return super.emit(t,r)}on(t,r){return super.on(t,r)}setInstances(t,r){this.store.setInstances(this.designer.createControl(Array.isArray(t)?t:[t],r))}beforeSelectInstance(){this.store.setSelectInstance(null),this.setSelectedFieldItem(null),this.store.setSelectInstanceSettings([])}afterSelectInstance(){const t=this.store.selected;!t||(this.setSelectedInstanceSetting(),this.emit("select",{instance:t}))}setSelectedInstanceSetting(){var u,i;const t=this.store.selected;if(!t)return;let r=this.getControlSetting(t.type);if(((u=t.parent)==null?void 0:u.controlType)===R.WRAP){const o=this.getControlSetting((i=t.parent)==null?void 0:i.type);r=this.concatSetting(r,o,t.parent.id)}this.store.setSelectInstanceSettings(r),this.callSelectedEffect("");const n={from:null,current:this.store.selectedInstanceDataScopeParent,oldParent:null,newParent:t.parent};this.callSelectedScopeEffect(n)}concatSetting(t,r,n){var i,o,s,c;let u=t;if(((i=t[0])==null?void 0:i.type)==="tab"&&((o=r[0])==null?void 0:o.type)==="tab"){const a=t,f=r.slice(0);u=a.map((y,g)=>{const _=new ct(y),A=f.findIndex(v=>v.title===y.title);if(A===-1)return _;const d=f.splice(A,1)[0];return d&&(_.items=[...this.formatGroupSetting(d.items,n),..._.items]),_}),f.length&&(u=[...u,...f.map(y=>this.formatGroupSetting(y,n))])}else if(((s=t[0])==null?void 0:s.type)==="group"&&((c=r[0])==null?void 0:c.type)==="group"){const a=t,f=r;u=[...this.formatGroupSetting(f,n),...a]}return u}formatGroupSetting(t,r){if(ee(t))return t.map(n=>{const u=new st(n);return u.fromId=r,u});{const n=new ct(t);return n.items=this.formatGroupSetting(n.items,r),n}}setControlConfig(...t){return this.designer.registerControlConfig(...t)}getControlConfig(t){return this.designer.getControlConfig(t)}getControlSetting(t){const r=this.designer.getControlSetting(t);return r?ul(r):[]}selectInstance(t){this.beforeSelectInstance(),this.store.setSelectInstance(t),this.afterSelectInstance()}setSelectedFieldItem(t){this.store.setSelectedFieldItem(t),this.callSelectedEffect("dataBind",{fieldItem:t})}moveStart(t){const r=this.getInstance(t);r&&this.store.setMovingInstance(r)}moveEnd(t=this.store.movingInstance){var c;if(t===null)return;const r=this.getInstance(t);if(!r)return;const n=this.store.movingInstanceOldDataScopeParent,u=ce(r),i=this.store.movingInstanceOldParent,o=r.parent;this.store.setMovingInstance(null),r.id!==((c=this.store.selected)==null?void 0:c.id)?this.selectInstance(r):this.store.setSelectInstance(r),this.store.getFlatInstances();const s={from:n,current:u,oldParent:i,newParent:o};this.callSelectedScopeEffect(s),i?this.emit("moved",z({},s)):this.emit("joined",z({},s))}createInstance(t,r){return this.designer.createControlInstance(t,r)}getInstance(t){return typeof t=="string"?this.store.instanceIdMap.get(t):t}getInstances(){return this.store.flatInstances}getInstancesFromType(t){return this.getInstances().filter(r=>r.type===t)}getDataScopeInstances(){return this.store.selectedDataScopeFlatInstances}getDataScopeInstancesFromType(t){return this.getDataScopeInstances().filter(r=>r.type===t)}updateInstancePropValue(t,r,n,u){var o;!Lt(t.props,r,n)||(r.startsWith("dataBind")&&this.store.updateDataFieldCodeMap(t),t.id===((o=this.store.selected)==null?void 0:o.id)&&this.callSelectedEffect(r,u),this.emit("updated",{instance:t,propName:r,value:n}))}updateInstanceProps(t,r,n,u=""){Object.entries(r).forEach(([i,o])=>{const s=`${u?u+".":""}${i}`;Po(o)?this.updateInstanceProps(t,o,n,s):this.updateInstancePropValue(t,s,o,n)})}setInstance(t,r,n,u){je(r)?this.updateInstancePropValue(t,String(r),n,u):this.updateInstanceProps(t,r,n)}removeInstance(t){const r=t.parent;if(!r)return;const n=r.controlType===R.LIST&&r.props.headers.includes(t)?r.props.headers:r.children,u=n.findIndex(i=>i===t);u>-1&&n.splice(u,1),this.store.getFlatInstances(),this.emit("removed",{instance:t,index:u,parent:r})}replaceInstance(t,r){const n=t.parent;if(!n)return;const u=n.controlType===R.LIST&&n.props.headers.includes(t)?n.props.headers:n.children,i=u.findIndex(o=>o===t);i>-1&&u.splice(i,1,r),this.store.getFlatInstances()}updateInstanceType(t,r){const n=t.toSchema(),u=this.createInstance(r,{id:n.id,props:n.props});if(!u){pe(`can\u2018t update instance type to ${r}`);return}return u}validate(t,r){return at(this.store.instance,t,r)}getCustomControlsInUse(){return this.getInstances().filter(this.assertInstanceIsCustomControl).reduce((t,r)=>(t.includes(r.type)||t.push(r.type),t),[])}assertInstanceIsCustomControl(t){return!To(je(t)?t:t.type)}static register(...t){return q.register(...t),this}static judgeControlIsRegistered(t){return q.staticRegisteredTypes.has(t.Designer.controlType)}judgeControlIsRegistered(t){return this.designer.registeredControlTypes.has(t.Designer.controlType)}register(...t){return this.designer.registerControl(...t),this}assertInstance(t,r){return je(r)?t.type===r:r.includes(t.type)}getInstanceInListControl(t){let r=t;for(;r;){if(r.controlType===R.LIST)return!0;r=r.parent}return!1}getInstanceParentControl(t,r){if(!!t.parent)return this.assertInstance(t.parent,r)?t.parent:this.getInstanceParentControl(t.parent,r)}callSelectedEffect(t,r={}){this.store.selectedInstanceSettingItems.forEach(n=>{n.callEffect(t,this,z({control:this.store.selected},r))})}callSelectedScopeEffect(t={}){this.store.selectedInstanceSettingItems.forEach(r=>{r.callScopeEffect(this,z({control:this.store.selected},t))})}}Fn.EventLogic=te,E.Builder=Os,E.Designer=q,E.Driven=Fn,E.Store=Sn,E.checkSchema=at,E.fillModelBindInfoListFieldCode=Cs,E.findInstanceDataScopeParent=ce,E.generatePermissions=ae,E.getColumnTypeFromFiledType=Ee,E.getColumnsFromFiledType=ws,E.getColumnsFromModelBindInfoList=Is,E.getDataScopeFlatInstances=wn,E.getMasterFormControls=Ss,E.getModelBindInfoList=ot,E.hasChildrenControl=ut,E.hasHeaderControl=mn,E.isDataScopeInstance=bt,E.loop=se,E.loopFormControl=me,E.toSchema=it,Object.defineProperty(E,"__esModule",{value:!0})});
@@ -31,6 +31,6 @@ export default class Designer<EventKeys extends string = string> extends Registe
31
31
  checkSchema(...args: Parameters<typeof checkSchema>): Promise<ReturnType<typeof checkSchema>>;
32
32
  getModelBindInfoList(...args: Parameters<typeof getModelBindInfoList>): ReturnType<typeof getModelBindInfoList>;
33
33
  getSchema(...args: Parameters<typeof toSchema>): ReturnType<typeof toSchema>;
34
- listenControlHook(...args: Parameters<typeof controlHooksEmitter['on']>): ReturnType<typeof controlHooksEmitter['on']>;
34
+ listenControlHook(...args: Parameters<(typeof controlHooksEmitter)['on']>): ReturnType<(typeof controlHooksEmitter)['on']>;
35
35
  }
36
36
  export { ToolboxType, DesignerServices, Designer };
@@ -6,8 +6,8 @@ import { Plugin } from './Plugin';
6
6
  import { DesignerControl, ControlDesignerInstance, ControlsKeys, Schema, DeepPartial, Messages, BeforeCreateInstance } from '@byteluck-fe/model-driven-core';
7
7
  import { generatePermissions, getModelBindInfoList, toSchema } from './utils';
8
8
  import { Settings } from '@byteluck-fe/model-driven-settings';
9
- declare type EventKeys = 'before-validate' | 'validated' | 'updated' | 'joined' | 'moved' | 'removed' | 'select' | 'field-changed';
10
- declare type SchemaBaseType = Schema<ControlsKeys>;
9
+ type EventKeys = 'before-validate' | 'validated' | 'updated' | 'joined' | 'moved' | 'removed' | 'select' | 'field-changed';
10
+ type SchemaBaseType = Schema<ControlsKeys>;
11
11
  interface DrivenOptions {
12
12
  autoMount?: boolean;
13
13
  plugins?: Plugin[];
@@ -5,7 +5,7 @@ export interface StoreOptions {
5
5
  instance: DesignerControl[];
6
6
  getParentBeforeInstanceMove?: (instance: DesignerControl) => DesignerControl | null;
7
7
  }
8
- declare type DataScopeControl = ControlDesignerInstance<'data-view' | 'subtable' | 'list-view'> | null;
8
+ type DataScopeControl = ControlDesignerInstance<'data-view' | 'subtable' | 'list-view'> | null;
9
9
  export declare class Store {
10
10
  /**
11
11
  * 页面控件实例树
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-driven",
3
- "version": "2.3.1-beta.2",
3
+ "version": "2.3.1-beta.23",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -26,10 +26,10 @@
26
26
  "postpublish": "node ../../scripts/postpublish.js"
27
27
  },
28
28
  "dependencies": {
29
- "@byteluck-fe/model-driven-controls": "2.3.1-beta.2",
30
- "@byteluck-fe/model-driven-core": "2.3.1-beta.2",
31
- "@byteluck-fe/model-driven-settings": "2.3.1-beta.2",
32
- "@byteluck-fe/model-driven-shared": "2.3.1-beta.2"
29
+ "@byteluck-fe/model-driven-controls": "2.3.1-beta.23",
30
+ "@byteluck-fe/model-driven-core": "2.3.1-beta.23",
31
+ "@byteluck-fe/model-driven-settings": "2.3.1-beta.23",
32
+ "@byteluck-fe/model-driven-shared": "2.3.1-beta.23"
33
33
  },
34
- "gitHead": "7327a79615276a22409097664726fb74867a7d89"
34
+ "gitHead": "ae14e16a974498394d4d7a496cfc151eaa166b58"
35
35
  }