@ibiz-template/runtime 0.5.7-alpha.2 → 0.5.7-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/index.esm.js +2384 -278
  2. package/dist/index.system.min.js +1 -1
  3. package/out/app-hub.d.ts +2 -0
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +2 -0
  6. package/out/application.d.ts +7 -0
  7. package/out/application.d.ts.map +1 -1
  8. package/out/application.js +23 -10
  9. package/out/constant/index.d.ts +1 -0
  10. package/out/constant/index.d.ts.map +1 -1
  11. package/out/constant/index.js +1 -0
  12. package/out/constant/preset-identifier.d.ts +15 -0
  13. package/out/constant/preset-identifier.d.ts.map +1 -0
  14. package/out/constant/preset-identifier.js +16 -0
  15. package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
  16. package/out/controller/common/editor/editor.controller.js +4 -0
  17. package/out/controller/control/exp-bar/exp-bar.controller.d.ts.map +1 -1
  18. package/out/controller/control/exp-bar/exp-bar.controller.js +7 -0
  19. package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts +5 -0
  20. package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
  21. package/out/controller/control/exp-bar/tree-exp-bar.controller.js +16 -0
  22. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +23 -1
  23. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -1
  24. package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +56 -4
  25. package/out/controller/notification/async-action.controller.d.ts +64 -0
  26. package/out/controller/notification/async-action.controller.d.ts.map +1 -0
  27. package/out/controller/notification/async-action.controller.js +141 -0
  28. package/out/controller/notification/index.d.ts +2 -0
  29. package/out/controller/notification/index.d.ts.map +1 -0
  30. package/out/controller/notification/index.js +1 -0
  31. package/out/controller/notification/internal-message.controller.d.ts +23 -0
  32. package/out/controller/notification/internal-message.controller.d.ts.map +1 -0
  33. package/out/controller/notification/internal-message.controller.js +50 -0
  34. package/out/controller/notification/notice.controller.d.ts +10 -0
  35. package/out/controller/notification/notice.controller.d.ts.map +1 -0
  36. package/out/controller/notification/notice.controller.js +13 -0
  37. package/out/global/global-util/global-util.d.ts +17 -1
  38. package/out/global/global-util/global-util.d.ts.map +1 -1
  39. package/out/global/global-util/global-util.js +17 -1
  40. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -1
  41. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  42. package/out/interface/common/i-app-service/i-app-service.d.ts +16 -1
  43. package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
  44. package/out/interface/common/i-popover-options/i-popover-options.d.ts +9 -1
  45. package/out/interface/common/i-popover-options/i-popover-options.d.ts.map +1 -1
  46. package/out/interface/controller/controller/index.d.ts +1 -0
  47. package/out/interface/controller/controller/index.d.ts.map +1 -1
  48. package/out/interface/controller/controller/index.js +1 -0
  49. package/out/interface/controller/controller/notice/i-async-action.controller.d.ts +49 -0
  50. package/out/interface/controller/controller/notice/i-async-action.controller.d.ts.map +1 -0
  51. package/out/interface/controller/controller/notice/i-async-action.controller.js +1 -0
  52. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +68 -0
  53. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -0
  54. package/out/interface/controller/controller/notice/i-internal-message.controller.js +1 -0
  55. package/out/interface/controller/controller/notice/i-notice.controller.d.ts +33 -0
  56. package/out/interface/controller/controller/notice/i-notice.controller.d.ts.map +1 -0
  57. package/out/interface/controller/controller/notice/i-notice.controller.js +1 -0
  58. package/out/interface/controller/controller/notice/index.d.ts +4 -0
  59. package/out/interface/controller/controller/notice/index.d.ts.map +1 -0
  60. package/out/interface/controller/controller/notice/index.js +1 -0
  61. package/out/interface/provider/i-async-action.provider.d.ts +11 -3
  62. package/out/interface/provider/i-async-action.provider.d.ts.map +1 -1
  63. package/out/interface/provider/i-internal-message.provider.d.ts +10 -2
  64. package/out/interface/provider/i-internal-message.provider.d.ts.map +1 -1
  65. package/out/interface/util/i-animation-util/i-animation-options.d.ts +31 -0
  66. package/out/interface/util/i-animation-util/i-animation-options.d.ts.map +1 -0
  67. package/out/interface/util/i-animation-util/i-animation-options.js +1 -0
  68. package/out/interface/util/i-notice-util/i-notice-util.d.ts +34 -0
  69. package/out/interface/util/i-notice-util/i-notice-util.d.ts.map +1 -0
  70. package/out/interface/util/i-notice-util/i-notice-util.js +1 -0
  71. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +2 -2
  72. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
  73. package/out/interface/util/index.d.ts +2 -0
  74. package/out/interface/util/index.d.ts.map +1 -1
  75. package/out/register/helper/async-action-register.d.ts +2 -1
  76. package/out/register/helper/async-action-register.d.ts.map +1 -1
  77. package/out/register/helper/async-action-register.js +3 -3
  78. package/out/register/helper/internal-message-register.js +2 -2
  79. package/out/service/dto/method.dto.d.ts.map +1 -1
  80. package/out/service/dto/method.dto.js +11 -0
  81. package/out/service/mqtt/mqtt.service.d.ts.map +1 -1
  82. package/out/service/mqtt/mqtt.service.js +1 -0
  83. package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
  84. package/out/service/service/auth/v7-auth.service.js +4 -0
  85. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  86. package/out/service/service/entity/method/de-action.js +4 -4
  87. package/out/service/service/internal-message/internal-message.service.d.ts +1 -1
  88. package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -1
  89. package/out/service/service/internal-message/internal-message.service.js +7 -16
  90. package/out/service/utils/de-cache/de-cache.d.ts +2 -4
  91. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  92. package/out/service/utils/de-cache/de-cache.js +4 -8
  93. package/out/service/utils/dyna-sys-params/dyna-sys-params.d.ts +21 -0
  94. package/out/service/utils/dyna-sys-params/dyna-sys-params.d.ts.map +1 -0
  95. package/out/service/utils/dyna-sys-params/dyna-sys-params.js +48 -0
  96. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  97. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +9 -5
  98. package/out/service/utils/index.d.ts +1 -0
  99. package/out/service/utils/index.d.ts.map +1 -1
  100. package/out/service/utils/index.js +1 -0
  101. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  102. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +8 -0
  103. package/out/types.d.ts +8 -1
  104. package/out/types.d.ts.map +1 -1
  105. package/out/ui-action/uiaction-util.d.ts +23 -0
  106. package/out/ui-action/uiaction-util.d.ts.map +1 -1
  107. package/out/ui-action/uiaction-util.js +39 -1
  108. package/out/utils/anime/anime-element-util.d.ts +44 -0
  109. package/out/utils/anime/anime-element-util.d.ts.map +1 -0
  110. package/out/utils/anime/anime-element-util.js +108 -0
  111. package/out/utils/anime/anime-util/anime-util.d.ts +60 -0
  112. package/out/utils/anime/anime-util/anime-util.d.ts.map +1 -0
  113. package/out/utils/anime/anime-util/anime-util.js +96 -0
  114. package/out/utils/anime/anime.d.ts +27 -0
  115. package/out/utils/anime/anime.d.ts.map +1 -0
  116. package/out/utils/anime/anime.js +86 -0
  117. package/out/utils/anime/index.d.ts +2 -0
  118. package/out/utils/anime/index.d.ts.map +1 -0
  119. package/out/utils/anime/index.js +1 -0
  120. package/out/utils/file-util/file-util.d.ts +57 -0
  121. package/out/utils/file-util/file-util.d.ts.map +1 -0
  122. package/out/utils/file-util/file-util.js +113 -0
  123. package/out/utils/file-util/index.d.ts +2 -0
  124. package/out/utils/file-util/index.d.ts.map +1 -0
  125. package/out/utils/file-util/index.js +1 -0
  126. package/out/utils/index.d.ts +2 -0
  127. package/out/utils/index.d.ts.map +1 -1
  128. package/out/utils/index.js +2 -0
  129. package/package.json +9 -5
  130. package/src/app-hub.ts +3 -0
  131. package/src/application.ts +31 -16
  132. package/src/constant/index.ts +1 -0
  133. package/src/constant/preset-identifier.ts +15 -0
  134. package/src/controller/common/editor/editor.controller.ts +11 -1
  135. package/src/controller/control/exp-bar/exp-bar.controller.ts +6 -0
  136. package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +17 -0
  137. package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +68 -4
  138. package/src/controller/notification/async-action.controller.ts +163 -0
  139. package/src/controller/notification/index.ts +1 -0
  140. package/src/controller/notification/internal-message.controller.ts +64 -0
  141. package/src/controller/notification/notice.controller.ts +16 -0
  142. package/src/global/global-util/global-util.ts +20 -0
  143. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -1
  144. package/src/interface/common/i-app-service/i-app-service.ts +18 -0
  145. package/src/interface/common/i-popover-options/i-popover-options.ts +10 -1
  146. package/src/interface/controller/controller/index.ts +1 -0
  147. package/src/interface/controller/controller/notice/i-async-action.controller.ts +52 -0
  148. package/src/interface/controller/controller/notice/i-internal-message.controller.ts +74 -0
  149. package/src/interface/controller/controller/notice/i-notice.controller.ts +36 -0
  150. package/src/interface/controller/controller/notice/index.ts +9 -0
  151. package/src/interface/provider/i-async-action.provider.ts +14 -3
  152. package/src/interface/provider/i-internal-message.provider.ts +10 -2
  153. package/src/interface/util/i-animation-util/i-animation-options.ts +34 -0
  154. package/src/interface/util/i-notice-util/i-notice-util.ts +34 -0
  155. package/src/interface/util/i-open-view-util/i-open-view-util.ts +2 -1
  156. package/src/interface/util/index.ts +2 -0
  157. package/src/register/helper/async-action-register.ts +4 -4
  158. package/src/register/helper/internal-message-register.ts +2 -2
  159. package/src/service/dto/method.dto.ts +16 -0
  160. package/src/service/mqtt/mqtt.service.ts +1 -0
  161. package/src/service/service/auth/v7-auth.service.ts +5 -0
  162. package/src/service/service/entity/method/de-action.ts +2 -12
  163. package/src/service/service/internal-message/internal-message.service.ts +12 -18
  164. package/src/service/utils/de-cache/de-cache.ts +4 -18
  165. package/src/service/utils/dyna-sys-params/dyna-sys-params.ts +66 -0
  166. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +9 -6
  167. package/src/service/utils/index.ts +1 -0
  168. package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +8 -0
  169. package/src/types.ts +9 -0
  170. package/src/ui-action/uiaction-util.ts +48 -1
  171. package/src/utils/anime/anime-element-util.ts +141 -0
  172. package/src/utils/anime/anime-util/anime-util.ts +123 -0
  173. package/src/utils/anime/anime.ts +111 -0
  174. package/src/utils/anime/index.ts +1 -0
  175. package/src/utils/file-util/file-util.ts +141 -0
  176. package/src/utils/file-util/index.ts +1 -0
  177. package/src/utils/index.ts +2 -0
package/dist/index.esm.js CHANGED
@@ -76,7 +76,7 @@ var RegisterCenter = class {
76
76
  };
77
77
 
78
78
  // src/command/app/app-func/app-func.ts
79
- import { ModelError as ModelError16, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
79
+ import { ModelError as ModelError16, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
80
80
 
81
81
  // src/utils/error-handler/default-error-handler.ts
82
82
  import {
@@ -1073,10 +1073,10 @@ function getViewEngines(view) {
1073
1073
  if (viewLayoutPanel) {
1074
1074
  appViewEngines.push(...viewLayoutPanel.appViewEngines || []);
1075
1075
  }
1076
- return appViewEngines.filter((engine) => {
1077
- switch (engine.engineCat) {
1076
+ return appViewEngines.filter((engine2) => {
1077
+ switch (engine2.engineCat) {
1078
1078
  case "CTRL":
1079
- ibiz.log.warn("\u672A\u652F\u6301\u7684\u5F15\u64CE\u5206\u7C7B\uFF1A".concat(engine.engineType));
1079
+ ibiz.log.warn("\u672A\u652F\u6301\u7684\u5F15\u64CE\u5206\u7C7B\uFF1A".concat(engine2.engineType));
1080
1080
  return false;
1081
1081
  default:
1082
1082
  return true;
@@ -2644,6 +2644,12 @@ var ViewType = /* @__PURE__ */ ((ViewType2) => {
2644
2644
  return ViewType2;
2645
2645
  })(ViewType || {});
2646
2646
 
2647
+ // src/constant/preset-identifier.ts
2648
+ var PresetIdentifier = /* @__PURE__ */ ((PresetIdentifier2) => {
2649
+ PresetIdentifier2["MESSAGE"] = "preset-message";
2650
+ return PresetIdentifier2;
2651
+ })(PresetIdentifier || {});
2652
+
2647
2653
  // src/utils/modal/modal.ts
2648
2654
  var Modal = class {
2649
2655
  constructor(opts) {
@@ -3236,8 +3242,1726 @@ async function handleAllSettled(values, isThrow = true) {
3236
3242
  return successResult;
3237
3243
  }
3238
3244
 
3245
+ // src/utils/anime/anime-element-util.ts
3246
+ var baseStyle = {
3247
+ position: "fixed",
3248
+ zIndex: "10000"
3249
+ };
3250
+ function cloneElement(clone32, teleport = document.body, isRemoveChild = true) {
3251
+ const element = getAnimationElement(clone32);
3252
+ if (element == null) {
3253
+ throw new Error("Cannot clone a null or undefined element.");
3254
+ }
3255
+ const clonedElement = element.cloneNode(true);
3256
+ if (isRemoveChild) {
3257
+ while (clonedElement.firstChild) {
3258
+ clonedElement.removeChild(clonedElement.firstChild);
3259
+ }
3260
+ }
3261
+ const styles = getElementAttribute(element);
3262
+ setElementStyle(clonedElement, styles);
3263
+ teleport.appendChild(clonedElement);
3264
+ return clonedElement;
3265
+ }
3266
+ function setElementStyle(element, {
3267
+ width,
3268
+ height,
3269
+ boundingLeft,
3270
+ boundingTop
3271
+ }) {
3272
+ element.style.left = "".concat(boundingLeft, "px");
3273
+ element.style.top = "".concat(boundingTop, "px");
3274
+ element.style.width = "".concat(width, "px");
3275
+ element.style.height = "".concat(height, "px");
3276
+ Object.assign(element.style, baseStyle);
3277
+ }
3278
+ function getElementAttribute(element) {
3279
+ const width = element.offsetWidth;
3280
+ const height = element.offsetHeight;
3281
+ const styles = window.getComputedStyle(element);
3282
+ const padding = parseFloat(styles.padding);
3283
+ const { left: boundingLeft, top: boundingTop } = element.getBoundingClientRect();
3284
+ return {
3285
+ width,
3286
+ height,
3287
+ padding,
3288
+ boundingLeft,
3289
+ boundingTop
3290
+ };
3291
+ }
3292
+ function getAnimationElement(element) {
3293
+ if (typeof element === "string") {
3294
+ return document.querySelector(element);
3295
+ }
3296
+ return element;
3297
+ }
3298
+ function destroyElement(ele) {
3299
+ if (ele) {
3300
+ ele.remove();
3301
+ }
3302
+ }
3303
+
3304
+ // ../../node_modules/.pnpm/animejs@3.2.2/node_modules/animejs/lib/anime.es.js
3305
+ var defaultInstanceSettings = {
3306
+ update: null,
3307
+ begin: null,
3308
+ loopBegin: null,
3309
+ changeBegin: null,
3310
+ change: null,
3311
+ changeComplete: null,
3312
+ loopComplete: null,
3313
+ complete: null,
3314
+ loop: 1,
3315
+ direction: "normal",
3316
+ autoplay: true,
3317
+ timelineOffset: 0
3318
+ };
3319
+ var defaultTweenSettings = {
3320
+ duration: 1e3,
3321
+ delay: 0,
3322
+ endDelay: 0,
3323
+ easing: "easeOutElastic(1, .5)",
3324
+ round: 0
3325
+ };
3326
+ var validTransforms = ["translateX", "translateY", "translateZ", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "perspective", "matrix", "matrix3d"];
3327
+ var cache = {
3328
+ CSS: {},
3329
+ springs: {}
3330
+ };
3331
+ function minMax(val, min, max) {
3332
+ return Math.min(Math.max(val, min), max);
3333
+ }
3334
+ function stringContains(str, text) {
3335
+ return str.indexOf(text) > -1;
3336
+ }
3337
+ function applyArguments(func, args) {
3338
+ return func.apply(null, args);
3339
+ }
3340
+ var is = {
3341
+ arr: function(a) {
3342
+ return Array.isArray(a);
3343
+ },
3344
+ obj: function(a) {
3345
+ return stringContains(Object.prototype.toString.call(a), "Object");
3346
+ },
3347
+ pth: function(a) {
3348
+ return is.obj(a) && a.hasOwnProperty("totalLength");
3349
+ },
3350
+ svg: function(a) {
3351
+ return a instanceof SVGElement;
3352
+ },
3353
+ inp: function(a) {
3354
+ return a instanceof HTMLInputElement;
3355
+ },
3356
+ dom: function(a) {
3357
+ return a.nodeType || is.svg(a);
3358
+ },
3359
+ str: function(a) {
3360
+ return typeof a === "string";
3361
+ },
3362
+ fnc: function(a) {
3363
+ return typeof a === "function";
3364
+ },
3365
+ und: function(a) {
3366
+ return typeof a === "undefined";
3367
+ },
3368
+ nil: function(a) {
3369
+ return is.und(a) || a === null;
3370
+ },
3371
+ hex: function(a) {
3372
+ return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a);
3373
+ },
3374
+ rgb: function(a) {
3375
+ return /^rgb/.test(a);
3376
+ },
3377
+ hsl: function(a) {
3378
+ return /^hsl/.test(a);
3379
+ },
3380
+ col: function(a) {
3381
+ return is.hex(a) || is.rgb(a) || is.hsl(a);
3382
+ },
3383
+ key: function(a) {
3384
+ return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== "targets" && a !== "keyframes";
3385
+ }
3386
+ };
3387
+ function parseEasingParameters(string) {
3388
+ var match = /\(([^)]+)\)/.exec(string);
3389
+ return match ? match[1].split(",").map(function(p) {
3390
+ return parseFloat(p);
3391
+ }) : [];
3392
+ }
3393
+ function spring(string, duration) {
3394
+ var params = parseEasingParameters(string);
3395
+ var mass = minMax(is.und(params[0]) ? 1 : params[0], 0.1, 100);
3396
+ var stiffness = minMax(is.und(params[1]) ? 100 : params[1], 0.1, 100);
3397
+ var damping = minMax(is.und(params[2]) ? 10 : params[2], 0.1, 100);
3398
+ var velocity = minMax(is.und(params[3]) ? 0 : params[3], 0.1, 100);
3399
+ var w0 = Math.sqrt(stiffness / mass);
3400
+ var zeta = damping / (2 * Math.sqrt(stiffness * mass));
3401
+ var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;
3402
+ var a = 1;
3403
+ var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;
3404
+ function solver(t) {
3405
+ var progress = duration ? duration * t / 1e3 : t;
3406
+ if (zeta < 1) {
3407
+ progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));
3408
+ } else {
3409
+ progress = (a + b * progress) * Math.exp(-progress * w0);
3410
+ }
3411
+ if (t === 0 || t === 1) {
3412
+ return t;
3413
+ }
3414
+ return 1 - progress;
3415
+ }
3416
+ function getDuration() {
3417
+ var cached = cache.springs[string];
3418
+ if (cached) {
3419
+ return cached;
3420
+ }
3421
+ var frame = 1 / 6;
3422
+ var elapsed = 0;
3423
+ var rest = 0;
3424
+ while (true) {
3425
+ elapsed += frame;
3426
+ if (solver(elapsed) === 1) {
3427
+ rest++;
3428
+ if (rest >= 16) {
3429
+ break;
3430
+ }
3431
+ } else {
3432
+ rest = 0;
3433
+ }
3434
+ }
3435
+ var duration2 = elapsed * frame * 1e3;
3436
+ cache.springs[string] = duration2;
3437
+ return duration2;
3438
+ }
3439
+ return duration ? solver : getDuration;
3440
+ }
3441
+ function steps(steps2) {
3442
+ if (steps2 === void 0)
3443
+ steps2 = 10;
3444
+ return function(t) {
3445
+ return Math.ceil(minMax(t, 1e-6, 1) * steps2) * (1 / steps2);
3446
+ };
3447
+ }
3448
+ var bezier = function() {
3449
+ var kSplineTableSize = 11;
3450
+ var kSampleStepSize = 1 / (kSplineTableSize - 1);
3451
+ function A(aA1, aA2) {
3452
+ return 1 - 3 * aA2 + 3 * aA1;
3453
+ }
3454
+ function B(aA1, aA2) {
3455
+ return 3 * aA2 - 6 * aA1;
3456
+ }
3457
+ function C(aA1) {
3458
+ return 3 * aA1;
3459
+ }
3460
+ function calcBezier(aT, aA1, aA2) {
3461
+ return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
3462
+ }
3463
+ function getSlope(aT, aA1, aA2) {
3464
+ return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1);
3465
+ }
3466
+ function binarySubdivide(aX, aA, aB, mX1, mX2) {
3467
+ var currentX, currentT, i = 0;
3468
+ do {
3469
+ currentT = aA + (aB - aA) / 2;
3470
+ currentX = calcBezier(currentT, mX1, mX2) - aX;
3471
+ if (currentX > 0) {
3472
+ aB = currentT;
3473
+ } else {
3474
+ aA = currentT;
3475
+ }
3476
+ } while (Math.abs(currentX) > 1e-7 && ++i < 10);
3477
+ return currentT;
3478
+ }
3479
+ function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
3480
+ for (var i = 0; i < 4; ++i) {
3481
+ var currentSlope = getSlope(aGuessT, mX1, mX2);
3482
+ if (currentSlope === 0) {
3483
+ return aGuessT;
3484
+ }
3485
+ var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
3486
+ aGuessT -= currentX / currentSlope;
3487
+ }
3488
+ return aGuessT;
3489
+ }
3490
+ function bezier2(mX1, mY1, mX2, mY2) {
3491
+ if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {
3492
+ return;
3493
+ }
3494
+ var sampleValues = new Float32Array(kSplineTableSize);
3495
+ if (mX1 !== mY1 || mX2 !== mY2) {
3496
+ for (var i = 0; i < kSplineTableSize; ++i) {
3497
+ sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
3498
+ }
3499
+ }
3500
+ function getTForX(aX) {
3501
+ var intervalStart = 0;
3502
+ var currentSample = 1;
3503
+ var lastSample = kSplineTableSize - 1;
3504
+ for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
3505
+ intervalStart += kSampleStepSize;
3506
+ }
3507
+ --currentSample;
3508
+ var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
3509
+ var guessForT = intervalStart + dist * kSampleStepSize;
3510
+ var initialSlope = getSlope(guessForT, mX1, mX2);
3511
+ if (initialSlope >= 1e-3) {
3512
+ return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
3513
+ } else if (initialSlope === 0) {
3514
+ return guessForT;
3515
+ } else {
3516
+ return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
3517
+ }
3518
+ }
3519
+ return function(x) {
3520
+ if (mX1 === mY1 && mX2 === mY2) {
3521
+ return x;
3522
+ }
3523
+ if (x === 0 || x === 1) {
3524
+ return x;
3525
+ }
3526
+ return calcBezier(getTForX(x), mY1, mY2);
3527
+ };
3528
+ }
3529
+ return bezier2;
3530
+ }();
3531
+ var penner = function() {
3532
+ var eases = { linear: function() {
3533
+ return function(t) {
3534
+ return t;
3535
+ };
3536
+ } };
3537
+ var functionEasings = {
3538
+ Sine: function() {
3539
+ return function(t) {
3540
+ return 1 - Math.cos(t * Math.PI / 2);
3541
+ };
3542
+ },
3543
+ Expo: function() {
3544
+ return function(t) {
3545
+ return t ? Math.pow(2, 10 * t - 10) : 0;
3546
+ };
3547
+ },
3548
+ Circ: function() {
3549
+ return function(t) {
3550
+ return 1 - Math.sqrt(1 - t * t);
3551
+ };
3552
+ },
3553
+ Back: function() {
3554
+ return function(t) {
3555
+ return t * t * (3 * t - 2);
3556
+ };
3557
+ },
3558
+ Bounce: function() {
3559
+ return function(t) {
3560
+ var pow2, b = 4;
3561
+ while (t < ((pow2 = Math.pow(2, --b)) - 1) / 11) {
3562
+ }
3563
+ return 1 / Math.pow(4, 3 - b) - 7.5625 * Math.pow((pow2 * 3 - 2) / 22 - t, 2);
3564
+ };
3565
+ },
3566
+ Elastic: function(amplitude, period) {
3567
+ if (amplitude === void 0)
3568
+ amplitude = 1;
3569
+ if (period === void 0)
3570
+ period = 0.5;
3571
+ var a = minMax(amplitude, 1, 10);
3572
+ var p = minMax(period, 0.1, 2);
3573
+ return function(t) {
3574
+ return t === 0 || t === 1 ? t : -a * Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1 - p / (Math.PI * 2) * Math.asin(1 / a)) * (Math.PI * 2) / p);
3575
+ };
3576
+ }
3577
+ };
3578
+ var baseEasings = ["Quad", "Cubic", "Quart", "Quint"];
3579
+ baseEasings.forEach(function(name, i) {
3580
+ functionEasings[name] = function() {
3581
+ return function(t) {
3582
+ return Math.pow(t, i + 2);
3583
+ };
3584
+ };
3585
+ });
3586
+ Object.keys(functionEasings).forEach(function(name) {
3587
+ var easeIn = functionEasings[name];
3588
+ eases["easeIn" + name] = easeIn;
3589
+ eases["easeOut" + name] = function(a, b) {
3590
+ return function(t) {
3591
+ return 1 - easeIn(a, b)(1 - t);
3592
+ };
3593
+ };
3594
+ eases["easeInOut" + name] = function(a, b) {
3595
+ return function(t) {
3596
+ return t < 0.5 ? easeIn(a, b)(t * 2) / 2 : 1 - easeIn(a, b)(t * -2 + 2) / 2;
3597
+ };
3598
+ };
3599
+ eases["easeOutIn" + name] = function(a, b) {
3600
+ return function(t) {
3601
+ return t < 0.5 ? (1 - easeIn(a, b)(1 - t * 2)) / 2 : (easeIn(a, b)(t * 2 - 1) + 1) / 2;
3602
+ };
3603
+ };
3604
+ });
3605
+ return eases;
3606
+ }();
3607
+ function parseEasings(easing, duration) {
3608
+ if (is.fnc(easing)) {
3609
+ return easing;
3610
+ }
3611
+ var name = easing.split("(")[0];
3612
+ var ease = penner[name];
3613
+ var args = parseEasingParameters(easing);
3614
+ switch (name) {
3615
+ case "spring":
3616
+ return spring(easing, duration);
3617
+ case "cubicBezier":
3618
+ return applyArguments(bezier, args);
3619
+ case "steps":
3620
+ return applyArguments(steps, args);
3621
+ default:
3622
+ return applyArguments(ease, args);
3623
+ }
3624
+ }
3625
+ function selectString(str) {
3626
+ try {
3627
+ var nodes = document.querySelectorAll(str);
3628
+ return nodes;
3629
+ } catch (e) {
3630
+ return;
3631
+ }
3632
+ }
3633
+ function filterArray(arr, callback) {
3634
+ var len = arr.length;
3635
+ var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
3636
+ var result = [];
3637
+ for (var i = 0; i < len; i++) {
3638
+ if (i in arr) {
3639
+ var val = arr[i];
3640
+ if (callback.call(thisArg, val, i, arr)) {
3641
+ result.push(val);
3642
+ }
3643
+ }
3644
+ }
3645
+ return result;
3646
+ }
3647
+ function flattenArray(arr) {
3648
+ return arr.reduce(function(a, b) {
3649
+ return a.concat(is.arr(b) ? flattenArray(b) : b);
3650
+ }, []);
3651
+ }
3652
+ function toArray(o) {
3653
+ if (is.arr(o)) {
3654
+ return o;
3655
+ }
3656
+ if (is.str(o)) {
3657
+ o = selectString(o) || o;
3658
+ }
3659
+ if (o instanceof NodeList || o instanceof HTMLCollection) {
3660
+ return [].slice.call(o);
3661
+ }
3662
+ return [o];
3663
+ }
3664
+ function arrayContains(arr, val) {
3665
+ return arr.some(function(a) {
3666
+ return a === val;
3667
+ });
3668
+ }
3669
+ function cloneObject(o) {
3670
+ var clone32 = {};
3671
+ for (var p in o) {
3672
+ clone32[p] = o[p];
3673
+ }
3674
+ return clone32;
3675
+ }
3676
+ function replaceObjectProps(o1, o2) {
3677
+ var o = cloneObject(o1);
3678
+ for (var p in o1) {
3679
+ o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p];
3680
+ }
3681
+ return o;
3682
+ }
3683
+ function mergeObjects(o1, o2) {
3684
+ var o = cloneObject(o1);
3685
+ for (var p in o2) {
3686
+ o[p] = is.und(o1[p]) ? o2[p] : o1[p];
3687
+ }
3688
+ return o;
3689
+ }
3690
+ function rgbToRgba(rgbValue) {
3691
+ var rgb = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(rgbValue);
3692
+ return rgb ? "rgba(" + rgb[1] + ",1)" : rgbValue;
3693
+ }
3694
+ function hexToRgba(hexValue) {
3695
+ var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
3696
+ var hex = hexValue.replace(rgx, function(m, r2, g2, b2) {
3697
+ return r2 + r2 + g2 + g2 + b2 + b2;
3698
+ });
3699
+ var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
3700
+ var r = parseInt(rgb[1], 16);
3701
+ var g = parseInt(rgb[2], 16);
3702
+ var b = parseInt(rgb[3], 16);
3703
+ return "rgba(" + r + "," + g + "," + b + ",1)";
3704
+ }
3705
+ function hslToRgba(hslValue) {
3706
+ var hsl = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(hslValue) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(hslValue);
3707
+ var h = parseInt(hsl[1], 10) / 360;
3708
+ var s = parseInt(hsl[2], 10) / 100;
3709
+ var l = parseInt(hsl[3], 10) / 100;
3710
+ var a = hsl[4] || 1;
3711
+ function hue2rgb(p2, q2, t) {
3712
+ if (t < 0) {
3713
+ t += 1;
3714
+ }
3715
+ if (t > 1) {
3716
+ t -= 1;
3717
+ }
3718
+ if (t < 1 / 6) {
3719
+ return p2 + (q2 - p2) * 6 * t;
3720
+ }
3721
+ if (t < 1 / 2) {
3722
+ return q2;
3723
+ }
3724
+ if (t < 2 / 3) {
3725
+ return p2 + (q2 - p2) * (2 / 3 - t) * 6;
3726
+ }
3727
+ return p2;
3728
+ }
3729
+ var r, g, b;
3730
+ if (s == 0) {
3731
+ r = g = b = l;
3732
+ } else {
3733
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
3734
+ var p = 2 * l - q;
3735
+ r = hue2rgb(p, q, h + 1 / 3);
3736
+ g = hue2rgb(p, q, h);
3737
+ b = hue2rgb(p, q, h - 1 / 3);
3738
+ }
3739
+ return "rgba(" + r * 255 + "," + g * 255 + "," + b * 255 + "," + a + ")";
3740
+ }
3741
+ function colorToRgb(val) {
3742
+ if (is.rgb(val)) {
3743
+ return rgbToRgba(val);
3744
+ }
3745
+ if (is.hex(val)) {
3746
+ return hexToRgba(val);
3747
+ }
3748
+ if (is.hsl(val)) {
3749
+ return hslToRgba(val);
3750
+ }
3751
+ }
3752
+ function getUnit(val) {
3753
+ var split = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(val);
3754
+ if (split) {
3755
+ return split[1];
3756
+ }
3757
+ }
3758
+ function getTransformUnit(propName) {
3759
+ if (stringContains(propName, "translate") || propName === "perspective") {
3760
+ return "px";
3761
+ }
3762
+ if (stringContains(propName, "rotate") || stringContains(propName, "skew")) {
3763
+ return "deg";
3764
+ }
3765
+ }
3766
+ function getFunctionValue(val, animatable) {
3767
+ if (!is.fnc(val)) {
3768
+ return val;
3769
+ }
3770
+ return val(animatable.target, animatable.id, animatable.total);
3771
+ }
3772
+ function getAttribute(el, prop) {
3773
+ return el.getAttribute(prop);
3774
+ }
3775
+ function convertPxToUnit(el, value, unit) {
3776
+ var valueUnit = getUnit(value);
3777
+ if (arrayContains([unit, "deg", "rad", "turn"], valueUnit)) {
3778
+ return value;
3779
+ }
3780
+ var cached = cache.CSS[value + unit];
3781
+ if (!is.und(cached)) {
3782
+ return cached;
3783
+ }
3784
+ var baseline = 100;
3785
+ var tempEl = document.createElement(el.tagName);
3786
+ var parentEl = el.parentNode && el.parentNode !== document ? el.parentNode : document.body;
3787
+ parentEl.appendChild(tempEl);
3788
+ tempEl.style.position = "absolute";
3789
+ tempEl.style.width = baseline + unit;
3790
+ var factor = baseline / tempEl.offsetWidth;
3791
+ parentEl.removeChild(tempEl);
3792
+ var convertedUnit = factor * parseFloat(value);
3793
+ cache.CSS[value + unit] = convertedUnit;
3794
+ return convertedUnit;
3795
+ }
3796
+ function getCSSValue(el, prop, unit) {
3797
+ if (prop in el.style) {
3798
+ var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
3799
+ var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || "0";
3800
+ return unit ? convertPxToUnit(el, value, unit) : value;
3801
+ }
3802
+ }
3803
+ function getAnimationType(el, prop) {
3804
+ if (is.dom(el) && !is.inp(el) && (!is.nil(getAttribute(el, prop)) || is.svg(el) && el[prop])) {
3805
+ return "attribute";
3806
+ }
3807
+ if (is.dom(el) && arrayContains(validTransforms, prop)) {
3808
+ return "transform";
3809
+ }
3810
+ if (is.dom(el) && (prop !== "transform" && getCSSValue(el, prop))) {
3811
+ return "css";
3812
+ }
3813
+ if (el[prop] != null) {
3814
+ return "object";
3815
+ }
3816
+ }
3817
+ function getElementTransforms(el) {
3818
+ if (!is.dom(el)) {
3819
+ return;
3820
+ }
3821
+ var str = el.style.transform || "";
3822
+ var reg2 = /(\w+)\(([^)]*)\)/g;
3823
+ var transforms = /* @__PURE__ */ new Map();
3824
+ var m;
3825
+ while (m = reg2.exec(str)) {
3826
+ transforms.set(m[1], m[2]);
3827
+ }
3828
+ return transforms;
3829
+ }
3830
+ function getTransformValue(el, propName, animatable, unit) {
3831
+ var defaultVal = stringContains(propName, "scale") ? 1 : 0 + getTransformUnit(propName);
3832
+ var value = getElementTransforms(el).get(propName) || defaultVal;
3833
+ if (animatable) {
3834
+ animatable.transforms.list.set(propName, value);
3835
+ animatable.transforms["last"] = propName;
3836
+ }
3837
+ return unit ? convertPxToUnit(el, value, unit) : value;
3838
+ }
3839
+ function getOriginalTargetValue(target, propName, unit, animatable) {
3840
+ switch (getAnimationType(target, propName)) {
3841
+ case "transform":
3842
+ return getTransformValue(target, propName, animatable, unit);
3843
+ case "css":
3844
+ return getCSSValue(target, propName, unit);
3845
+ case "attribute":
3846
+ return getAttribute(target, propName);
3847
+ default:
3848
+ return target[propName] || 0;
3849
+ }
3850
+ }
3851
+ function getRelativeValue(to, from) {
3852
+ var operator = /^(\*=|\+=|-=)/.exec(to);
3853
+ if (!operator) {
3854
+ return to;
3855
+ }
3856
+ var u = getUnit(to) || 0;
3857
+ var x = parseFloat(from);
3858
+ var y = parseFloat(to.replace(operator[0], ""));
3859
+ switch (operator[0][0]) {
3860
+ case "+":
3861
+ return x + y + u;
3862
+ case "-":
3863
+ return x - y + u;
3864
+ case "*":
3865
+ return x * y + u;
3866
+ }
3867
+ }
3868
+ function validateValue(val, unit) {
3869
+ if (is.col(val)) {
3870
+ return colorToRgb(val);
3871
+ }
3872
+ if (/\s/g.test(val)) {
3873
+ return val;
3874
+ }
3875
+ var originalUnit = getUnit(val);
3876
+ var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;
3877
+ if (unit) {
3878
+ return unitLess + unit;
3879
+ }
3880
+ return unitLess;
3881
+ }
3882
+ function getDistance(p1, p2) {
3883
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
3884
+ }
3885
+ function getCircleLength(el) {
3886
+ return Math.PI * 2 * getAttribute(el, "r");
3887
+ }
3888
+ function getRectLength(el) {
3889
+ return getAttribute(el, "width") * 2 + getAttribute(el, "height") * 2;
3890
+ }
3891
+ function getLineLength(el) {
3892
+ return getDistance(
3893
+ { x: getAttribute(el, "x1"), y: getAttribute(el, "y1") },
3894
+ { x: getAttribute(el, "x2"), y: getAttribute(el, "y2") }
3895
+ );
3896
+ }
3897
+ function getPolylineLength(el) {
3898
+ var points = el.points;
3899
+ var totalLength = 0;
3900
+ var previousPos;
3901
+ for (var i = 0; i < points.numberOfItems; i++) {
3902
+ var currentPos = points.getItem(i);
3903
+ if (i > 0) {
3904
+ totalLength += getDistance(previousPos, currentPos);
3905
+ }
3906
+ previousPos = currentPos;
3907
+ }
3908
+ return totalLength;
3909
+ }
3910
+ function getPolygonLength(el) {
3911
+ var points = el.points;
3912
+ return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));
3913
+ }
3914
+ function getTotalLength(el) {
3915
+ if (el.getTotalLength) {
3916
+ return el.getTotalLength();
3917
+ }
3918
+ switch (el.tagName.toLowerCase()) {
3919
+ case "circle":
3920
+ return getCircleLength(el);
3921
+ case "rect":
3922
+ return getRectLength(el);
3923
+ case "line":
3924
+ return getLineLength(el);
3925
+ case "polyline":
3926
+ return getPolylineLength(el);
3927
+ case "polygon":
3928
+ return getPolygonLength(el);
3929
+ }
3930
+ }
3931
+ function setDashoffset(el) {
3932
+ var pathLength = getTotalLength(el);
3933
+ el.setAttribute("stroke-dasharray", pathLength);
3934
+ return pathLength;
3935
+ }
3936
+ function getParentSvgEl(el) {
3937
+ var parentEl = el.parentNode;
3938
+ while (is.svg(parentEl)) {
3939
+ if (!is.svg(parentEl.parentNode)) {
3940
+ break;
3941
+ }
3942
+ parentEl = parentEl.parentNode;
3943
+ }
3944
+ return parentEl;
3945
+ }
3946
+ function getParentSvg(pathEl, svgData) {
3947
+ var svg = svgData || {};
3948
+ var parentSvgEl = svg.el || getParentSvgEl(pathEl);
3949
+ var rect = parentSvgEl.getBoundingClientRect();
3950
+ var viewBoxAttr = getAttribute(parentSvgEl, "viewBox");
3951
+ var width = rect.width;
3952
+ var height = rect.height;
3953
+ var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(" ") : [0, 0, width, height]);
3954
+ return {
3955
+ el: parentSvgEl,
3956
+ viewBox,
3957
+ x: viewBox[0] / 1,
3958
+ y: viewBox[1] / 1,
3959
+ w: width,
3960
+ h: height,
3961
+ vW: viewBox[2],
3962
+ vH: viewBox[3]
3963
+ };
3964
+ }
3965
+ function getPath(path2, percent) {
3966
+ var pathEl = is.str(path2) ? selectString(path2)[0] : path2;
3967
+ var p = percent || 100;
3968
+ return function(property) {
3969
+ return {
3970
+ property,
3971
+ el: pathEl,
3972
+ svg: getParentSvg(pathEl),
3973
+ totalLength: getTotalLength(pathEl) * (p / 100)
3974
+ };
3975
+ };
3976
+ }
3977
+ function getPathProgress(path2, progress, isPathTargetInsideSVG) {
3978
+ function point(offset) {
3979
+ if (offset === void 0)
3980
+ offset = 0;
3981
+ var l = progress + offset >= 1 ? progress + offset : 0;
3982
+ return path2.el.getPointAtLength(l);
3983
+ }
3984
+ var svg = getParentSvg(path2.el, path2.svg);
3985
+ var p = point();
3986
+ var p0 = point(-1);
3987
+ var p1 = point(1);
3988
+ var scaleX = isPathTargetInsideSVG ? 1 : svg.w / svg.vW;
3989
+ var scaleY = isPathTargetInsideSVG ? 1 : svg.h / svg.vH;
3990
+ switch (path2.property) {
3991
+ case "x":
3992
+ return (p.x - svg.x) * scaleX;
3993
+ case "y":
3994
+ return (p.y - svg.y) * scaleY;
3995
+ case "angle":
3996
+ return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;
3997
+ }
3998
+ }
3999
+ function decomposeValue(val, unit) {
4000
+ var rgx = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g;
4001
+ var value = validateValue(is.pth(val) ? val.totalLength : val, unit) + "";
4002
+ return {
4003
+ original: value,
4004
+ numbers: value.match(rgx) ? value.match(rgx).map(Number) : [0],
4005
+ strings: is.str(val) || unit ? value.split(rgx) : []
4006
+ };
4007
+ }
4008
+ function parseTargets(targets) {
4009
+ var targetsArray = targets ? flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets)) : [];
4010
+ return filterArray(targetsArray, function(item, pos, self) {
4011
+ return self.indexOf(item) === pos;
4012
+ });
4013
+ }
4014
+ function getAnimatables(targets) {
4015
+ var parsed = parseTargets(targets);
4016
+ return parsed.map(function(t, i) {
4017
+ return { target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };
4018
+ });
4019
+ }
4020
+ function normalizePropertyTweens(prop, tweenSettings) {
4021
+ var settings = cloneObject(tweenSettings);
4022
+ if (/^spring/.test(settings.easing)) {
4023
+ settings.duration = spring(settings.easing);
4024
+ }
4025
+ if (is.arr(prop)) {
4026
+ var l = prop.length;
4027
+ var isFromTo = l === 2 && !is.obj(prop[0]);
4028
+ if (!isFromTo) {
4029
+ if (!is.fnc(tweenSettings.duration)) {
4030
+ settings.duration = tweenSettings.duration / l;
4031
+ }
4032
+ } else {
4033
+ prop = { value: prop };
4034
+ }
4035
+ }
4036
+ var propArray = is.arr(prop) ? prop : [prop];
4037
+ return propArray.map(function(v, i) {
4038
+ var obj = is.obj(v) && !is.pth(v) ? v : { value: v };
4039
+ if (is.und(obj.delay)) {
4040
+ obj.delay = !i ? tweenSettings.delay : 0;
4041
+ }
4042
+ if (is.und(obj.endDelay)) {
4043
+ obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0;
4044
+ }
4045
+ return obj;
4046
+ }).map(function(k) {
4047
+ return mergeObjects(k, settings);
4048
+ });
4049
+ }
4050
+ function flattenKeyframes(keyframes) {
4051
+ var propertyNames = filterArray(flattenArray(keyframes.map(function(key) {
4052
+ return Object.keys(key);
4053
+ })), function(p) {
4054
+ return is.key(p);
4055
+ }).reduce(function(a, b) {
4056
+ if (a.indexOf(b) < 0) {
4057
+ a.push(b);
4058
+ }
4059
+ return a;
4060
+ }, []);
4061
+ var properties = {};
4062
+ var loop = function(i2) {
4063
+ var propName = propertyNames[i2];
4064
+ properties[propName] = keyframes.map(function(key) {
4065
+ var newKey = {};
4066
+ for (var p in key) {
4067
+ if (is.key(p)) {
4068
+ if (p == propName) {
4069
+ newKey.value = key[p];
4070
+ }
4071
+ } else {
4072
+ newKey[p] = key[p];
4073
+ }
4074
+ }
4075
+ return newKey;
4076
+ });
4077
+ };
4078
+ for (var i = 0; i < propertyNames.length; i++)
4079
+ loop(i);
4080
+ return properties;
4081
+ }
4082
+ function getProperties(tweenSettings, params) {
4083
+ var properties = [];
4084
+ var keyframes = params.keyframes;
4085
+ if (keyframes) {
4086
+ params = mergeObjects(flattenKeyframes(keyframes), params);
4087
+ }
4088
+ for (var p in params) {
4089
+ if (is.key(p)) {
4090
+ properties.push({
4091
+ name: p,
4092
+ tweens: normalizePropertyTweens(params[p], tweenSettings)
4093
+ });
4094
+ }
4095
+ }
4096
+ return properties;
4097
+ }
4098
+ function normalizeTweenValues(tween, animatable) {
4099
+ var t = {};
4100
+ for (var p in tween) {
4101
+ var value = getFunctionValue(tween[p], animatable);
4102
+ if (is.arr(value)) {
4103
+ value = value.map(function(v) {
4104
+ return getFunctionValue(v, animatable);
4105
+ });
4106
+ if (value.length === 1) {
4107
+ value = value[0];
4108
+ }
4109
+ }
4110
+ t[p] = value;
4111
+ }
4112
+ t.duration = parseFloat(t.duration);
4113
+ t.delay = parseFloat(t.delay);
4114
+ return t;
4115
+ }
4116
+ function normalizeTweens(prop, animatable) {
4117
+ var previousTween;
4118
+ return prop.tweens.map(function(t) {
4119
+ var tween = normalizeTweenValues(t, animatable);
4120
+ var tweenValue = tween.value;
4121
+ var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;
4122
+ var toUnit = getUnit(to);
4123
+ var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);
4124
+ var previousValue = previousTween ? previousTween.to.original : originalValue;
4125
+ var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;
4126
+ var fromUnit = getUnit(from) || getUnit(originalValue);
4127
+ var unit = toUnit || fromUnit;
4128
+ if (is.und(to)) {
4129
+ to = previousValue;
4130
+ }
4131
+ tween.from = decomposeValue(from, unit);
4132
+ tween.to = decomposeValue(getRelativeValue(to, from), unit);
4133
+ tween.start = previousTween ? previousTween.end : 0;
4134
+ tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;
4135
+ tween.easing = parseEasings(tween.easing, tween.duration);
4136
+ tween.isPath = is.pth(tweenValue);
4137
+ tween.isPathTargetInsideSVG = tween.isPath && is.svg(animatable.target);
4138
+ tween.isColor = is.col(tween.from.original);
4139
+ if (tween.isColor) {
4140
+ tween.round = 1;
4141
+ }
4142
+ previousTween = tween;
4143
+ return tween;
4144
+ });
4145
+ }
4146
+ var setProgressValue = {
4147
+ css: function(t, p, v) {
4148
+ return t.style[p] = v;
4149
+ },
4150
+ attribute: function(t, p, v) {
4151
+ return t.setAttribute(p, v);
4152
+ },
4153
+ object: function(t, p, v) {
4154
+ return t[p] = v;
4155
+ },
4156
+ transform: function(t, p, v, transforms, manual) {
4157
+ transforms.list.set(p, v);
4158
+ if (p === transforms.last || manual) {
4159
+ var str = "";
4160
+ transforms.list.forEach(function(value, prop) {
4161
+ str += prop + "(" + value + ") ";
4162
+ });
4163
+ t.style.transform = str;
4164
+ }
4165
+ }
4166
+ };
4167
+ function setTargetsValue(targets, properties) {
4168
+ var animatables = getAnimatables(targets);
4169
+ animatables.forEach(function(animatable) {
4170
+ for (var property in properties) {
4171
+ var value = getFunctionValue(properties[property], animatable);
4172
+ var target = animatable.target;
4173
+ var valueUnit = getUnit(value);
4174
+ var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);
4175
+ var unit = valueUnit || getUnit(originalValue);
4176
+ var to = getRelativeValue(validateValue(value, unit), originalValue);
4177
+ var animType = getAnimationType(target, property);
4178
+ setProgressValue[animType](target, property, to, animatable.transforms, true);
4179
+ }
4180
+ });
4181
+ }
4182
+ function createAnimation(animatable, prop) {
4183
+ var animType = getAnimationType(animatable.target, prop.name);
4184
+ if (animType) {
4185
+ var tweens = normalizeTweens(prop, animatable);
4186
+ var lastTween = tweens[tweens.length - 1];
4187
+ return {
4188
+ type: animType,
4189
+ property: prop.name,
4190
+ animatable,
4191
+ tweens,
4192
+ duration: lastTween.end,
4193
+ delay: tweens[0].delay,
4194
+ endDelay: lastTween.endDelay
4195
+ };
4196
+ }
4197
+ }
4198
+ function getAnimations(animatables, properties) {
4199
+ return filterArray(flattenArray(animatables.map(function(animatable) {
4200
+ return properties.map(function(prop) {
4201
+ return createAnimation(animatable, prop);
4202
+ });
4203
+ })), function(a) {
4204
+ return !is.und(a);
4205
+ });
4206
+ }
4207
+ function getInstanceTimings(animations, tweenSettings) {
4208
+ var animLength = animations.length;
4209
+ var getTlOffset = function(anim) {
4210
+ return anim.timelineOffset ? anim.timelineOffset : 0;
4211
+ };
4212
+ var timings = {};
4213
+ timings.duration = animLength ? Math.max.apply(Math, animations.map(function(anim) {
4214
+ return getTlOffset(anim) + anim.duration;
4215
+ })) : tweenSettings.duration;
4216
+ timings.delay = animLength ? Math.min.apply(Math, animations.map(function(anim) {
4217
+ return getTlOffset(anim) + anim.delay;
4218
+ })) : tweenSettings.delay;
4219
+ timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function(anim) {
4220
+ return getTlOffset(anim) + anim.duration - anim.endDelay;
4221
+ })) : tweenSettings.endDelay;
4222
+ return timings;
4223
+ }
4224
+ var instanceID = 0;
4225
+ function createNewInstance(params) {
4226
+ var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);
4227
+ var tweenSettings = replaceObjectProps(defaultTweenSettings, params);
4228
+ var properties = getProperties(tweenSettings, params);
4229
+ var animatables = getAnimatables(params.targets);
4230
+ var animations = getAnimations(animatables, properties);
4231
+ var timings = getInstanceTimings(animations, tweenSettings);
4232
+ var id = instanceID;
4233
+ instanceID++;
4234
+ return mergeObjects(instanceSettings, {
4235
+ id,
4236
+ children: [],
4237
+ animatables,
4238
+ animations,
4239
+ duration: timings.duration,
4240
+ delay: timings.delay,
4241
+ endDelay: timings.endDelay
4242
+ });
4243
+ }
4244
+ var activeInstances = [];
4245
+ var engine = function() {
4246
+ var raf;
4247
+ function play() {
4248
+ if (!raf && (!isDocumentHidden() || !anime.suspendWhenDocumentHidden) && activeInstances.length > 0) {
4249
+ raf = requestAnimationFrame(step);
4250
+ }
4251
+ }
4252
+ function step(t) {
4253
+ var activeInstancesLength = activeInstances.length;
4254
+ var i = 0;
4255
+ while (i < activeInstancesLength) {
4256
+ var activeInstance = activeInstances[i];
4257
+ if (!activeInstance.paused) {
4258
+ activeInstance.tick(t);
4259
+ i++;
4260
+ } else {
4261
+ activeInstances.splice(i, 1);
4262
+ activeInstancesLength--;
4263
+ }
4264
+ }
4265
+ raf = i > 0 ? requestAnimationFrame(step) : void 0;
4266
+ }
4267
+ function handleVisibilityChange() {
4268
+ if (!anime.suspendWhenDocumentHidden) {
4269
+ return;
4270
+ }
4271
+ if (isDocumentHidden()) {
4272
+ raf = cancelAnimationFrame(raf);
4273
+ } else {
4274
+ activeInstances.forEach(
4275
+ function(instance) {
4276
+ return instance._onDocumentVisibility();
4277
+ }
4278
+ );
4279
+ engine();
4280
+ }
4281
+ }
4282
+ if (typeof document !== "undefined") {
4283
+ document.addEventListener("visibilitychange", handleVisibilityChange);
4284
+ }
4285
+ return play;
4286
+ }();
4287
+ function isDocumentHidden() {
4288
+ return !!document && document.hidden;
4289
+ }
4290
+ function anime(params) {
4291
+ if (params === void 0)
4292
+ params = {};
4293
+ var startTime = 0, lastTime = 0, now = 0;
4294
+ var children, childrenLength = 0;
4295
+ var resolve = null;
4296
+ function makePromise(instance2) {
4297
+ var promise2 = window.Promise && new Promise(function(_resolve) {
4298
+ return resolve = _resolve;
4299
+ });
4300
+ instance2.finished = promise2;
4301
+ return promise2;
4302
+ }
4303
+ var instance = createNewInstance(params);
4304
+ var promise = makePromise(instance);
4305
+ function toggleInstanceDirection() {
4306
+ var direction = instance.direction;
4307
+ if (direction !== "alternate") {
4308
+ instance.direction = direction !== "normal" ? "normal" : "reverse";
4309
+ }
4310
+ instance.reversed = !instance.reversed;
4311
+ children.forEach(function(child) {
4312
+ return child.reversed = instance.reversed;
4313
+ });
4314
+ }
4315
+ function adjustTime(time) {
4316
+ return instance.reversed ? instance.duration - time : time;
4317
+ }
4318
+ function resetTime() {
4319
+ startTime = 0;
4320
+ lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);
4321
+ }
4322
+ function seekChild(time, child) {
4323
+ if (child) {
4324
+ child.seek(time - child.timelineOffset);
4325
+ }
4326
+ }
4327
+ function syncInstanceChildren(time) {
4328
+ if (!instance.reversePlayback) {
4329
+ for (var i = 0; i < childrenLength; i++) {
4330
+ seekChild(time, children[i]);
4331
+ }
4332
+ } else {
4333
+ for (var i$1 = childrenLength; i$1--; ) {
4334
+ seekChild(time, children[i$1]);
4335
+ }
4336
+ }
4337
+ }
4338
+ function setAnimationsProgress(insTime) {
4339
+ var i = 0;
4340
+ var animations = instance.animations;
4341
+ var animationsLength = animations.length;
4342
+ while (i < animationsLength) {
4343
+ var anim = animations[i];
4344
+ var animatable = anim.animatable;
4345
+ var tweens = anim.tweens;
4346
+ var tweenLength = tweens.length - 1;
4347
+ var tween = tweens[tweenLength];
4348
+ if (tweenLength) {
4349
+ tween = filterArray(tweens, function(t) {
4350
+ return insTime < t.end;
4351
+ })[0] || tween;
4352
+ }
4353
+ var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;
4354
+ var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);
4355
+ var strings = tween.to.strings;
4356
+ var round = tween.round;
4357
+ var numbers = [];
4358
+ var toNumbersLength = tween.to.numbers.length;
4359
+ var progress = void 0;
4360
+ for (var n = 0; n < toNumbersLength; n++) {
4361
+ var value = void 0;
4362
+ var toNumber = tween.to.numbers[n];
4363
+ var fromNumber = tween.from.numbers[n] || 0;
4364
+ if (!tween.isPath) {
4365
+ value = fromNumber + eased * (toNumber - fromNumber);
4366
+ } else {
4367
+ value = getPathProgress(tween.value, eased * toNumber, tween.isPathTargetInsideSVG);
4368
+ }
4369
+ if (round) {
4370
+ if (!(tween.isColor && n > 2)) {
4371
+ value = Math.round(value * round) / round;
4372
+ }
4373
+ }
4374
+ numbers.push(value);
4375
+ }
4376
+ var stringsLength = strings.length;
4377
+ if (!stringsLength) {
4378
+ progress = numbers[0];
4379
+ } else {
4380
+ progress = strings[0];
4381
+ for (var s = 0; s < stringsLength; s++) {
4382
+ var a = strings[s];
4383
+ var b = strings[s + 1];
4384
+ var n$1 = numbers[s];
4385
+ if (!isNaN(n$1)) {
4386
+ if (!b) {
4387
+ progress += n$1 + " ";
4388
+ } else {
4389
+ progress += n$1 + b;
4390
+ }
4391
+ }
4392
+ }
4393
+ }
4394
+ setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);
4395
+ anim.currentValue = progress;
4396
+ i++;
4397
+ }
4398
+ }
4399
+ function setCallback(cb) {
4400
+ if (instance[cb] && !instance.passThrough) {
4401
+ instance[cb](instance);
4402
+ }
4403
+ }
4404
+ function countIteration() {
4405
+ if (instance.remaining && instance.remaining !== true) {
4406
+ instance.remaining--;
4407
+ }
4408
+ }
4409
+ function setInstanceProgress(engineTime) {
4410
+ var insDuration = instance.duration;
4411
+ var insDelay = instance.delay;
4412
+ var insEndDelay = insDuration - instance.endDelay;
4413
+ var insTime = adjustTime(engineTime);
4414
+ instance.progress = minMax(insTime / insDuration * 100, 0, 100);
4415
+ instance.reversePlayback = insTime < instance.currentTime;
4416
+ if (children) {
4417
+ syncInstanceChildren(insTime);
4418
+ }
4419
+ if (!instance.began && instance.currentTime > 0) {
4420
+ instance.began = true;
4421
+ setCallback("begin");
4422
+ }
4423
+ if (!instance.loopBegan && instance.currentTime > 0) {
4424
+ instance.loopBegan = true;
4425
+ setCallback("loopBegin");
4426
+ }
4427
+ if (insTime <= insDelay && instance.currentTime !== 0) {
4428
+ setAnimationsProgress(0);
4429
+ }
4430
+ if (insTime >= insEndDelay && instance.currentTime !== insDuration || !insDuration) {
4431
+ setAnimationsProgress(insDuration);
4432
+ }
4433
+ if (insTime > insDelay && insTime < insEndDelay) {
4434
+ if (!instance.changeBegan) {
4435
+ instance.changeBegan = true;
4436
+ instance.changeCompleted = false;
4437
+ setCallback("changeBegin");
4438
+ }
4439
+ setCallback("change");
4440
+ setAnimationsProgress(insTime);
4441
+ } else {
4442
+ if (instance.changeBegan) {
4443
+ instance.changeCompleted = true;
4444
+ instance.changeBegan = false;
4445
+ setCallback("changeComplete");
4446
+ }
4447
+ }
4448
+ instance.currentTime = minMax(insTime, 0, insDuration);
4449
+ if (instance.began) {
4450
+ setCallback("update");
4451
+ }
4452
+ if (engineTime >= insDuration) {
4453
+ lastTime = 0;
4454
+ countIteration();
4455
+ if (!instance.remaining) {
4456
+ instance.paused = true;
4457
+ if (!instance.completed) {
4458
+ instance.completed = true;
4459
+ setCallback("loopComplete");
4460
+ setCallback("complete");
4461
+ if (!instance.passThrough && "Promise" in window) {
4462
+ resolve();
4463
+ promise = makePromise(instance);
4464
+ }
4465
+ }
4466
+ } else {
4467
+ startTime = now;
4468
+ setCallback("loopComplete");
4469
+ instance.loopBegan = false;
4470
+ if (instance.direction === "alternate") {
4471
+ toggleInstanceDirection();
4472
+ }
4473
+ }
4474
+ }
4475
+ }
4476
+ instance.reset = function() {
4477
+ var direction = instance.direction;
4478
+ instance.passThrough = false;
4479
+ instance.currentTime = 0;
4480
+ instance.progress = 0;
4481
+ instance.paused = true;
4482
+ instance.began = false;
4483
+ instance.loopBegan = false;
4484
+ instance.changeBegan = false;
4485
+ instance.completed = false;
4486
+ instance.changeCompleted = false;
4487
+ instance.reversePlayback = false;
4488
+ instance.reversed = direction === "reverse";
4489
+ instance.remaining = instance.loop;
4490
+ children = instance.children;
4491
+ childrenLength = children.length;
4492
+ for (var i = childrenLength; i--; ) {
4493
+ instance.children[i].reset();
4494
+ }
4495
+ if (instance.reversed && instance.loop !== true || direction === "alternate" && instance.loop === 1) {
4496
+ instance.remaining++;
4497
+ }
4498
+ setAnimationsProgress(instance.reversed ? instance.duration : 0);
4499
+ };
4500
+ instance._onDocumentVisibility = resetTime;
4501
+ instance.set = function(targets, properties) {
4502
+ setTargetsValue(targets, properties);
4503
+ return instance;
4504
+ };
4505
+ instance.tick = function(t) {
4506
+ now = t;
4507
+ if (!startTime) {
4508
+ startTime = now;
4509
+ }
4510
+ setInstanceProgress((now + (lastTime - startTime)) * anime.speed);
4511
+ };
4512
+ instance.seek = function(time) {
4513
+ setInstanceProgress(adjustTime(time));
4514
+ };
4515
+ instance.pause = function() {
4516
+ instance.paused = true;
4517
+ resetTime();
4518
+ };
4519
+ instance.play = function() {
4520
+ if (!instance.paused) {
4521
+ return;
4522
+ }
4523
+ if (instance.completed) {
4524
+ instance.reset();
4525
+ }
4526
+ instance.paused = false;
4527
+ activeInstances.push(instance);
4528
+ resetTime();
4529
+ engine();
4530
+ };
4531
+ instance.reverse = function() {
4532
+ toggleInstanceDirection();
4533
+ instance.completed = instance.reversed ? false : true;
4534
+ resetTime();
4535
+ };
4536
+ instance.restart = function() {
4537
+ instance.reset();
4538
+ instance.play();
4539
+ };
4540
+ instance.remove = function(targets) {
4541
+ var targetsArray = parseTargets(targets);
4542
+ removeTargetsFromInstance(targetsArray, instance);
4543
+ };
4544
+ instance.reset();
4545
+ if (instance.autoplay) {
4546
+ instance.play();
4547
+ }
4548
+ return instance;
4549
+ }
4550
+ function removeTargetsFromAnimations(targetsArray, animations) {
4551
+ for (var a = animations.length; a--; ) {
4552
+ if (arrayContains(targetsArray, animations[a].animatable.target)) {
4553
+ animations.splice(a, 1);
4554
+ }
4555
+ }
4556
+ }
4557
+ function removeTargetsFromInstance(targetsArray, instance) {
4558
+ var animations = instance.animations;
4559
+ var children = instance.children;
4560
+ removeTargetsFromAnimations(targetsArray, animations);
4561
+ for (var c = children.length; c--; ) {
4562
+ var child = children[c];
4563
+ var childAnimations = child.animations;
4564
+ removeTargetsFromAnimations(targetsArray, childAnimations);
4565
+ if (!childAnimations.length && !child.children.length) {
4566
+ children.splice(c, 1);
4567
+ }
4568
+ }
4569
+ if (!animations.length && !children.length) {
4570
+ instance.pause();
4571
+ }
4572
+ }
4573
+ function removeTargetsFromActiveInstances(targets) {
4574
+ var targetsArray = parseTargets(targets);
4575
+ for (var i = activeInstances.length; i--; ) {
4576
+ var instance = activeInstances[i];
4577
+ removeTargetsFromInstance(targetsArray, instance);
4578
+ }
4579
+ }
4580
+ function stagger(val, params) {
4581
+ if (params === void 0)
4582
+ params = {};
4583
+ var direction = params.direction || "normal";
4584
+ var easing = params.easing ? parseEasings(params.easing) : null;
4585
+ var grid = params.grid;
4586
+ var axis = params.axis;
4587
+ var fromIndex = params.from || 0;
4588
+ var fromFirst = fromIndex === "first";
4589
+ var fromCenter = fromIndex === "center";
4590
+ var fromLast = fromIndex === "last";
4591
+ var isRange = is.arr(val);
4592
+ var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);
4593
+ var val2 = isRange ? parseFloat(val[1]) : 0;
4594
+ var unit = getUnit(isRange ? val[1] : val) || 0;
4595
+ var start = params.start || 0 + (isRange ? val1 : 0);
4596
+ var values = [];
4597
+ var maxValue = 0;
4598
+ return function(el, i, t) {
4599
+ if (fromFirst) {
4600
+ fromIndex = 0;
4601
+ }
4602
+ if (fromCenter) {
4603
+ fromIndex = (t - 1) / 2;
4604
+ }
4605
+ if (fromLast) {
4606
+ fromIndex = t - 1;
4607
+ }
4608
+ if (!values.length) {
4609
+ for (var index = 0; index < t; index++) {
4610
+ if (!grid) {
4611
+ values.push(Math.abs(fromIndex - index));
4612
+ } else {
4613
+ var fromX = !fromCenter ? fromIndex % grid[0] : (grid[0] - 1) / 2;
4614
+ var fromY = !fromCenter ? Math.floor(fromIndex / grid[0]) : (grid[1] - 1) / 2;
4615
+ var toX = index % grid[0];
4616
+ var toY = Math.floor(index / grid[0]);
4617
+ var distanceX = fromX - toX;
4618
+ var distanceY = fromY - toY;
4619
+ var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);
4620
+ if (axis === "x") {
4621
+ value = -distanceX;
4622
+ }
4623
+ if (axis === "y") {
4624
+ value = -distanceY;
4625
+ }
4626
+ values.push(value);
4627
+ }
4628
+ maxValue = Math.max.apply(Math, values);
4629
+ }
4630
+ if (easing) {
4631
+ values = values.map(function(val3) {
4632
+ return easing(val3 / maxValue) * maxValue;
4633
+ });
4634
+ }
4635
+ if (direction === "reverse") {
4636
+ values = values.map(function(val3) {
4637
+ return axis ? val3 < 0 ? val3 * -1 : -val3 : Math.abs(maxValue - val3);
4638
+ });
4639
+ }
4640
+ }
4641
+ var spacing = isRange ? (val2 - val1) / maxValue : val1;
4642
+ return start + spacing * (Math.round(values[i] * 100) / 100) + unit;
4643
+ };
4644
+ }
4645
+ function timeline(params) {
4646
+ if (params === void 0)
4647
+ params = {};
4648
+ var tl = anime(params);
4649
+ tl.duration = 0;
4650
+ tl.add = function(instanceParams, timelineOffset) {
4651
+ var tlIndex = activeInstances.indexOf(tl);
4652
+ var children = tl.children;
4653
+ if (tlIndex > -1) {
4654
+ activeInstances.splice(tlIndex, 1);
4655
+ }
4656
+ function passThrough(ins2) {
4657
+ ins2.passThrough = true;
4658
+ }
4659
+ for (var i = 0; i < children.length; i++) {
4660
+ passThrough(children[i]);
4661
+ }
4662
+ var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));
4663
+ insParams.targets = insParams.targets || params.targets;
4664
+ var tlDuration = tl.duration;
4665
+ insParams.autoplay = false;
4666
+ insParams.direction = tl.direction;
4667
+ insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);
4668
+ passThrough(tl);
4669
+ tl.seek(insParams.timelineOffset);
4670
+ var ins = anime(insParams);
4671
+ passThrough(ins);
4672
+ children.push(ins);
4673
+ var timings = getInstanceTimings(children, params);
4674
+ tl.delay = timings.delay;
4675
+ tl.endDelay = timings.endDelay;
4676
+ tl.duration = timings.duration;
4677
+ tl.seek(0);
4678
+ tl.reset();
4679
+ if (tl.autoplay) {
4680
+ tl.play();
4681
+ }
4682
+ return tl;
4683
+ };
4684
+ return tl;
4685
+ }
4686
+ anime.version = "3.2.1";
4687
+ anime.speed = 1;
4688
+ anime.suspendWhenDocumentHidden = true;
4689
+ anime.running = activeInstances;
4690
+ anime.remove = removeTargetsFromActiveInstances;
4691
+ anime.get = getOriginalTargetValue;
4692
+ anime.set = setTargetsValue;
4693
+ anime.convertPx = convertPxToUnit;
4694
+ anime.path = getPath;
4695
+ anime.setDashoffset = setDashoffset;
4696
+ anime.stagger = stagger;
4697
+ anime.timeline = timeline;
4698
+ anime.easing = parseEasings;
4699
+ anime.penner = penner;
4700
+ anime.random = function(min, max) {
4701
+ return Math.floor(Math.random() * (max - min + 1)) + min;
4702
+ };
4703
+ var anime_es_default = anime;
4704
+
4705
+ // src/utils/anime/anime.ts
4706
+ var defaultOptions = {
4707
+ // 动画时间
4708
+ duration: 1e3,
4709
+ // 循环执行
4710
+ loop: false,
4711
+ // 运行速度曲线
4712
+ easing: "easeInOutSine"
4713
+ };
4714
+ function handleBefore(AnimeParams, extraOptions) {
4715
+ const params = {};
4716
+ if (extraOptions.complete && AnimeParams.complete) {
4717
+ const optionComplete = extraOptions.complete;
4718
+ const animeComplete = AnimeParams.complete;
4719
+ params.complete = (ins) => {
4720
+ optionComplete(ins);
4721
+ animeComplete(ins);
4722
+ };
4723
+ }
4724
+ return { ...AnimeParams, ...extraOptions, ...params };
4725
+ }
4726
+ function moveToTarget(moveElement, targetElement, extraOpts = {}) {
4727
+ const { left: toLeft, top: toTop } = moveElement.getBoundingClientRect();
4728
+ const { left: clientX, top: clientY } = targetElement.getBoundingClientRect();
4729
+ const x = clientX - toLeft;
4730
+ const y = clientY - toTop;
4731
+ return new Promise((resolve) => {
4732
+ const opts = {
4733
+ targets: moveElement,
4734
+ translateX: x,
4735
+ translateY: y,
4736
+ ...defaultOptions,
4737
+ // 完成回调
4738
+ complete: () => {
4739
+ resolve(true);
4740
+ }
4741
+ };
4742
+ const options = handleBefore(opts, extraOpts);
4743
+ anime_es_default(options);
4744
+ });
4745
+ }
4746
+ function resize(targets, extraOpts = {}) {
4747
+ return new Promise((resolve) => {
4748
+ const opts = {
4749
+ scale: [1, 0.8, 1],
4750
+ targets,
4751
+ ...defaultOptions,
4752
+ // 完成回调
4753
+ complete: () => {
4754
+ resolve(true);
4755
+ }
4756
+ };
4757
+ const options = handleBefore(opts, extraOpts);
4758
+ anime_es_default(options);
4759
+ });
4760
+ }
4761
+
4762
+ // src/utils/anime/anime-util/anime-util.ts
4763
+ var AnimeUtil = class {
4764
+ /**
4765
+ * 元素移动到指定位置 移动点至指定元素
4766
+ *
4767
+ * @author zk
4768
+ * @date 2024-01-24 09:01:37
4769
+ * @param {Event} event
4770
+ * @param {HTMLElement} toElement
4771
+ * @param {anime.AnimeParams} [options={}]
4772
+ * @return {*} {Promise<boolean>}
4773
+ * @memberof AnimeUtil
4774
+ */
4775
+ async movePoint(element, tElement, options = {}) {
4776
+ const targetElement = getAnimationElement(tElement);
4777
+ if (!targetElement) {
4778
+ ibiz.log.debug("\u7EC8\u70B9\u5143\u7D20\u4E0D\u5B58\u5728");
4779
+ return false;
4780
+ }
4781
+ const moveElement = cloneElement(element, document.body);
4782
+ if (!moveElement) {
4783
+ ibiz.log.debug("\u52A8\u753B\u5143\u7D20\u4E0D\u5B58\u5728");
4784
+ return false;
4785
+ }
4786
+ const { padding, width, height } = getElementAttribute(moveElement);
4787
+ const option = {
4788
+ borderRadius: ["0%", "50%"],
4789
+ maxWidth: [width, "6px"],
4790
+ maxHeight: [height, "6px"],
4791
+ minWidth: [width, "6px"],
4792
+ minHeight: [height, "6px"],
4793
+ padding: [padding, "6px"],
4794
+ duration: 700
4795
+ };
4796
+ Object.assign(option, options);
4797
+ const result = await moveToTarget(moveElement, targetElement, option);
4798
+ destroyElement(moveElement);
4799
+ return result;
4800
+ }
4801
+ /**
4802
+ * 元素移动动画 元素a 移动到元素b
4803
+ *
4804
+ * @author zk
4805
+ * @date 2024-01-24 06:01:35\
4806
+ * @param {HTMLElement} element
4807
+ * @param {HTMLElement} toElement
4808
+ * @param {IAnimationOptions} [options={}]
4809
+ * @return {*} {Promise<boolean>}
4810
+ * @memberof AnimeUtil
4811
+ */
4812
+ moveToTarget(element, toElement, options = {}) {
4813
+ return moveToTarget(element, toElement, options);
4814
+ }
4815
+ /**
4816
+ * 目标调整大小
4817
+ *
4818
+ * @author zk
4819
+ * @date 2024-01-22 03:01:42
4820
+ * @param {HTMLElement} target
4821
+ * @param {anime.AnimeParams} [options={}]
4822
+ * @param {IData} [builtInParams={}]
4823
+ */
4824
+ resize(targets, options = {}) {
4825
+ return resize(targets, options);
4826
+ }
4827
+ /**
4828
+ * 目标移动和调整大小
4829
+ *
4830
+ * @author zk
4831
+ * @date 2024-01-24 06:01:15
4832
+ * @param {HTMLElement} element
4833
+ * @param {HTMLElement} toElement
4834
+ * @param {IAnimationOptions} [options={}]
4835
+ * @return {*} {Promise<boolean>}
4836
+ * @memberof AnimeUtil
4837
+ */
4838
+ async moveAndResize(element, toElement, options = {}) {
4839
+ const result = await this.movePoint(element, toElement, options);
4840
+ if (result) {
4841
+ await this.resize(toElement, { duration: 500 });
4842
+ }
4843
+ return result;
4844
+ }
4845
+ };
4846
+
4847
+ // src/utils/file-util/file-util.ts
4848
+ import { RuntimeError as RuntimeError5, downloadFileFromBlob } from "@ibiz-template/core";
4849
+ import qs2 from "qs";
4850
+ var FileUtil = class {
4851
+ /**
4852
+ * 计算OSSCat参数
4853
+ *
4854
+ * @author zk
4855
+ * @date 2024-01-26 02:01:52
4856
+ * @param {string} url
4857
+ * @param {IContext} context
4858
+ * @return {*} {string}
4859
+ * @memberof FileUtil
4860
+ */
4861
+ calcOSSCatUrl(url, context, OSSCatName) {
4862
+ var _a;
4863
+ let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(url);
4864
+ const app = ibiz.hub.getApp(context.srfappid);
4865
+ const OSSCat = OSSCatName || app.model.defaultOSSCat || ((_a = app.model.userParam) == null ? void 0 : _a.DefaultOSSCat);
4866
+ uploadUrl = uploadUrl.replace("/{cat}", OSSCat ? "/".concat(OSSCat) : "");
4867
+ return uploadUrl;
4868
+ }
4869
+ /**
4870
+ * 计算文件的上传路径和下载路径
4871
+ * 下载路径文件id用%fileId%占位,替换即可
4872
+ * 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
4873
+ *
4874
+ * @author zk
4875
+ * @date 2024-01-26 02:01:15
4876
+ * @param {IData} data
4877
+ * @param {IContext} context
4878
+ * @param {IParams} params
4879
+ * @param {IParams} uploadParams
4880
+ * @param {IParams} exportParams
4881
+ * @return {*} {{
4882
+ * uploadUrl: string;
4883
+ * downloadUrl: string;
4884
+ * }}
4885
+ * @memberof FileUtil
4886
+ */
4887
+ calcFileUpDownUrl(context, params, data = {}, extraParams = {}) {
4888
+ const { uploadParams, exportParams, osscat: OSSCatName } = extraParams;
4889
+ let uploadUrl = this.calcOSSCatUrl(
4890
+ ibiz.env.uploadFileUrl,
4891
+ context,
4892
+ OSSCatName
4893
+ );
4894
+ let downloadUrl = this.calcOSSCatUrl(
4895
+ "".concat(ibiz.env.downloadFileUrl, "/%fileId%"),
4896
+ context,
4897
+ OSSCatName
4898
+ );
4899
+ let _uploadParams = {};
4900
+ let _exportParams = {};
4901
+ if (uploadParams) {
4902
+ _uploadParams = convertNavData(uploadParams, data, params, context);
4903
+ }
4904
+ if (exportParams) {
4905
+ _exportParams = convertNavData(exportParams, data, params, context);
4906
+ }
4907
+ uploadUrl += qs2.stringify(_uploadParams, { addQueryPrefix: true });
4908
+ downloadUrl += qs2.stringify(_exportParams, { addQueryPrefix: true });
4909
+ return { uploadUrl, downloadUrl };
4910
+ }
4911
+ /**
4912
+ * 请求url获取文件流,并用JS触发文件下载
4913
+ *
4914
+ * @author zk
4915
+ * @date 2024-01-26 02:01:29
4916
+ * @param {{ url: string; name: string }} file
4917
+ * @memberof FileUtil
4918
+ */
4919
+ async fileDownload(url, name) {
4920
+ const response = await ibiz.net.request(url, {
4921
+ method: "get",
4922
+ responseType: "blob",
4923
+ baseURL: ""
4924
+ // 已经有baseURL了,这里无需再写
4925
+ });
4926
+ if (response.status !== 200) {
4927
+ throw new RuntimeError5("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
4928
+ }
4929
+ if (!response.data) {
4930
+ throw new RuntimeError5("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
4931
+ } else {
4932
+ const fileName = name;
4933
+ downloadFileFromBlob(response.data, fileName);
4934
+ }
4935
+ }
4936
+ /**
4937
+ * 文件上传
4938
+ *
4939
+ * @author zk
4940
+ * @date 2024-01-26 05:01:35
4941
+ * @param {string} uploadUrl
4942
+ * @param {Blob} file
4943
+ * @param {IData} headers
4944
+ * @return {*} {Promise<IData>}
4945
+ * @memberof FileUtil
4946
+ */
4947
+ async fileUpload(uploadUrl, file, headers) {
4948
+ const formData = new FormData();
4949
+ formData.append("file", file);
4950
+ const res = await ibiz.net.axios({
4951
+ url: uploadUrl,
4952
+ method: "post",
4953
+ headers,
4954
+ data: formData
4955
+ });
4956
+ if (res.status !== 200) {
4957
+ throw new RuntimeError5("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25");
4958
+ }
4959
+ return res.data;
4960
+ }
4961
+ };
4962
+
3239
4963
  // src/command/app/open-app-view/open-app-view.ts
3240
- import { ModelError as ModelError15, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
4964
+ import { ModelError as ModelError15, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
3241
4965
  import { clone as clone17 } from "ramda";
3242
4966
 
3243
4967
  // src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
@@ -3344,7 +5068,7 @@ var PSModelCondEngineBase = class {
3344
5068
  };
3345
5069
 
3346
5070
  // src/service/utils/de-dq-cond/ps-model-group-cond-base.ts
3347
- import { RuntimeError as RuntimeError5 } from "@ibiz-template/core";
5071
+ import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
3348
5072
 
3349
5073
  // src/service/utils/de-dq-cond/ps-model-cond-base.ts
3350
5074
  var PSModelCondBase = class {
@@ -3497,7 +5221,7 @@ var PSModelGroupCondBase = class _PSModelGroupCondBase extends PSModelCondBase {
3497
5221
  }
3498
5222
  });
3499
5223
  } else {
3500
- throw new RuntimeError5("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
5224
+ throw new RuntimeError6("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
3501
5225
  }
3502
5226
  }
3503
5227
  }
@@ -3619,7 +5343,7 @@ _PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT = "WEBCONTEXT";
3619
5343
  var PSDEDQCondEngine = _PSDEDQCondEngine;
3620
5344
 
3621
5345
  // src/register/helper/app-counter-register.ts
3622
- import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
5346
+ import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
3623
5347
 
3624
5348
  // src/register/helper/common-register.ts
3625
5349
  async function getPluginRegisterKey(pluginId, appId2) {
@@ -3663,14 +5387,14 @@ async function getAppCounterProvider(model) {
3663
5387
  if (counterType === "CUSTOM") {
3664
5388
  provider = getProvider(codeName);
3665
5389
  if (!provider) {
3666
- throw new RuntimeError6("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
5390
+ throw new RuntimeError7("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3667
5391
  } else {
3668
5392
  return provider;
3669
5393
  }
3670
5394
  }
3671
5395
  provider = getProvider(counterType);
3672
5396
  if (!provider) {
3673
- throw new RuntimeError6("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
5397
+ throw new RuntimeError7("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3674
5398
  } else {
3675
5399
  return provider;
3676
5400
  }
@@ -3956,7 +5680,7 @@ async function getPortletProvider(model) {
3956
5680
  }
3957
5681
 
3958
5682
  // src/register/helper/ui-action-register.ts
3959
- import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
5683
+ import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
3960
5684
  var UIACTION_PROVIDER_PREFIX = "UIACTION";
3961
5685
  function registerUIActionProvider(key, callback) {
3962
5686
  ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -3986,14 +5710,14 @@ async function getUIActionProvider(model) {
3986
5710
  }
3987
5711
  provider = getProvider8(uiactionMode);
3988
5712
  if (!provider) {
3989
- throw new RuntimeError7("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
5713
+ throw new RuntimeError8("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
3990
5714
  } else {
3991
5715
  return provider;
3992
5716
  }
3993
5717
  }
3994
5718
 
3995
5719
  // src/register/helper/ui-logic-node-register.ts
3996
- import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
5720
+ import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
3997
5721
  var UILOGINNODE_PROVIDER_PREFIX = "UI_LOGIN_NODE";
3998
5722
  function registerUILogicNodeProvider(key, callback) {
3999
5723
  ibiz.register.register("".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -4009,7 +5733,7 @@ async function getUILogicNodeProvider(model) {
4009
5733
  if (provider) {
4010
5734
  return provider;
4011
5735
  }
4012
- throw new RuntimeError8(
5736
+ throw new RuntimeError9(
4013
5737
  "\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668")
4014
5738
  );
4015
5739
  }
@@ -4059,7 +5783,7 @@ async function getViewProvider(model) {
4059
5783
  }
4060
5784
 
4061
5785
  // src/register/helper/async-action-register.ts
4062
- import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
5786
+ import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
4063
5787
  var ASYNC_ACTION_PROVIDER_PREFIX = "ASYNC_ACTION";
4064
5788
  function registerAsyncActionProvider(key, callback) {
4065
5789
  ibiz.register.register("".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -4069,19 +5793,19 @@ function getProvider10(key) {
4069
5793
  "".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key)
4070
5794
  );
4071
5795
  }
4072
- function getAsyncActionProvider(actiontype) {
5796
+ function getAsyncActionProvider(action) {
4073
5797
  const provider = getProvider10(
4074
- actiontype || "DEFAULT"
5798
+ action.actiontype || "DEFAULT"
4075
5799
  );
4076
5800
  if (!provider) {
4077
- throw new RuntimeError9("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
5801
+ throw new RuntimeError10("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(action.actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
4078
5802
  } else {
4079
5803
  return provider;
4080
5804
  }
4081
5805
  }
4082
5806
 
4083
5807
  // src/platform/provider/platform-provider-base.ts
4084
- import { downloadFileFromBlob, RuntimeError as RuntimeError10 } from "@ibiz-template/core";
5808
+ import { downloadFileFromBlob as downloadFileFromBlob2, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
4085
5809
  var PlatformProviderBase = class {
4086
5810
  back() {
4087
5811
  throw new Error("Method not implemented.");
@@ -4099,13 +5823,13 @@ var PlatformProviderBase = class {
4099
5823
  baseURL: ""
4100
5824
  });
4101
5825
  if (response.status !== 200) {
4102
- throw new RuntimeError10("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
5826
+ throw new RuntimeError11("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
4103
5827
  }
4104
5828
  if (!response.data) {
4105
- throw new RuntimeError10("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
5829
+ throw new RuntimeError11("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
4106
5830
  } else {
4107
5831
  const fileName = name;
4108
- downloadFileFromBlob(response.data, fileName);
5832
+ downloadFileFromBlob2(response.data, fileName);
4109
5833
  return Promise.resolve(true);
4110
5834
  }
4111
5835
  }
@@ -4177,7 +5901,7 @@ function getPlatformProvider() {
4177
5901
  }
4178
5902
 
4179
5903
  // src/register/helper/de-method-register.ts
4180
- import { RuntimeError as RuntimeError11 } from "@ibiz-template/core";
5904
+ import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
4181
5905
  var DEMETHOD_PROVIDER_PREFIX = "DEMETHOD";
4182
5906
  function registerDEMethodProvider(key, callback) {
4183
5907
  ibiz.register.register("".concat(DEMETHOD_PROVIDER_PREFIX, "_").concat(key), callback);
@@ -4203,7 +5927,7 @@ async function getDEMethodProvider(model) {
4203
5927
  }
4204
5928
  provider = getProvider12(methodType);
4205
5929
  if (!provider) {
4206
- throw new RuntimeError11("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
5930
+ throw new RuntimeError12("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
4207
5931
  } else {
4208
5932
  return provider;
4209
5933
  }
@@ -4273,7 +5997,7 @@ async function getAppMenuItemProvider(model) {
4273
5997
  }
4274
5998
 
4275
5999
  // src/register/helper/internal-message-register.ts
4276
- import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
6000
+ import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
4277
6001
  var INTERNAL_MESSAGE_PROVIDER_PREFIX = "INTERNAL_MESSAGE";
4278
6002
  function registerInternalMessageProvider(key, callback) {
4279
6003
  ibiz.register.register(
@@ -4288,17 +6012,17 @@ function getProvider15(key) {
4288
6012
  }
4289
6013
  function getInternalMessageProvider(msg) {
4290
6014
  const provider = getProvider15(
4291
- msg.message_type || "DEFAULT"
6015
+ msg.content_type || "DEFAULT"
4292
6016
  );
4293
6017
  if (!provider) {
4294
- throw new RuntimeError12("\u627E\u4E0D\u7AD9\u5185\u4FE1\u7C7B\u578B".concat(msg.message_type, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
6018
+ throw new RuntimeError13("\u627E\u4E0D\u7AD9\u5185\u4FE1\u7C7B\u578B".concat(msg.content_type, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
4295
6019
  } else {
4296
6020
  return provider;
4297
6021
  }
4298
6022
  }
4299
6023
 
4300
6024
  // src/service/utils/app-counter/app-counter.ts
4301
- import { IBizContext, RuntimeError as RuntimeError13 } from "@ibiz-template/core";
6025
+ import { IBizContext, RuntimeError as RuntimeError14 } from "@ibiz-template/core";
4302
6026
  import { notNilEmpty as notNilEmpty5, QXEvent as QXEvent2 } from "qx-util";
4303
6027
  import { clone as clone3 } from "ramda";
4304
6028
  var AppCounter = class {
@@ -4403,7 +6127,7 @@ var AppCounter = class {
4403
6127
  * @return {*} {Promise<IData>}
4404
6128
  */
4405
6129
  async load() {
4406
- throw new RuntimeError13("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
6130
+ throw new RuntimeError14("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
4407
6131
  }
4408
6132
  /**
4409
6133
  * 计数器刷新
@@ -4648,7 +6372,7 @@ var DynamicCodeListCache = class {
4648
6372
  const { predefinedType } = this.codeList;
4649
6373
  if (predefinedType) {
4650
6374
  this.isPredefined = true;
4651
- if (!["OPERATOR", "RUNTIME"].includes(predefinedType)) {
6375
+ if (!["OPERATOR", "RUNTIME", "DEMAINSTATE"].includes(predefinedType)) {
4652
6376
  throw new ModelError5(
4653
6377
  this.codeList,
4654
6378
  "\u9884\u5B9A\u4E49\u7C7B\u578B".concat(predefinedType, "\u6682\u4E0D\u652F\u6301")
@@ -4759,8 +6483,11 @@ var DynamicCodeListCache = class {
4759
6483
  tempParams.size = 1e4;
4760
6484
  }
4761
6485
  if (this.isPredefined && this.codeList.codeName) {
4762
- const index = this.codeList.codeName.indexOf("__");
4763
- const tag = index !== -1 ? this.codeList.codeName.substring(index + 2) : this.codeList.codeName;
6486
+ let tag = this.codeList.codeName;
6487
+ if (this.codeList.predefinedType === "OPERATOR") {
6488
+ const index = this.codeList.codeName.indexOf("__");
6489
+ tag = index !== -1 ? this.codeList.codeName.substring(index + 2) : this.codeList.codeName;
6490
+ }
4764
6491
  const res2 = await app.net.get(
4765
6492
  "/dictionaries/codelist/".concat(tag),
4766
6493
  tempParams
@@ -4860,10 +6587,10 @@ var DynamicCodeListCache = class {
4860
6587
  // src/service/utils/de-cache/de-cache.ts
4861
6588
  import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
4862
6589
  import { createUUID as createUUID2 } from "qx-util";
4863
- import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
6590
+ import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
4864
6591
 
4865
6592
  // src/service/utils/service-exist-util/service-exist-util.ts
4866
- import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
6593
+ import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
4867
6594
  import { isEmpty as isEmpty4, isNil as isNil4 } from "ramda";
4868
6595
  function isExistSrfKey(funcName, entity) {
4869
6596
  if (entity != null) {
@@ -4872,14 +6599,14 @@ function isExistSrfKey(funcName, entity) {
4872
6599
  return true;
4873
6600
  }
4874
6601
  }
4875
- throw new RuntimeError14("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
6602
+ throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
4876
6603
  }
4877
6604
  function isExistSessionId(funcName, context) {
4878
6605
  const { srfsessionid } = context;
4879
6606
  if (!isNil4(srfsessionid) && !isEmpty4(srfsessionid)) {
4880
6607
  return true;
4881
6608
  }
4882
- throw new RuntimeError14("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
6609
+ throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
4883
6610
  }
4884
6611
 
4885
6612
  // src/service/utils/de-cache/de-cache.ts
@@ -4958,15 +6685,14 @@ var DECache = class {
4958
6685
  *
4959
6686
  * @param {*} context
4960
6687
  * @param {IDataEntity} entity
4961
- * @param {boolean} [ignoreDuplicate=true] 是否忽略主键重复(不忽略报错,忽略则覆盖)
4962
6688
  * @return {*} {boolean}
4963
6689
  * @memberof EntityCache
4964
6690
  */
4965
- add(context, entity, ignoreDuplicate = true) {
6691
+ add(context, entity) {
4966
6692
  if (this.isUnionKey) {
4967
6693
  this.calcUnionKey(entity);
4968
- if (ignoreDuplicate === false && this.checkData(context, entity.srfkey)) {
4969
- throw new RuntimeError15(
6694
+ if (this.checkData(context, entity.srfkey)) {
6695
+ throw new RuntimeError16(
4970
6696
  "\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
4971
6697
  );
4972
6698
  }
@@ -5019,16 +6745,15 @@ var DECache = class {
5019
6745
  *
5020
6746
  * @param {IContext} context
5021
6747
  * @param {IDataEntity} entity
5022
- * @param {boolean} [ignoreDuplicate=true] 是否忽略主键重复(不忽略报错,忽略则覆盖)
5023
6748
  * @return {*} {IDataEntity}
5024
6749
  * @memberof EntityCache
5025
6750
  */
5026
- update(context, entity, ignoreDuplicate = true) {
6751
+ update(context, entity) {
5027
6752
  const oldKey = entity.srfkey;
5028
6753
  if (this.isUnionKey) {
5029
6754
  this.calcUnionKey(entity);
5030
- if (ignoreDuplicate === false && oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
5031
- throw new RuntimeError15(
6755
+ if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
6756
+ throw new RuntimeError16(
5032
6757
  "\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
5033
6758
  );
5034
6759
  }
@@ -5164,7 +6889,7 @@ var DECache = class {
5164
6889
  if (this.isUnionKey) {
5165
6890
  this.calcUnionKey(entity);
5166
6891
  if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
5167
- throw new RuntimeError15(
6892
+ throw new RuntimeError16(
5168
6893
  "\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
5169
6894
  );
5170
6895
  }
@@ -5477,8 +7202,36 @@ function fieldValueToBoolean(value) {
5477
7202
  return [1, "1", true, "true"].includes(value);
5478
7203
  }
5479
7204
 
7205
+ // src/service/utils/dyna-sys-params/dyna-sys-params.ts
7206
+ async function calcDynaSysParams(appDataEntityId, context, opts = {}) {
7207
+ const appId2 = opts.appId || context.srfappid;
7208
+ const viewParams = opts.viewParams || {};
7209
+ const loadModelParams = {};
7210
+ const appDe = await ibiz.hub.getAppDataEntity(appDataEntityId, appId2);
7211
+ if (viewParams.srfkey) {
7212
+ loadModelParams.srfkey = viewParams.srfkey;
7213
+ } else {
7214
+ const srfkey = context[appDe.codeName.toLowerCase()];
7215
+ if (srfkey) {
7216
+ loadModelParams.srfkey = srfkey;
7217
+ }
7218
+ }
7219
+ if (viewParams.srfparentkey && viewParams.srfparentdeanme) {
7220
+ loadModelParams.srfparentkey = viewParams.srfparentkey;
7221
+ loadModelParams.srfparentdeanme = viewParams.srfparentdeanme;
7222
+ } else {
7223
+ const match = getMatchResPath(context, appDe);
7224
+ if (match && match.keys.length > 1) {
7225
+ const parentDeKey = match.keys[match.keys.length - 2];
7226
+ loadModelParams.srfparentkey = viewParams.srfparentkey || context[parentDeKey];
7227
+ loadModelParams.srfparentdeanme = viewParams.srfparentdeanme || parentDeKey;
7228
+ }
7229
+ }
7230
+ return loadModelParams;
7231
+ }
7232
+
5480
7233
  // src/service/service/code-list/code-list.service.ts
5481
- import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
7234
+ import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
5482
7235
  var CodeListService = class {
5483
7236
  constructor(appModel) {
5484
7237
  this.appModel = appModel;
@@ -5625,7 +7378,7 @@ var CodeListService = class {
5625
7378
  async get(tag, context, params) {
5626
7379
  const codeList = this.allCodeLists.get(tag);
5627
7380
  if (!codeList) {
5628
- throw new RuntimeError16("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
7381
+ throw new RuntimeError17("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
5629
7382
  }
5630
7383
  if (codeList.codeListType === "STATIC") {
5631
7384
  return this.getStatic(codeList);
@@ -5747,12 +7500,12 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
5747
7500
  // src/service/service/entity/de.service.ts
5748
7501
  import {
5749
7502
  ModelError as ModelError7,
5750
- RuntimeError as RuntimeError18,
7503
+ RuntimeError as RuntimeError19,
5751
7504
  RuntimeModelError as RuntimeModelError10
5752
7505
  } from "@ibiz-template/core";
5753
7506
 
5754
7507
  // src/service/service/work-flow/work-flow.service.ts
5755
- import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
7508
+ import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
5756
7509
  var WorkFlowService = class {
5757
7510
  /**
5758
7511
  * Creates an instance of WorkFlowService.
@@ -6074,7 +7827,7 @@ var WorkFlowService = class {
6074
7827
  case "sendcopy":
6075
7828
  return this.wfSendCopy(context, params, data);
6076
7829
  default: {
6077
- throw new RuntimeError17("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
7830
+ throw new RuntimeError18("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
6078
7831
  }
6079
7832
  }
6080
7833
  }
@@ -6459,6 +8212,7 @@ var MethodDto = class {
6459
8212
  * @return {*} {Promise<IDataEntity[]>}
6460
8213
  */
6461
8214
  async sets(context, data) {
8215
+ const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
6462
8216
  return Promise.all(
6463
8217
  data.map(async (datum) => {
6464
8218
  const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
@@ -6469,7 +8223,14 @@ var MethodDto = class {
6469
8223
  if (!field.refAppDataEntityId) {
6470
8224
  return;
6471
8225
  }
8226
+ const configs = uiDomain.getDERConfig(field.refAppDataEntityId);
8227
+ const deRs = configs.find((rs) => {
8228
+ return rs.majorAppDataEntityId === this.entity.id;
8229
+ });
6472
8230
  const dto = await this.getFieldDto(context, field);
8231
+ if (!deRs) {
8232
+ dto.service.local.clear();
8233
+ }
6473
8234
  const items = datum[key];
6474
8235
  if (items && items.length > 0) {
6475
8236
  const pKey = datum[this.entity.keyAppDEFieldId];
@@ -6646,7 +8407,7 @@ var DEService = class {
6646
8407
  if (method) {
6647
8408
  return method.exec(context, params, params2);
6648
8409
  }
6649
- throw new RuntimeError18("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
8410
+ throw new RuntimeError19("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6650
8411
  }
6651
8412
  getDraft(context, params, params2) {
6652
8413
  return this.exec("GetDraft", context, params, params2);
@@ -6700,7 +8461,7 @@ var DEService = class {
6700
8461
  if (method) {
6701
8462
  return method.exec(context, params, params2);
6702
8463
  }
6703
- throw new RuntimeError18("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
8464
+ throw new RuntimeError19("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
6704
8465
  }
6705
8466
  /**
6706
8467
  * 实体级别 AI 聊天会话
@@ -7093,7 +8854,7 @@ var ControlService = class {
7093
8854
  };
7094
8855
 
7095
8856
  // src/service/service/control/md-control.service.ts
7096
- import { RuntimeError as RuntimeError19 } from "@ibiz-template/core";
8857
+ import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
7097
8858
  import { isArray as isArray3 } from "qx-util";
7098
8859
  var MDControlService = class extends ControlService {
7099
8860
  /**
@@ -7222,7 +8983,7 @@ var MDControlService = class extends ControlService {
7222
8983
  * @returns {*} {Promise<IHttpResponse>}
7223
8984
  */
7224
8985
  async exportData(_dataExport, _context, _params = {}) {
7225
- throw new RuntimeError19("\u672A\u5B9E\u73B0");
8986
+ throw new RuntimeError20("\u672A\u5B9E\u73B0");
7226
8987
  }
7227
8988
  /**
7228
8989
  * 处理响应
@@ -7257,7 +9018,7 @@ var MDControlService = class extends ControlService {
7257
9018
  };
7258
9019
 
7259
9020
  // src/service/service/authority/authority.service.ts
7260
- import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
9021
+ import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
7261
9022
 
7262
9023
  // src/service/service/authority/de-authority.service.ts
7263
9024
  var DeAuthorityService = class {
@@ -7393,7 +9154,7 @@ var AuthorityService = class {
7393
9154
  this.appModel.appId
7394
9155
  );
7395
9156
  if (!entityModel) {
7396
- throw new RuntimeError20("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
9157
+ throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
7397
9158
  }
7398
9159
  const constructor = this.constructorCache.get(id);
7399
9160
  let service;
@@ -7575,6 +9336,9 @@ var V7AuthService = class {
7575
9336
  true
7576
9337
  );
7577
9338
  }
9339
+ ibiz.hub.getAllApps().forEach((app) => {
9340
+ app.initMqtt();
9341
+ });
7578
9342
  }
7579
9343
  this.extendLogin();
7580
9344
  }, wait);
@@ -7624,7 +9388,7 @@ var AsyncActionService = class {
7624
9388
  import {
7625
9389
  HttpError as HttpError5,
7626
9390
  HttpResponse as HttpResponse3,
7627
- RuntimeError as RuntimeError22,
9391
+ RuntimeError as RuntimeError23,
7628
9392
  RuntimeModelError as RuntimeModelError22
7629
9393
  } from "@ibiz-template/core";
7630
9394
  import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
@@ -7855,7 +9619,7 @@ var Method = class {
7855
9619
  };
7856
9620
 
7857
9621
  // src/de-logic/index.ts
7858
- import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError21 } from "@ibiz-template/core";
9622
+ import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
7859
9623
  import { isArray as isArray5 } from "lodash-es";
7860
9624
  import { clone as clone13 } from "ramda";
7861
9625
 
@@ -8917,7 +10681,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
8917
10681
  context.srfappid
8918
10682
  );
8919
10683
  if (!deLogic) {
8920
- throw new RuntimeError21("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
10684
+ throw new RuntimeError22("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
8921
10685
  }
8922
10686
  return execDELogic(deLogic, context, data, params);
8923
10687
  }
@@ -9062,7 +10826,7 @@ var DEActionMethod = class extends Method {
9062
10826
  */
9063
10827
  async create(context, data, params) {
9064
10828
  if (!data) {
9065
- throw new RuntimeError22("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
10829
+ throw new RuntimeError23("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
9066
10830
  }
9067
10831
  if (this.isLocalMode) {
9068
10832
  return this.createTemp(context, this.createEntity(data));
@@ -9104,7 +10868,7 @@ var DEActionMethod = class extends Method {
9104
10868
  */
9105
10869
  async update(context, data, params) {
9106
10870
  if (!data) {
9107
- throw new RuntimeError22("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
10871
+ throw new RuntimeError23("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
9108
10872
  }
9109
10873
  if (this.isLocalMode) {
9110
10874
  return this.updateTemp(context, this.createEntity(data));
@@ -9173,18 +10937,13 @@ var DEActionMethod = class extends Method {
9173
10937
  if (isArray6(addData)) {
9174
10938
  resultData = await Promise.all(
9175
10939
  addData.map(
9176
- (item) => this.service.local.add(
9177
- context,
9178
- this.attach(context, item),
9179
- false
9180
- )
10940
+ (item) => this.service.local.add(context, this.attach(context, item))
9181
10941
  )
9182
10942
  );
9183
10943
  } else {
9184
10944
  resultData = await this.service.local.add(
9185
10945
  context,
9186
- this.attach(context, addData),
9187
- false
10946
+ this.attach(context, addData)
9188
10947
  );
9189
10948
  }
9190
10949
  return new HttpResponse3(resultData);
@@ -9356,18 +11115,13 @@ var DEActionMethod = class extends Method {
9356
11115
  if (isArray6(updateData)) {
9357
11116
  resultData = await Promise.all(
9358
11117
  updateData.map(
9359
- (item) => this.service.local.update(
9360
- context,
9361
- this.attach(context, item),
9362
- false
9363
- )
11118
+ (item) => this.service.local.update(context, this.attach(context, item))
9364
11119
  )
9365
11120
  );
9366
11121
  } else {
9367
11122
  resultData = await this.service.local.update(
9368
11123
  context,
9369
- this.attach(context, updateData),
9370
- false
11124
+ this.attach(context, updateData)
9371
11125
  );
9372
11126
  }
9373
11127
  if (resultData) {
@@ -9623,9 +11377,16 @@ var InternalMessageService = class {
9623
11377
  * @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
9624
11378
  */
9625
11379
  async fetch(params = {}) {
9626
- const res = {
9627
- ok: true
11380
+ const fetchParams = {
11381
+ page: 0,
11382
+ size: 20,
11383
+ sort: "update_time,desc"
9628
11384
  };
11385
+ Object.assign(fetchParams, params);
11386
+ const res = await ibiz.net.post(
11387
+ "".concat(this.baseUrl, "/fetch_cur_receiver"),
11388
+ fetchParams
11389
+ );
9629
11390
  if (res.headers) {
9630
11391
  if (res.headers["x-page"]) {
9631
11392
  res.page = Number(res.headers["x-page"]);
@@ -9640,16 +11401,6 @@ var InternalMessageService = class {
9640
11401
  if (isNil12(res.data)) {
9641
11402
  res.data = [];
9642
11403
  }
9643
- res.page = params.page;
9644
- res.total = 34;
9645
- res.data = Array.from({ length: params.size }, (_, i) => ({
9646
- id: i + 1,
9647
- status: "RECEIVED",
9648
- title: "\u6807\u9898".concat(i + 1),
9649
- content: "\u5185\u5BB9".concat(i + 1, "\u957F\u5185\u5BB9"),
9650
- short_content: "\u5185\u5BB9".concat(i + 1, "\u77ED\u5185\u5BB9"),
9651
- create_time: (/* @__PURE__ */ new Date()).toISOString()
9652
- }));
9653
11404
  return res;
9654
11405
  }
9655
11406
  /**
@@ -9798,6 +11549,9 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
9798
11549
  const dataItemKeyMap = /* @__PURE__ */ new Map();
9799
11550
  const dataItemDefaultMap = /* @__PURE__ */ new Map();
9800
11551
  (_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
11552
+ if (!dataItem.appDEFieldId) {
11553
+ return;
11554
+ }
9801
11555
  const dataItemKey = dataItem.id.toLowerCase();
9802
11556
  const deFieldKey = dataItem.appDEFieldId.toLowerCase();
9803
11557
  dataItemKeyMap.set(dataItemKey, deFieldKey);
@@ -9807,6 +11561,9 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
9807
11561
  });
9808
11562
  const nodeColumnKeyMap = /* @__PURE__ */ new Map();
9809
11563
  (_b = model.detreeNodeColumns) == null ? void 0 : _b.forEach((column) => {
11564
+ if (column.columnType !== "DEFGRIDCOLUMN") {
11565
+ return;
11566
+ }
9810
11567
  const columnKey = column.detreeColumnId;
9811
11568
  const dataItemKey = column.dataItemName;
9812
11569
  if (!columnKey || !dataItemKey) {
@@ -10505,11 +12262,12 @@ var MqttService = class {
10505
12262
  close() {
10506
12263
  var _a;
10507
12264
  (_a = this.client) == null ? void 0 : _a.end();
12265
+ this.evt.reset();
10508
12266
  }
10509
12267
  };
10510
12268
 
10511
12269
  // src/service/de-service-util.ts
10512
- import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
12270
+ import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
10513
12271
  var _DEServiceUtil = class _DEServiceUtil {
10514
12272
  /**
10515
12273
  * Creates an instance of DEServiceUtil.
@@ -10562,7 +12320,7 @@ var _DEServiceUtil = class _DEServiceUtil {
10562
12320
  this.appModel.appId
10563
12321
  );
10564
12322
  if (!entityModel) {
10565
- throw new RuntimeError23("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
12323
+ throw new RuntimeError24("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
10566
12324
  }
10567
12325
  const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
10568
12326
  let service;
@@ -10694,7 +12452,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
10694
12452
  const context = clone17(_context);
10695
12453
  const appView = await ibiz.hub.config.view.get(appViewId);
10696
12454
  if (!appView) {
10697
- throw new RuntimeError24("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
12455
+ throw new RuntimeError25("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
10698
12456
  }
10699
12457
  if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
10700
12458
  const deName = calcDeCodeNameById(appView.appDataEntityId);
@@ -10806,7 +12564,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
10806
12564
  */
10807
12565
  async openPopover(appView, event, context, params = {}) {
10808
12566
  if (!event) {
10809
- throw new RuntimeError24("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
12567
+ throw new RuntimeError25("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
10810
12568
  }
10811
12569
  return ibiz.openView.popover(appView.id, event, context, params);
10812
12570
  }
@@ -10862,7 +12620,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10862
12620
  const app = await ibiz.hub.getAppAsync(context.srfappid);
10863
12621
  const appFunc = app.getAppFunc(appFuncId);
10864
12622
  if (!appFunc) {
10865
- throw new RuntimeError25("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
12623
+ throw new RuntimeError26("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
10866
12624
  }
10867
12625
  const { navigateContexts, navigateParams, appFuncType } = appFunc;
10868
12626
  const _context = context.clone();
@@ -10896,7 +12654,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10896
12654
  */
10897
12655
  async openAppView(appFunc, context, params, opts) {
10898
12656
  if (!appFunc.appViewId) {
10899
- throw new RuntimeError25("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
12657
+ throw new RuntimeError26("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
10900
12658
  }
10901
12659
  return ibiz.commands.execute(
10902
12660
  OpenAppViewCommand.TAG,
@@ -10930,7 +12688,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10930
12688
  */
10931
12689
  openPdAppFunc(appFunc, context, params) {
10932
12690
  ibiz.log.warn("openPdAppFunc", appFunc, context, params);
10933
- throw new RuntimeError25("\u672A\u5B9E\u73B0");
12691
+ throw new RuntimeError26("\u672A\u5B9E\u73B0");
10934
12692
  }
10935
12693
  /**
10936
12694
  * 执行 JavaScript 脚本
@@ -10944,7 +12702,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10944
12702
  */
10945
12703
  executeJavaScript(appFunc, context, params) {
10946
12704
  ibiz.log.warn("executeJavaScript", appFunc, context, params);
10947
- throw new RuntimeError25("\u672A\u5B9E\u73B0");
12705
+ throw new RuntimeError26("\u672A\u5B9E\u73B0");
10948
12706
  }
10949
12707
  /**
10950
12708
  * 自定义应用功能
@@ -10958,7 +12716,7 @@ var _AppFuncCommand = class _AppFuncCommand {
10958
12716
  */
10959
12717
  custom(appFunc, context, params) {
10960
12718
  ibiz.log.warn("custom", appFunc, context, params);
10961
- throw new RuntimeError25("\u672A\u5B9E\u73B0");
12719
+ throw new RuntimeError26("\u672A\u5B9E\u73B0");
10962
12720
  }
10963
12721
  };
10964
12722
  /**
@@ -10979,7 +12737,7 @@ function installCommand() {
10979
12737
  }
10980
12738
 
10981
12739
  // src/app-hub.ts
10982
- import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
12740
+ import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
10983
12741
 
10984
12742
  // src/application.ts
10985
12743
  import { Net, getToken } from "@ibiz-template/core";
@@ -11034,17 +12792,7 @@ var Application = class {
11034
12792
  async init() {
11035
12793
  await this.authority.init();
11036
12794
  await this.loadAppModelStyle();
11037
- if (ibiz.env.enableMqtt && ibiz.appData && ibiz.appData.mqtttopic && ibiz.auth.isAnonymous !== true) {
11038
- this.mqtt = new MqttService(
11039
- ibiz.appData.mqtttopic,
11040
- getToken(),
11041
- this.model.appId
11042
- );
11043
- this.mqtt.evt.on("message", (message) => {
11044
- ibiz.mc.command.asyncAction.next(message);
11045
- });
11046
- await this.mqtt.connect();
11047
- }
12795
+ await this.initMqtt();
11048
12796
  }
11049
12797
  /**
11050
12798
  * 加载应用模型全局样式
@@ -11140,6 +12888,28 @@ var Application = class {
11140
12888
  return logic.id === deUILogicId;
11141
12889
  });
11142
12890
  }
12891
+ /**
12892
+ * 初始化Mqtt服务
12893
+ * @author lxm
12894
+ * @date 2024-01-25 10:47:06
12895
+ * @return {*} {Promise<void>}
12896
+ */
12897
+ async initMqtt() {
12898
+ if (this.mqtt) {
12899
+ this.mqtt.close();
12900
+ }
12901
+ if (ibiz.env.enableMqtt && ibiz.appData && ibiz.appData.mqtttopic && ibiz.auth.isAnonymous !== true) {
12902
+ this.mqtt = new MqttService(
12903
+ ibiz.appData.mqtttopic,
12904
+ getToken(),
12905
+ this.model.appId
12906
+ );
12907
+ this.mqtt.evt.on("message", (message) => {
12908
+ ibiz.mc.command.next(message);
12909
+ });
12910
+ await this.mqtt.connect();
12911
+ }
12912
+ }
11143
12913
  };
11144
12914
 
11145
12915
  // src/hub/convert/app-menu-convert/app-menu-convert.ts
@@ -11171,7 +12941,7 @@ var Convert = class {
11171
12941
  };
11172
12942
 
11173
12943
  // src/hub/config/app-view-config-service.ts
11174
- import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
12944
+ import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
11175
12945
  var AppViewConfigService = class {
11176
12946
  constructor() {
11177
12947
  /**
@@ -11213,7 +12983,7 @@ var AppViewConfigService = class {
11213
12983
  if (!this.viewConfigs.has(id)) {
11214
12984
  const model = await ibiz.hub.getAppView(id);
11215
12985
  if (!model) {
11216
- throw new RuntimeError26("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
12986
+ throw new RuntimeError27("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
11217
12987
  }
11218
12988
  this.set(model.id, {
11219
12989
  id: model.id,
@@ -11277,14 +13047,14 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
11277
13047
 
11278
13048
  // src/controller/common/view/view.controller.ts
11279
13049
  import { notNilEmpty as notNilEmpty6 } from "qx-util";
11280
- import { IBizContext as IBizContext2, RuntimeError as RuntimeError33 } from "@ibiz-template/core";
13050
+ import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
11281
13051
  import { isEmpty as isEmpty8, isNil as isNil20, isNotNil as isNotNil2 } from "ramda";
11282
13052
 
11283
13053
  // src/controller/utils/loading/loading.state.ts
11284
13054
  import { NOOP } from "@ibiz-template/core";
11285
13055
 
11286
13056
  // src/controller/utils/counter/counter.ts
11287
- import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
13057
+ import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
11288
13058
  var Counter = class {
11289
13059
  /**
11290
13060
  * Creates an instance of Counter.
@@ -11346,7 +13116,7 @@ var Counter = class {
11346
13116
  return;
11347
13117
  }
11348
13118
  if (this.count === 0) {
11349
- throw new RuntimeError27("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
13119
+ throw new RuntimeError28("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
11350
13120
  }
11351
13121
  this.count -= 1;
11352
13122
  if (this.count === 0) {
@@ -11926,7 +13696,7 @@ function getOriginData(data) {
11926
13696
  }
11927
13697
 
11928
13698
  // src/controller/utils/value-rule/value-rule.ts
11929
- import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
13699
+ import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
11930
13700
  import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
11931
13701
  import { isNil as isNil16 } from "ramda";
11932
13702
  function generateRules(itemVRs, name, valueItemName) {
@@ -11976,7 +13746,7 @@ function generateRules(itemVRs, name, valueItemName) {
11976
13746
  deRule.groupCond
11977
13747
  );
11978
13748
  if (!isPast) {
11979
- callback(new RuntimeError28(infoMessage || deRule.ruleInfo));
13749
+ callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
11980
13750
  }
11981
13751
  return true;
11982
13752
  },
@@ -12046,7 +13816,7 @@ function generateEditorRules(editor) {
12046
13816
  }
12047
13817
 
12048
13818
  // src/controller/utils/value-ex/value-ex.ts
12049
- import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
13819
+ import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
12050
13820
  import { isNil as isNil17, mergeLeft } from "ramda";
12051
13821
  var ValueExUtil = class {
12052
13822
  /**
@@ -12078,7 +13848,7 @@ var ValueExUtil = class {
12078
13848
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
12079
13849
  if (["OBJECTS", "OBJECT"].includes(valueType)) {
12080
13850
  if (!objectNameField) {
12081
- throw new RuntimeError29("\u7F3A\u5C11objectNameField");
13851
+ throw new RuntimeError30("\u7F3A\u5C11objectNameField");
12082
13852
  }
12083
13853
  const textKey = objectNameField.toLowerCase();
12084
13854
  if (valueType === "OBJECTS") {
@@ -12094,7 +13864,7 @@ var ValueExUtil = class {
12094
13864
  };
12095
13865
 
12096
13866
  // src/controller/utils/value-default/value-default.ts
12097
- import { RuntimeError as RuntimeError30, ModelError as ModelError17 } from "@ibiz-template/core";
13867
+ import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
12098
13868
  import dayjs from "dayjs";
12099
13869
  import { createUUID as createUUID8 } from "qx-util";
12100
13870
  import { isNil as isNil18, isNotNil } from "ramda";
@@ -12135,7 +13905,7 @@ function getDefaultValue(opts, origins) {
12135
13905
  case "SESSION":
12136
13906
  case "APPLICATION":
12137
13907
  if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
12138
- throw new RuntimeError30("appdata.context\u4E0D\u5B58\u5728");
13908
+ throw new RuntimeError31("appdata.context\u4E0D\u5B58\u5728");
12139
13909
  }
12140
13910
  return ibiz.appData.context[defaultValue];
12141
13911
  case "CONTEXT":
@@ -12149,7 +13919,7 @@ function getDefaultValue(opts, origins) {
12149
13919
 
12150
13920
  // src/controller/utils/data-file-util/data-file-util.ts
12151
13921
  import {
12152
- RuntimeError as RuntimeError31
13922
+ RuntimeError as RuntimeError32
12153
13923
  } from "@ibiz-template/core";
12154
13924
  var asyncImportUrl = "asyncimportdata2";
12155
13925
  var importUrl = "importdata2";
@@ -12203,11 +13973,11 @@ async function importData(file, appDataEntity, dataImport) {
12203
13973
  }
12204
13974
  async function exportData(header, data, fileName) {
12205
13975
  if (!ibiz.util.getExcelUtil) {
12206
- throw new RuntimeError31("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
13976
+ throw new RuntimeError32("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
12207
13977
  }
12208
13978
  const exportExcel = await ibiz.util.getExcelUtil();
12209
13979
  if (!exportExcel) {
12210
- throw new RuntimeError31("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
13980
+ throw new RuntimeError32("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
12211
13981
  }
12212
13982
  try {
12213
13983
  exportExcel.exportJsonToExcel({
@@ -12455,7 +14225,7 @@ var BaseController = class {
12455
14225
  };
12456
14226
 
12457
14227
  // src/controller/utils/view-msg/view-msg-controller.ts
12458
- import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
14228
+ import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
12459
14229
  import { isNil as isNil19, mergeRight as mergeRight2 } from "ramda";
12460
14230
  var ViewMsgController = class _ViewMsgController {
12461
14231
  constructor(msgGroupId) {
@@ -12481,7 +14251,7 @@ var ViewMsgController = class _ViewMsgController {
12481
14251
  (item) => item.id === this.msgGroupId
12482
14252
  );
12483
14253
  if (!msgGroup) {
12484
- throw new RuntimeError32("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
14254
+ throw new RuntimeError33("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
12485
14255
  }
12486
14256
  this.msgGroup = msgGroup;
12487
14257
  const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
@@ -12495,7 +14265,7 @@ var ViewMsgController = class _ViewMsgController {
12495
14265
  }
12496
14266
  });
12497
14267
  if (msgDetailsViewMsgIds.length) {
12498
- throw new RuntimeError32(
14268
+ throw new RuntimeError33(
12499
14269
  "\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
12500
14270
  );
12501
14271
  }
@@ -12758,12 +14528,12 @@ var ViewController = class extends BaseController {
12758
14528
  initEngines() {
12759
14529
  const engineModels = getViewEngines(this.model);
12760
14530
  if (engineModels.length) {
12761
- engineModels.forEach((engine) => {
12762
- const ins = ibiz.engine.getEngine(engine, this);
14531
+ engineModels.forEach((engine2) => {
14532
+ const ins = ibiz.engine.getEngine(engine2, this);
12763
14533
  if (ins) {
12764
14534
  this.engines.push(ins);
12765
14535
  } else {
12766
- ibiz.log.warn("\u672A\u627E\u5230\u89C6\u56FE\u5F15\u64CE\u5B9E\u73B0\uFF1A", engine);
14536
+ ibiz.log.warn("\u672A\u627E\u5230\u89C6\u56FE\u5F15\u64CE\u5B9E\u73B0\uFF1A", engine2);
12767
14537
  }
12768
14538
  });
12769
14539
  } else {
@@ -12854,14 +14624,14 @@ var ViewController = class extends BaseController {
12854
14624
  }
12855
14625
  this.initViewMsg();
12856
14626
  if (this.engines.length) {
12857
- await Promise.all(this.engines.map((engine) => engine.onCreated()));
14627
+ await Promise.all(this.engines.map((engine2) => engine2.onCreated()));
12858
14628
  }
12859
14629
  }
12860
14630
  async onMounted() {
12861
14631
  var _a;
12862
14632
  await super.onMounted();
12863
14633
  if (this.engines.length) {
12864
- await Promise.all(this.engines.map((engine) => engine.onMounted()));
14634
+ await Promise.all(this.engines.map((engine2) => engine2.onMounted()));
12865
14635
  }
12866
14636
  (_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
12867
14637
  }
@@ -12869,7 +14639,7 @@ var ViewController = class extends BaseController {
12869
14639
  const srfSessionId = this.context.srfsessionid;
12870
14640
  await super.onDestroyed();
12871
14641
  if (this.engines.length) {
12872
- await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
14642
+ await Promise.all(this.engines.map((engine2) => engine2.onDestroyed()));
12873
14643
  }
12874
14644
  Object.values(this.counters).forEach((counter) => counter.destroy());
12875
14645
  this.ctx.destroy();
@@ -12914,8 +14684,8 @@ var ViewController = class extends BaseController {
12914
14684
  }
12915
14685
  async call(key, args) {
12916
14686
  let result;
12917
- for (const engine of this.engines) {
12918
- result = await engine.call(key, args);
14687
+ for (const engine2 of this.engines) {
14688
+ result = await engine2.call(key, args);
12919
14689
  if (result !== void 0) {
12920
14690
  break;
12921
14691
  }
@@ -12925,7 +14695,7 @@ var ViewController = class extends BaseController {
12925
14695
  async callUIAction(key, args) {
12926
14696
  const result = this.call(key, args);
12927
14697
  if (result === void 0) {
12928
- throw new RuntimeError33("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
14698
+ throw new RuntimeError34("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
12929
14699
  }
12930
14700
  return result;
12931
14701
  }
@@ -13168,6 +14938,11 @@ var EditorController = class {
13168
14938
  this.style.height = "".concat(height, "px");
13169
14939
  }
13170
14940
  }
14941
+ if (this.model.editorItems) {
14942
+ this.model.editorItems = this.model.editorItems.filter(
14943
+ (item) => item.id !== this.model.id
14944
+ );
14945
+ }
13171
14946
  }
13172
14947
  /**
13173
14948
  * 公共参数处理,计算上下文和视图参数
@@ -13603,7 +15378,7 @@ var ControlController = class extends BaseController {
13603
15378
  };
13604
15379
 
13605
15380
  // src/controller/common/control/md-control.controller.ts
13606
- import { isElementSame, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
15381
+ import { isElementSame, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
13607
15382
  import { debounce } from "lodash-es";
13608
15383
  var MDControlController = class extends ControlController {
13609
15384
  constructor() {
@@ -13886,7 +15661,7 @@ var MDControlController = class extends ControlController {
13886
15661
  async remove(args) {
13887
15662
  const { context, params, data } = this.handlerAbilityParams(args);
13888
15663
  if (!(data == null ? void 0 : data.length)) {
13889
- throw new RuntimeError34("\u672A\u9009\u4E2D\u6570\u636E");
15664
+ throw new RuntimeError35("\u672A\u9009\u4E2D\u6570\u636E");
13890
15665
  }
13891
15666
  if ((args == null ? void 0 : args.silent) !== true) {
13892
15667
  const del = await ibiz.confirm.error({
@@ -14035,7 +15810,7 @@ var MDControlController = class extends ControlController {
14035
15810
  (importItem) => importItem.id === dedataImportId
14036
15811
  );
14037
15812
  if (!dataImport) {
14038
- throw new RuntimeError34("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
15813
+ throw new RuntimeError35("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
14039
15814
  }
14040
15815
  let importName = "DataImport";
14041
15816
  if (dataImport.enableCustomized) {
@@ -14069,7 +15844,7 @@ var MDControlController = class extends ControlController {
14069
15844
  // src/controller/control/app-menu/app-menu.controller.ts
14070
15845
  import {
14071
15846
  findRecursiveChild,
14072
- RuntimeError as RuntimeError35,
15847
+ RuntimeError as RuntimeError36,
14073
15848
  RuntimeModelError as RuntimeModelError26
14074
15849
  } from "@ibiz-template/core";
14075
15850
  var AppMenuController = class extends ControlController {
@@ -14138,7 +15913,7 @@ var AppMenuController = class extends ControlController {
14138
15913
  childrenFields: ["appMenuItems"]
14139
15914
  });
14140
15915
  if (!menuItem) {
14141
- throw new RuntimeError35("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
15916
+ throw new RuntimeError36("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
14142
15917
  }
14143
15918
  this.evt.emit("onClick", {
14144
15919
  eventArg: id,
@@ -14267,7 +16042,7 @@ var AppMenuController = class extends ControlController {
14267
16042
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
14268
16043
  import {
14269
16044
  findRecursiveChild as findRecursiveChild2,
14270
- RuntimeError as RuntimeError36,
16045
+ RuntimeError as RuntimeError37,
14271
16046
  RuntimeModelError as RuntimeModelError27
14272
16047
  } from "@ibiz-template/core";
14273
16048
  var AppMenuIconViewController = class extends AppMenuController {
@@ -14277,7 +16052,7 @@ var AppMenuIconViewController = class extends AppMenuController {
14277
16052
  childrenFields: ["appMenuItems"]
14278
16053
  });
14279
16054
  if (!menuItem) {
14280
- throw new RuntimeError36("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16055
+ throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
14281
16056
  }
14282
16057
  this.evt.emit("onClick", {
14283
16058
  eventArg: id,
@@ -14305,7 +16080,7 @@ var AppMenuIconViewController = class extends AppMenuController {
14305
16080
  import dayjs3 from "dayjs";
14306
16081
 
14307
16082
  // src/controller/control/calendar/calendar.service.ts
14308
- import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
16083
+ import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
14309
16084
  var CalendarService = class extends MDControlService {
14310
16085
  /**
14311
16086
  * 执行查询多条数据的方法
@@ -14355,11 +16130,11 @@ var CalendarService = class extends MDControlService {
14355
16130
  setCalendarConfigData(items, index) {
14356
16131
  const { sysCalendarItems } = this.model;
14357
16132
  if (!sysCalendarItems) {
14358
- throw new RuntimeError37("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16133
+ throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
14359
16134
  }
14360
16135
  const calendarItem = sysCalendarItems[index];
14361
16136
  if (!calendarItem) {
14362
- throw new RuntimeError37("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16137
+ throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
14363
16138
  }
14364
16139
  return items.map((item) => {
14365
16140
  return new CalendarItemData(calendarItem, item);
@@ -14573,11 +16348,11 @@ var CalendarController = class extends MDControlController {
14573
16348
  };
14574
16349
 
14575
16350
  // src/controller/control/chart/chart.controller.ts
14576
- import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
16351
+ import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
14577
16352
 
14578
16353
  // src/controller/control/chart/generator/chart-options-generator.ts
14579
16354
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
14580
- import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
16355
+ import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
14581
16356
 
14582
16357
  // src/controller/control/chart/generator/line-series-generator.ts
14583
16358
  import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
@@ -14585,13 +16360,13 @@ import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
14585
16360
  // src/controller/control/chart/generator/base-series-generator.ts
14586
16361
  import { plus, RuntimeModelError as RuntimeModelError28, toNumberOrNil } from "@ibiz-template/core";
14587
16362
  import dayjs4 from "dayjs";
14588
- import minMax from "dayjs/plugin/minMax";
16363
+ import minMax2 from "dayjs/plugin/minMax";
14589
16364
  import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
14590
16365
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
14591
16366
  import weekOfYear from "dayjs/plugin/weekOfYear";
14592
16367
  import isoWeek from "dayjs/plugin/isoWeek";
14593
16368
  import { clone as clone19, isNil as isNil22, mergeDeepRight } from "ramda";
14594
- dayjs4.extend(minMax);
16369
+ dayjs4.extend(minMax2);
14595
16370
  dayjs4.extend(isSameOrBefore);
14596
16371
  dayjs4.extend(quarterOfYear);
14597
16372
  dayjs4.extend(weekOfYear);
@@ -15586,7 +17361,7 @@ var ChartOptionsGenerator2 = class {
15586
17361
  getChartDataByParams(params) {
15587
17362
  const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
15588
17363
  if (!generator) {
15589
- throw new RuntimeError38("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
17364
+ throw new RuntimeError39("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
15590
17365
  }
15591
17366
  return generator.getChartDataByParams(params);
15592
17367
  }
@@ -15699,10 +17474,10 @@ var ChartController = class extends MDControlController {
15699
17474
  */
15700
17475
  updateChart() {
15701
17476
  if (!this.chart) {
15702
- throw new RuntimeError39("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
17477
+ throw new RuntimeError40("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
15703
17478
  }
15704
17479
  if (!this.options) {
15705
- throw new RuntimeError39("options\u8FD8\u6CA1\u8BA1\u7B97");
17480
+ throw new RuntimeError40("options\u8FD8\u6CA1\u8BA1\u7B97");
15706
17481
  }
15707
17482
  this.chart.setOption(this.options, { notMerge: true });
15708
17483
  this.resizeChart();
@@ -15740,7 +17515,7 @@ var CaptionBarController = class extends ControlController {
15740
17515
  };
15741
17516
 
15742
17517
  // src/controller/control/toolbar/toolbar.controllerr.ts
15743
- import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError48 } from "@ibiz-template/core";
17518
+ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
15744
17519
 
15745
17520
  // src/ui-action/provider/backend-ui-action-provider.ts
15746
17521
  import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
@@ -15750,7 +17525,7 @@ import { isArray as isArray8 } from "qx-util";
15750
17525
  import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
15751
17526
 
15752
17527
  // src/ui-logic/index.ts
15753
- import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
17528
+ import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
15754
17529
 
15755
17530
  // src/ui-logic/ui-logic.ts
15756
17531
  import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
@@ -16301,7 +18076,7 @@ var EndNode2 = class extends UILogicNode {
16301
18076
  };
16302
18077
 
16303
18078
  // src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
16304
- import { ModelError as ModelError22, RuntimeError as RuntimeError40 } from "@ibiz-template/core";
18079
+ import { ModelError as ModelError22, RuntimeError as RuntimeError41 } from "@ibiz-template/core";
16305
18080
  import { clone as clone21 } from "ramda";
16306
18081
  var PrepareJSParamNode = class extends UILogicNode {
16307
18082
  async exec(ctx) {
@@ -16351,7 +18126,7 @@ var PrepareJSParamNode = class extends UILogicNode {
16351
18126
  setParamValue(nodeParam, ctx) {
16352
18127
  const { dstFieldName, dstDEUILogicParamId } = nodeParam;
16353
18128
  if (!dstDEUILogicParamId) {
16354
- throw new RuntimeError40("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
18129
+ throw new RuntimeError41("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
16355
18130
  }
16356
18131
  let dstField = dstFieldName;
16357
18132
  if (ctx.isEntityParam(dstDEUILogicParamId)) {
@@ -16468,7 +18243,7 @@ var PrepareJSParamNode = class extends UILogicNode {
16468
18243
  };
16469
18244
 
16470
18245
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
16471
- import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
18246
+ import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
16472
18247
  import { isFunction } from "lodash-es";
16473
18248
  var ViewCtrlInvokeNode = class extends UILogicNode {
16474
18249
  async exec(ctx) {
@@ -16485,14 +18260,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
16485
18260
  }
16486
18261
  const invokeParam = ctx.params[invokeParamId];
16487
18262
  if (!invokeParam) {
16488
- throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
18263
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
16489
18264
  }
16490
18265
  const invokeCtrl = ctx.params[invokeCtrlId];
16491
18266
  if (!invokeCtrl) {
16492
- throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
18267
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
16493
18268
  }
16494
18269
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
16495
- throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
18270
+ throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
16496
18271
  }
16497
18272
  await invokeCtrl[invokeMethod](invokeParam);
16498
18273
  }
@@ -16718,16 +18493,16 @@ var DataSetNode2 = class extends UILogicNode {
16718
18493
  };
16719
18494
 
16720
18495
  // src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
16721
- import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
18496
+ import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
16722
18497
  var ThrowExceptionNode2 = class extends UILogicNode {
16723
18498
  async exec(_ctx) {
16724
18499
  const { errorInfo } = this.model;
16725
- throw new RuntimeError42(errorInfo);
18500
+ throw new RuntimeError43(errorInfo);
16726
18501
  }
16727
18502
  };
16728
18503
 
16729
18504
  // src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
16730
- import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
18505
+ import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
16731
18506
  var ViewCtrlFireEventNode = class extends UILogicNode {
16732
18507
  async exec(ctx) {
16733
18508
  ctx.isEndNode = true;
@@ -16743,18 +18518,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
16743
18518
  }
16744
18519
  const invokeCtrl = ctx.params[fireCtrlId];
16745
18520
  if (!invokeCtrl) {
16746
- throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
18521
+ throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
16747
18522
  }
16748
18523
  const eventParam = ctx.params[eventParamId];
16749
18524
  if (!eventParam) {
16750
- throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
18525
+ throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
16751
18526
  }
16752
18527
  await invokeCtrl.evt.emit(eventName, eventParam);
16753
18528
  }
16754
18529
  };
16755
18530
 
16756
18531
  // src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
16757
- import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
18532
+ import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
16758
18533
  var ExecuteDELogicNode = class extends UILogicNode {
16759
18534
  async exec(ctx) {
16760
18535
  const {
@@ -16774,7 +18549,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
16774
18549
  }
16775
18550
  const dstParam = ctx.params[dstDEUILogicParamId];
16776
18551
  if (!dstParam) {
16777
- throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
18552
+ throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
16778
18553
  }
16779
18554
  const result = await execDELogicById(
16780
18555
  dstAppDELogicId,
@@ -17097,7 +18872,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
17097
18872
  const app = ibiz.hub.getApp(parameters.context.srfappid);
17098
18873
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
17099
18874
  if (!deUILogic) {
17100
- throw new RuntimeError45(
18875
+ throw new RuntimeError46(
17101
18876
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
17102
18877
  );
17103
18878
  }
@@ -17110,7 +18885,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
17110
18885
  }
17111
18886
 
17112
18887
  // src/ui-action/uiaction-util.ts
17113
- import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
18888
+ import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
17114
18889
  var UIActionUtil = class {
17115
18890
  /**
17116
18891
  * 执行界面行为
@@ -17125,7 +18900,7 @@ var UIActionUtil = class {
17125
18900
  static async exec(actionId, params, appId2) {
17126
18901
  const action = await getUIActionById(actionId, appId2);
17127
18902
  if (!action) {
17128
- throw new RuntimeError46("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
18903
+ throw new RuntimeError47("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
17129
18904
  }
17130
18905
  if (action.actionTarget === "SINGLEDATA") {
17131
18906
  const validateResult = await params.view.call("Validate" /* VALIDATE */);
@@ -17164,6 +18939,43 @@ var UIActionUtil = class {
17164
18939
  default:
17165
18940
  }
17166
18941
  }
18942
+ const action = await getUIActionById(actionId, appId2);
18943
+ if (action.asyncAction && !result.cancel) {
18944
+ this.handleAsyncAction(params.event);
18945
+ }
18946
+ }
18947
+ /**
18948
+ * 处理异步行为
18949
+ *
18950
+ * @author zk
18951
+ * @date 2024-01-23 11:01:58
18952
+ * @static
18953
+ * @param {(Event | undefined)} event
18954
+ * @return {*} {Promise<void>}
18955
+ * @memberof UIActionUtil
18956
+ */
18957
+ static async handleAsyncAction(event) {
18958
+ this.handleAsyncActionAnime(event);
18959
+ }
18960
+ /**
18961
+ * 处理异步行为动画
18962
+ *
18963
+ * @author zk
18964
+ * @date 2024-01-24 04:01:29
18965
+ * @private
18966
+ * @static
18967
+ * @param {(Event | undefined)} event
18968
+ * @return {*} {Promise<void>}
18969
+ * @memberof UIActionUtil
18970
+ */
18971
+ static async handleAsyncActionAnime(event) {
18972
+ if (!event || !event.target) {
18973
+ return;
18974
+ }
18975
+ await ibiz.util.anime.moveAndResize(
18976
+ event.target,
18977
+ "#".concat("preset-message" /* MESSAGE */)
18978
+ );
17167
18979
  }
17168
18980
  };
17169
18981
 
@@ -17553,7 +19365,7 @@ import {
17553
19365
  StringUtil,
17554
19366
  RuntimeModelError as RuntimeModelError51,
17555
19367
  ModelError as ModelError26,
17556
- RuntimeError as RuntimeError47
19368
+ RuntimeError as RuntimeError48
17557
19369
  } from "@ibiz-template/core";
17558
19370
  var FrontUIActionProvider = class extends UIActionProviderBase {
17559
19371
  async execAction(action, args) {
@@ -17663,7 +19475,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17663
19475
  if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
17664
19476
  requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
17665
19477
  } else {
17666
- throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
19478
+ throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
17667
19479
  }
17668
19480
  const res = await ibiz.net.request(requestUrl, {
17669
19481
  method: "get",
@@ -17690,10 +19502,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17690
19502
  window.open(link, "_blank");
17691
19503
  }
17692
19504
  } else {
17693
- throw new RuntimeError47("\u6253\u5370\u5931\u8D25");
19505
+ throw new RuntimeError48("\u6253\u5370\u5931\u8D25");
17694
19506
  }
17695
19507
  } else {
17696
- throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
19508
+ throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
17697
19509
  }
17698
19510
  }
17699
19511
  /**
@@ -17744,7 +19556,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17744
19556
  refreshMode: 1
17745
19557
  };
17746
19558
  }
17747
- throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
19559
+ throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
17748
19560
  }
17749
19561
  /**
17750
19562
  * 执行导出行为
@@ -17795,10 +19607,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
17795
19607
  URL.revokeObjectURL(elink.href);
17796
19608
  document.body.removeChild(elink);
17797
19609
  } else {
17798
- throw new RuntimeError47("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
19610
+ throw new RuntimeError48("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
17799
19611
  }
17800
19612
  } else {
17801
- throw new RuntimeError47("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
19613
+ throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
17802
19614
  }
17803
19615
  }
17804
19616
  };
@@ -17885,7 +19697,7 @@ var ToolbarController = class extends ControlController {
17885
19697
  const actionId = item.uiactionId;
17886
19698
  const uiAction = await getUIActionById(actionId, item.appId);
17887
19699
  if (!uiAction) {
17888
- throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
19700
+ throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
17889
19701
  }
17890
19702
  const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
17891
19703
  if (enableLoading) {
@@ -18945,7 +20757,7 @@ var DataViewControlController = class extends MDControlController {
18945
20757
  import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
18946
20758
 
18947
20759
  // src/controller/control/exp-bar/exp-bar.controller.ts
18948
- import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
20760
+ import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
18949
20761
  var ExpBarControlController = class extends ControlController {
18950
20762
  constructor() {
18951
20763
  super(...arguments);
@@ -19143,6 +20955,11 @@ var ExpBarControlController = class extends ControlController {
19143
20955
  } else {
19144
20956
  this.navByFirstItem();
19145
20957
  }
20958
+ } else {
20959
+ const data = this.xDataController.state.selectedData;
20960
+ if (data[0]) {
20961
+ this.xDataController.setActive(data[0]);
20962
+ }
19146
20963
  }
19147
20964
  }
19148
20965
  /**
@@ -19271,7 +21088,7 @@ var ExpBarControlController = class extends ControlController {
19271
21088
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
19272
21089
  return this.XDataModel.navAppViewId;
19273
21090
  }
19274
- throw new RuntimeError49("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
21091
+ throw new RuntimeError50("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
19275
21092
  }
19276
21093
  /**
19277
21094
  * 获取导航视图
@@ -19414,7 +21231,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
19414
21231
  };
19415
21232
 
19416
21233
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
19417
- import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
21234
+ import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
19418
21235
  var TreeExpBarController = class extends ExpBarControlController {
19419
21236
  constructor() {
19420
21237
  super(...arguments);
@@ -19444,6 +21261,21 @@ var TreeExpBarController = class extends ExpBarControlController {
19444
21261
  }
19445
21262
  return controller;
19446
21263
  }
21264
+ /**
21265
+ * 组件挂载
21266
+ *
21267
+ */
21268
+ async onMounted() {
21269
+ super.onMounted();
21270
+ if (this.xDataController) {
21271
+ this.xDataController.evt.on("onAfterRefreshParent", (_event) => {
21272
+ const data = this.xDataController.state.selectedData;
21273
+ if (data[0]) {
21274
+ this.xDataController.setActive(data[0]);
21275
+ }
21276
+ });
21277
+ }
21278
+ }
19447
21279
  /**
19448
21280
  * 获取指定节点模型
19449
21281
  *
@@ -19488,7 +21320,7 @@ var TreeExpBarController = class extends ExpBarControlController {
19488
21320
  const deData = node._deData || node;
19489
21321
  const nodeModel = this.getNodeModel(node._nodeId);
19490
21322
  if (!nodeModel) {
19491
- throw new RuntimeError50("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
21323
+ throw new RuntimeError51("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
19492
21324
  }
19493
21325
  const result = this.prepareParams(nodeModel, deData, context, params);
19494
21326
  result.context.currentSrfNav = nodeId;
@@ -19679,7 +21511,7 @@ var ChartExpBarController = class extends ExpBarControlController {
19679
21511
  };
19680
21512
 
19681
21513
  // src/controller/control/form/search-form/search-form.controller.ts
19682
- import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
21514
+ import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
19683
21515
 
19684
21516
  // src/controller/control/form/form/form.controller.ts
19685
21517
  import {
@@ -20250,7 +22082,7 @@ var SearchFormController = class extends FormController {
20250
22082
  applyStoredFilter(index) {
20251
22083
  const filter = this.state.storedFilters[index];
20252
22084
  if (!filter) {
20253
- throw new RuntimeError51("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
22085
+ throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
20254
22086
  }
20255
22087
  if (filter.data) {
20256
22088
  Object.assign(this.data, filter.data);
@@ -20266,7 +22098,7 @@ var SearchFormController = class extends FormController {
20266
22098
  async removeStoredFilter(index) {
20267
22099
  const filter = this.state.storedFilters[index];
20268
22100
  if (!filter) {
20269
- throw new RuntimeError51("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
22101
+ throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
20270
22102
  }
20271
22103
  this.state.storedFilters.splice(index, 1);
20272
22104
  await this.saveConfig();
@@ -21555,7 +23387,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
21555
23387
  };
21556
23388
 
21557
23389
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
21558
- import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
23390
+ import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
21559
23391
  import { createUUID as createUUID11 } from "qx-util";
21560
23392
 
21561
23393
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
@@ -21672,7 +23504,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
21672
23504
  async remove(id) {
21673
23505
  const controller = this.formMap.get(id);
21674
23506
  if (!controller) {
21675
- throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
23507
+ throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
21676
23508
  }
21677
23509
  await controller.remove();
21678
23510
  const index = this.state.items.findIndex((item) => item.id === id);
@@ -21974,7 +23806,7 @@ var FormTabPanelController = class extends FormDetailController {
21974
23806
  import {
21975
23807
  awaitTimeout,
21976
23808
  mergeInLeft as mergeInLeft2,
21977
- RuntimeError as RuntimeError53
23809
+ RuntimeError as RuntimeError54
21978
23810
  } from "@ibiz-template/core";
21979
23811
  import { debounce as debounce2 } from "lodash-es";
21980
23812
  import { createUUID as createUUID12 } from "qx-util";
@@ -22439,7 +24271,7 @@ var EditFormController = class extends FormController {
22439
24271
  }
22440
24272
  const isValid = await this.validate();
22441
24273
  if (!isValid) {
22442
- throw new RuntimeError53("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
24274
+ throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22443
24275
  }
22444
24276
  if (!silent) {
22445
24277
  await this.startLoading();
@@ -22562,7 +24394,7 @@ var EditFormController = class extends FormController {
22562
24394
  (item) => item.id === formItemUpdateId
22563
24395
  );
22564
24396
  if (!formItemUpdate) {
22565
- throw new RuntimeError53("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
24397
+ throw new RuntimeError54("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
22566
24398
  }
22567
24399
  const {
22568
24400
  appDEMethodId,
@@ -22621,7 +24453,7 @@ var EditFormController = class extends FormController {
22621
24453
  async wfStart(args) {
22622
24454
  const isValid = await this.validate();
22623
24455
  if (!isValid) {
22624
- throw new RuntimeError53("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
24456
+ throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22625
24457
  }
22626
24458
  await this.startLoading();
22627
24459
  const { context, params } = this.handlerAbilityParams(args);
@@ -22650,7 +24482,7 @@ var EditFormController = class extends FormController {
22650
24482
  async wfSubmit(args) {
22651
24483
  const isValid = await this.validate();
22652
24484
  if (!isValid) {
22653
- throw new RuntimeError53("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
24485
+ throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22654
24486
  }
22655
24487
  await this.startLoading();
22656
24488
  const { context, params } = this.handlerAbilityParams(args);
@@ -22966,7 +24798,7 @@ import {
22966
24798
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
22967
24799
  mergeDefaultInLeft,
22968
24800
  recursiveIterate as recursiveIterate7,
22969
- RuntimeError as RuntimeError54,
24801
+ RuntimeError as RuntimeError55,
22970
24802
  RuntimeModelError as RuntimeModelError61
22971
24803
  } from "@ibiz-template/core";
22972
24804
  import { clone as clone25 } from "ramda";
@@ -23492,7 +25324,7 @@ var GridController = class extends MDControlController {
23492
25324
  if (editShowMode === "row") {
23493
25325
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
23494
25326
  if (editingRow) {
23495
- throw new RuntimeError54("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
25327
+ throw new RuntimeError55("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
23496
25328
  }
23497
25329
  }
23498
25330
  const queryParams = { ...this.params };
@@ -23533,7 +25365,7 @@ var GridController = class extends MDControlController {
23533
25365
  const isCreate = data.srfuf === 0 /* CREATE */;
23534
25366
  const rowState = this.findRowState(data);
23535
25367
  if (!rowState) {
23536
- throw new RuntimeError54("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
25368
+ throw new RuntimeError55("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
23537
25369
  }
23538
25370
  if (!rowState.modified) {
23539
25371
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -23545,7 +25377,7 @@ var GridController = class extends MDControlController {
23545
25377
  }
23546
25378
  const isValid = await this.validate(rowState);
23547
25379
  if (!isValid) {
23548
- throw new RuntimeError54("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
25380
+ throw new RuntimeError55("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
23549
25381
  }
23550
25382
  let res;
23551
25383
  const deName = calcDeCodeNameById(this.model.appDataEntityId);
@@ -23758,7 +25590,7 @@ var GridController = class extends MDControlController {
23758
25590
  }
23759
25591
  async toggleRowEdit() {
23760
25592
  if (!this.model.enableRowNew) {
23761
- throw new RuntimeError54("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
25593
+ throw new RuntimeError55("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
23762
25594
  }
23763
25595
  this.state.rowEditOpen = !this.state.rowEditOpen;
23764
25596
  }
@@ -23791,7 +25623,7 @@ var GridController = class extends MDControlController {
23791
25623
  } else {
23792
25624
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
23793
25625
  if (editingRow) {
23794
- throw new RuntimeError54("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
25626
+ throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
23795
25627
  }
23796
25628
  if (row.data.srfuf === 1 /* UPDATE */) {
23797
25629
  row.cacheData = clone25(row.data);
@@ -23846,7 +25678,7 @@ var GridController = class extends MDControlController {
23846
25678
  (item) => item.id === updateId
23847
25679
  );
23848
25680
  if (!findUpdate) {
23849
- throw new RuntimeError54("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
25681
+ throw new RuntimeError55("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
23850
25682
  }
23851
25683
  const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
23852
25684
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -24002,7 +25834,7 @@ var GridController = class extends MDControlController {
24002
25834
  data2 = this.getData();
24003
25835
  }
24004
25836
  if (data2.length === 0) {
24005
- throw new RuntimeError54("\u65E0\u5BFC\u51FA\u6570\u636E");
25837
+ throw new RuntimeError55("\u65E0\u5BFC\u51FA\u6570\u636E");
24006
25838
  }
24007
25839
  return formatExcelData(data2);
24008
25840
  };
@@ -24568,7 +26400,7 @@ var GridUAColumnController = class extends GridColumnController {
24568
26400
  };
24569
26401
 
24570
26402
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
24571
- import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
26403
+ import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
24572
26404
  import Schema2 from "async-validator";
24573
26405
  import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
24574
26406
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -24708,7 +26540,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
24708
26540
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
24709
26541
  const result = await this.validate(row);
24710
26542
  if (!result) {
24711
- throw new RuntimeError55(
26543
+ throw new RuntimeError56(
24712
26544
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
24713
26545
  );
24714
26546
  }
@@ -25006,7 +26838,7 @@ var ListController = class extends MDControlController {
25006
26838
  };
25007
26839
 
25008
26840
  // src/controller/control/panel/panel/panel.controller.ts
25009
- import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError56 } from "@ibiz-template/core";
26841
+ import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError57 } from "@ibiz-template/core";
25010
26842
  var PanelController = class extends ControlController {
25011
26843
  constructor(model, context, params, ctx, container) {
25012
26844
  super(model, context, params, ctx);
@@ -25130,7 +26962,7 @@ var PanelController = class extends ControlController {
25130
26962
  var _a, _b;
25131
26963
  const data = await this.prepareData();
25132
26964
  if (!data) {
25133
- throw new RuntimeError56("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
26965
+ throw new RuntimeError57("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
25134
26966
  }
25135
26967
  const panelData = this.convertData(data);
25136
26968
  (_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
@@ -25726,7 +27558,7 @@ var PickupViewPanelController = class extends ControlController {
25726
27558
 
25727
27559
  // src/controller/control/search-bar/search-bar.controller.ts
25728
27560
  import {
25729
- RuntimeError as RuntimeError57,
27561
+ RuntimeError as RuntimeError58,
25730
27562
  mergeInLeft as mergeInLeft3,
25731
27563
  recursiveIterate as recursiveIterate9
25732
27564
  } from "@ibiz-template/core";
@@ -26447,7 +28279,7 @@ var SearchBarController = class extends ControlController {
26447
28279
  value: data.value || null
26448
28280
  };
26449
28281
  }
26450
- throw new RuntimeError57("\u65E0\u6548\u7684condtype:".concat(data.condtype));
28282
+ throw new RuntimeError58("\u65E0\u6548\u7684condtype:".concat(data.condtype));
26451
28283
  }
26452
28284
  /**
26453
28285
  * 获取初始过滤项树节点数据集合
@@ -26876,7 +28708,7 @@ var TabExpPanelController = class extends ControlController {
26876
28708
 
26877
28709
  // src/controller/control/tree/tree.controller.ts
26878
28710
  import {
26879
- RuntimeError as RuntimeError58,
28711
+ RuntimeError as RuntimeError59,
26880
28712
  RuntimeModelError as RuntimeModelError64,
26881
28713
  recursiveIterate as recursiveIterate10
26882
28714
  } from "@ibiz-template/core";
@@ -27870,7 +29702,7 @@ var TreeController = class extends MDControlController {
27870
29702
  throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
27871
29703
  }
27872
29704
  if (nodeData._nodeType !== "DE") {
27873
- throw new RuntimeError58("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
29705
+ throw new RuntimeError59("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
27874
29706
  }
27875
29707
  nodeData._text = text;
27876
29708
  await this.updateDeNodeData([nodeData]);
@@ -27878,7 +29710,7 @@ var TreeController = class extends MDControlController {
27878
29710
  };
27879
29711
 
27880
29712
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
27881
- import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
29713
+ import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
27882
29714
 
27883
29715
  // src/controller/control/wizard-panel/wizard-panel.service.ts
27884
29716
  var WizardPanelService = class extends ControlService {
@@ -28044,7 +29876,7 @@ var WizardPanelController = class extends ControlController {
28044
29876
  const { activeFormTag } = this.state;
28045
29877
  const controller = this.formControllers.get(activeFormTag);
28046
29878
  if (!controller) {
28047
- throw new RuntimeError59("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
29879
+ throw new RuntimeError60("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
28048
29880
  }
28049
29881
  return controller;
28050
29882
  }
@@ -28086,7 +29918,7 @@ var WizardPanelController = class extends ControlController {
28086
29918
  getWizardFormByTag(tag) {
28087
29919
  var _a;
28088
29920
  if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
28089
- throw new RuntimeError59("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
29921
+ throw new RuntimeError60("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
28090
29922
  return;
28091
29923
  }
28092
29924
  const wizardForm = this.model.dewizard.dewizardForms.find(
@@ -28095,7 +29927,7 @@ var WizardPanelController = class extends ControlController {
28095
29927
  }
28096
29928
  );
28097
29929
  if (!wizardForm) {
28098
- throw new RuntimeError59("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
29930
+ throw new RuntimeError60("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
28099
29931
  }
28100
29932
  return wizardForm;
28101
29933
  }
@@ -28166,7 +29998,7 @@ var WizardPanelController = class extends ControlController {
28166
29998
  prevTag = this.tagHistory[this.tagHistory.length - 1];
28167
29999
  }
28168
30000
  if (!prevTag) {
28169
- throw new RuntimeError59("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
30001
+ throw new RuntimeError60("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
28170
30002
  }
28171
30003
  this.state.activeFormTag = prevTag;
28172
30004
  }
@@ -28202,7 +30034,7 @@ var WizardPanelController = class extends ControlController {
28202
30034
  });
28203
30035
  const nextWizardStep = wizardSteps[index + 1];
28204
30036
  if (!nextWizardStep) {
28205
- throw new RuntimeError59("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
30037
+ throw new RuntimeError60("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
28206
30038
  }
28207
30039
  const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
28208
30040
  if (nextWizardForm && nextWizardForm.formTag) {
@@ -28211,7 +30043,7 @@ var WizardPanelController = class extends ControlController {
28211
30043
  }
28212
30044
  }
28213
30045
  if (!nextTag) {
28214
- throw new RuntimeError59("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
30046
+ throw new RuntimeError60("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
28215
30047
  }
28216
30048
  this.state.activeFormTag = nextTag;
28217
30049
  this.tagHistory.push(nextTag);
@@ -28534,7 +30366,7 @@ var MDCtrlController = class extends MDControlController {
28534
30366
  };
28535
30367
 
28536
30368
  // src/controller/control/kanban/kanban.controller.ts
28537
- import { RuntimeError as RuntimeError60, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
30369
+ import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
28538
30370
  import { isNil as isNil27 } from "ramda";
28539
30371
 
28540
30372
  // src/controller/control/kanban/kanban.service.ts
@@ -28625,7 +30457,7 @@ var KanbanController = class extends DataViewControlController {
28625
30457
  } else {
28626
30458
  const toNum = Number(sortValue);
28627
30459
  if (Number.isNaN(toNum)) {
28628
- throw new RuntimeError60(
30460
+ throw new RuntimeError61(
28629
30461
  "".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
28630
30462
  );
28631
30463
  }
@@ -28711,7 +30543,7 @@ var KanbanController = class extends DataViewControlController {
28711
30543
  }
28712
30544
  handleDataGroup() {
28713
30545
  if (!this.model.enableGroup || this.model.groupMode === "NONE") {
28714
- throw new RuntimeError60("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
30546
+ throw new RuntimeError61("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
28715
30547
  }
28716
30548
  return super.handleDataGroup();
28717
30549
  }
@@ -28853,10 +30685,10 @@ var KanbanController = class extends DataViewControlController {
28853
30685
  } else {
28854
30686
  if (lastSort >= item[sortField]) {
28855
30687
  if (cacheArr.length > 0) {
28856
- cacheArr.forEach((cache) => {
28857
- cache[sortField] = getNextSort(cacheLastSort);
28858
- modifiedItems.push(cache);
28859
- cacheLastSort = cache[sortField];
30688
+ cacheArr.forEach((cache2) => {
30689
+ cache2[sortField] = getNextSort(cacheLastSort);
30690
+ modifiedItems.push(cache2);
30691
+ cacheLastSort = cache2[sortField];
28860
30692
  });
28861
30693
  lastSort = cacheLastSort;
28862
30694
  cacheLastSort = 0;
@@ -29054,7 +30886,7 @@ var KanbanController = class extends DataViewControlController {
29054
30886
 
29055
30887
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
29056
30888
  import {
29057
- RuntimeError as RuntimeError61,
30889
+ RuntimeError as RuntimeError62,
29058
30890
  RuntimeModelError as RuntimeModelError67,
29059
30891
  awaitTimeout as awaitTimeout3,
29060
30892
  recursiveIterate as recursiveIterate11
@@ -29314,11 +31146,11 @@ var TreeGridExController = class extends TreeController {
29314
31146
  return;
29315
31147
  }
29316
31148
  if (nodeData._nodeType !== "DE") {
29317
- throw new RuntimeError61("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
31149
+ throw new RuntimeError62("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
29318
31150
  }
29319
31151
  const rowState = this.state.rows[nodeData._uuid];
29320
31152
  if (!rowState) {
29321
- throw new RuntimeError61("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
31153
+ throw new RuntimeError62("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
29322
31154
  }
29323
31155
  if (!rowState.modified) {
29324
31156
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -29332,7 +31164,7 @@ var TreeGridExController = class extends TreeController {
29332
31164
  const { appDataEntityId, updateAppDEActionId } = nodeModel;
29333
31165
  const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
29334
31166
  if (isCreate) {
29335
- throw new RuntimeError61("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
31167
+ throw new RuntimeError62("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
29336
31168
  }
29337
31169
  if (!updateAppDEActionId) {
29338
31170
  throw new RuntimeModelError67(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
@@ -29492,7 +31324,7 @@ var TreeGridExController = class extends TreeController {
29492
31324
  (item) => item.showRowEdit
29493
31325
  );
29494
31326
  if (editingRow) {
29495
- throw new RuntimeError61("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
31327
+ throw new RuntimeError62("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
29496
31328
  }
29497
31329
  if (row.data._deData.srfuf === 1 /* UPDATE */) {
29498
31330
  row.cacheData = clone28(row.data);
@@ -29605,7 +31437,7 @@ var TreeGridExColumnController = class {
29605
31437
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
29606
31438
  import {
29607
31439
  DataTypes as DataTypes5,
29608
- RuntimeError as RuntimeError62,
31440
+ RuntimeError as RuntimeError63,
29609
31441
  RuntimeModelError as RuntimeModelError68
29610
31442
  } from "@ibiz-template/core";
29611
31443
  import { clone as clone29 } from "ramda";
@@ -29806,7 +31638,7 @@ var TreeGridExNodeColumnController = class {
29806
31638
  const valueItem = this.nodeColumn.linkValueItem || "srfkey";
29807
31639
  const value = row.data[valueItem];
29808
31640
  if (value == null) {
29809
- throw new RuntimeError62("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
31641
+ throw new RuntimeError63("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
29810
31642
  }
29811
31643
  const { linkAppViewId } = this.nodeColumn;
29812
31644
  if (!linkAppViewId) {
@@ -30051,8 +31883,60 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
30051
31883
  };
30052
31884
 
30053
31885
  // src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
30054
- import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
30055
31886
  var TreeGridExUAColumnController = class extends TreeGridExColumnController {
31887
+ constructor() {
31888
+ super(...arguments);
31889
+ /**
31890
+ * 该树表格列对应不同节点模型的节点列控制器
31891
+ * @author lxm
31892
+ * @date 2024-01-08 05:40:56
31893
+ * @type {Map<string, IDETreeNodeUAColumn>}
31894
+ */
31895
+ this.nodeColumnMap = /* @__PURE__ */ new Map();
31896
+ }
31897
+ async init() {
31898
+ await this.onInit();
31899
+ await this.initNodeColumnMap();
31900
+ }
31901
+ /**
31902
+ * 解析模型初始化节点对应的节点列模型
31903
+ * @author lxm
31904
+ * @date 2024-01-24 02:41:05
31905
+ */
31906
+ initNodeColumnMap() {
31907
+ var _a;
31908
+ (_a = this.treeGrid.model.detreeNodes) == null ? void 0 : _a.forEach((node) => {
31909
+ var _a2;
31910
+ if (node.treeNodeType !== "DE") {
31911
+ return;
31912
+ }
31913
+ const nodeColumn = (_a2 = node.detreeNodeColumns) == null ? void 0 : _a2.find(
31914
+ (column) => {
31915
+ return column.detreeColumnId === this.model.id;
31916
+ }
31917
+ );
31918
+ if (nodeColumn) {
31919
+ this.nodeColumnMap.set(node.id, nodeColumn);
31920
+ }
31921
+ });
31922
+ }
31923
+ /**
31924
+ * 获取界面行为组mode
31925
+ * @author lxm
31926
+ * @date 2024-01-24 04:13:03
31927
+ * @param {ITreeGridExRowState} row
31928
+ * @return {*} {(IUIActionGroup | undefined)}
31929
+ */
31930
+ getUIActionGroup(row) {
31931
+ let { deuiactionGroup } = this.model;
31932
+ if (row.data._nodeType === "DE" && this.nodeColumnMap.get(row.data._nodeId)) {
31933
+ const nodeColumn = this.nodeColumnMap.get(row.data._nodeId);
31934
+ if (nodeColumn.deuiactionGroup) {
31935
+ deuiactionGroup = nodeColumn.deuiactionGroup;
31936
+ }
31937
+ }
31938
+ return deuiactionGroup;
31939
+ }
30056
31940
  /**
30057
31941
  * 给rowController初始化操作列的状态
30058
31942
  *
@@ -30062,10 +31946,10 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
30062
31946
  */
30063
31947
  initActionStates(row) {
30064
31948
  var _a;
30065
- const { deuiactionGroup } = this.model;
31949
+ const deuiactionGroup = this.getUIActionGroup(row);
30066
31950
  if (!deuiactionGroup) {
31951
+ ibiz.log.warn("".concat(this.model.id, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4"));
30067
31952
  return;
30068
- throw new RuntimeModelError69(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
30069
31953
  }
30070
31954
  if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
30071
31955
  ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
@@ -30119,7 +32003,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
30119
32003
  };
30120
32004
 
30121
32005
  // src/controller/control/tree-grid/tree-grid.controller.ts
30122
- import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
32006
+ import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
30123
32007
  var TreeGridController = class extends GridController {
30124
32008
  constructor() {
30125
32009
  super(...arguments);
@@ -30164,10 +32048,10 @@ var TreeGridController = class extends GridController {
30164
32048
  return item.treeColumnMode === 2 || item.treeColumnMode === 3;
30165
32049
  });
30166
32050
  if (!treeGridParent) {
30167
- throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
32051
+ throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
30168
32052
  }
30169
32053
  if (!treeGridValue) {
30170
- throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
32054
+ throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
30171
32055
  }
30172
32056
  this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
30173
32057
  this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
@@ -30187,7 +32071,7 @@ var TreeGridService = class extends GridService {
30187
32071
  };
30188
32072
 
30189
32073
  // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
30190
- import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
32074
+ import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
30191
32075
  import { createUUID as createUUID13 } from "qx-util";
30192
32076
 
30193
32077
  // src/controller/control/medit-view-panel/medit-view-panel.service.ts
@@ -30403,7 +32287,7 @@ var MEditViewPanelController = class extends MDControlController {
30403
32287
  (item) => item.id === id
30404
32288
  );
30405
32289
  if (panelUiItemIndex < 0) {
30406
- throw new RuntimeError63("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
32290
+ throw new RuntimeError64("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
30407
32291
  }
30408
32292
  const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
30409
32293
  if (tempUiItem.id.startsWith("mockId:")) {
@@ -31283,6 +33167,207 @@ var HubController = class {
31283
33167
  }
31284
33168
  };
31285
33169
 
33170
+ // src/controller/notification/async-action.controller.ts
33171
+ import { QXEvent as QXEvent7 } from "qx-util";
33172
+ import { clone as clone30 } from "ramda";
33173
+ import { isNil as isNil28, isNumber as isNumber2 } from "lodash-es";
33174
+ import dayjs7 from "dayjs";
33175
+ var AsyncActionController = class {
33176
+ constructor() {
33177
+ this.evt = new QXEvent7();
33178
+ this.total = 0;
33179
+ this.actions = [];
33180
+ /**
33181
+ * 正在处理中的数量
33182
+ * @author lxm
33183
+ * @date 2024-01-25 04:51:18
33184
+ * @type {number}
33185
+ */
33186
+ this.doingNum = 0;
33187
+ /**
33188
+ * 结束的状态值集合
33189
+ * @author lxm
33190
+ * @date 2024-01-25 05:08:26
33191
+ * @protected
33192
+ */
33193
+ this.finishedStates = [30, 40];
33194
+ /**
33195
+ * 请求服务
33196
+ * @author lxm
33197
+ * @date 2024-01-25 04:50:12
33198
+ * @protected
33199
+ */
33200
+ this.service = new AsyncActionService();
33201
+ }
33202
+ async init() {
33203
+ this.listenMessage();
33204
+ }
33205
+ /**
33206
+ * 监听全局的实时消息
33207
+ * @author lxm
33208
+ * @date 2024-01-25 04:47:36
33209
+ */
33210
+ listenMessage() {
33211
+ ibiz.mc.command.asyncAction.on(async (msg) => {
33212
+ if (!msg.data || msg.subtype !== "ASYNCACTION") {
33213
+ return;
33214
+ }
33215
+ const asyncAction = this.formatAsyncAction(
33216
+ msg.data
33217
+ );
33218
+ const findIndex2 = this.actions.findIndex(
33219
+ (item) => item.asyncacitonid === asyncAction.asyncacitonid
33220
+ );
33221
+ if (findIndex2 === -1) {
33222
+ this.add(asyncAction);
33223
+ } else {
33224
+ this.update(asyncAction);
33225
+ }
33226
+ });
33227
+ }
33228
+ /**
33229
+ * 格式化数据
33230
+ * @author lxm
33231
+ * @date 2024-01-25 05:03:47
33232
+ * @protected
33233
+ * @param {IPortalAsyncAction} data
33234
+ * @return {*} {IPortalAsyncAction}
33235
+ */
33236
+ formatAsyncAction(data) {
33237
+ const dateFields = [
33238
+ "begintime",
33239
+ "endtime",
33240
+ "createdate",
33241
+ "updatedate"
33242
+ ];
33243
+ dateFields.forEach((key) => {
33244
+ if (isNumber2(data[key])) {
33245
+ data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
33246
+ }
33247
+ });
33248
+ if (!isNil28(data.actionresult)) {
33249
+ try {
33250
+ const json = JSON.parse(data.actionresult);
33251
+ data.actionresult = json;
33252
+ } catch (error) {
33253
+ }
33254
+ }
33255
+ if (!isNil28(data.completionrate)) {
33256
+ const num = Number(data.completionrate);
33257
+ if (Number.isNaN(num)) {
33258
+ data.completionrate = void 0;
33259
+ } else {
33260
+ data.completionrate = num;
33261
+ }
33262
+ }
33263
+ return data;
33264
+ }
33265
+ /**
33266
+ * 添加一条新消息
33267
+ * @author lxm
33268
+ * @date 2024-01-25 04:58:37
33269
+ * @protected
33270
+ * @param {IPortalAsyncAction} action
33271
+ */
33272
+ add(action) {
33273
+ this.actions.unshift(action);
33274
+ if (!this.finishedStates.includes(action.actionstate)) {
33275
+ this.doingNum += 1;
33276
+ ibiz.notice.showDoingNotice({ num: this.doingNum });
33277
+ } else {
33278
+ this.noticeResult(action);
33279
+ }
33280
+ this.evt.emit("add", clone30(action));
33281
+ this.evt.emit("dataChange");
33282
+ }
33283
+ /**
33284
+ * 添加一条新消息
33285
+ * @author lxm
33286
+ * @date 2024-01-25 04:58:37
33287
+ * @protected
33288
+ * @param {IPortalAsyncAction} action
33289
+ */
33290
+ update(action) {
33291
+ const index = this.actions.findIndex(
33292
+ (item) => item.asyncacitonid === action.asyncacitonid
33293
+ );
33294
+ this.actions.splice(index, 1, action);
33295
+ if (this.finishedStates.includes(action.actionstate)) {
33296
+ this.doingNum -= 1;
33297
+ if (this.doingNum <= 0) {
33298
+ ibiz.notice.closeDoingNotice();
33299
+ }
33300
+ this.noticeResult(action);
33301
+ }
33302
+ this.evt.emit("change", clone30(action));
33303
+ this.evt.emit("dataChange");
33304
+ }
33305
+ noticeResult(action) {
33306
+ ibiz.notice.showAsyncAction(action);
33307
+ }
33308
+ };
33309
+
33310
+ // src/controller/notification/internal-message.controller.ts
33311
+ import { QXEvent as QXEvent8 } from "qx-util";
33312
+ var InternalMessageController = class {
33313
+ constructor() {
33314
+ this.evt = new QXEvent8();
33315
+ this.total = 0;
33316
+ /**
33317
+ * 当前分页
33318
+ * @author lxm
33319
+ * @date 2024-01-26 10:06:28
33320
+ * @type {number}
33321
+ */
33322
+ this.page = 0;
33323
+ this.size = 20;
33324
+ this.messages = [];
33325
+ this.service = new InternalMessageService();
33326
+ }
33327
+ async init() {
33328
+ this.load();
33329
+ }
33330
+ async load() {
33331
+ await this.fetch(false);
33332
+ }
33333
+ async loadMore() {
33334
+ await this.fetch(true);
33335
+ }
33336
+ async fetch(loadMore = false) {
33337
+ if (loadMore === false) {
33338
+ this.page = 0;
33339
+ } else {
33340
+ this.page += 1;
33341
+ }
33342
+ const fetchParams = {
33343
+ page: this.page,
33344
+ size: this.size,
33345
+ sort: "update_time,desc"
33346
+ };
33347
+ const res = await this.service.fetch(fetchParams);
33348
+ this.total = res.total;
33349
+ if (loadMore) {
33350
+ this.messages.push(...res.data);
33351
+ } else {
33352
+ this.messages = res.data;
33353
+ }
33354
+ this.evt.emit("dataChange");
33355
+ }
33356
+ };
33357
+
33358
+ // src/controller/notification/notice.controller.ts
33359
+ var NoticeController = class {
33360
+ constructor() {
33361
+ this.total = 0;
33362
+ this.asyncAction = new AsyncActionController();
33363
+ this.internalMessage = new InternalMessageController();
33364
+ }
33365
+ async init() {
33366
+ await this.internalMessage.init();
33367
+ await this.asyncAction.init();
33368
+ }
33369
+ };
33370
+
31286
33371
  // src/app-hub.ts
31287
33372
  var AppHub = class {
31288
33373
  constructor() {
@@ -31352,6 +33437,7 @@ var AppHub = class {
31352
33437
  * @date 2023-07-03 07:12:05
31353
33438
  */
31354
33439
  this.config = new AppConfigService();
33440
+ this.notice = new NoticeController();
31355
33441
  /**
31356
33442
  * 默认首页视图名称
31357
33443
  *
@@ -31485,7 +33571,7 @@ var AppHub = class {
31485
33571
  this.registerAppView(appView);
31486
33572
  return appView;
31487
33573
  }
31488
- throw new RuntimeError64("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
33574
+ throw new RuntimeError65("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
31489
33575
  }
31490
33576
  /**
31491
33577
  * 根据视图模型路径,加参数重新计算视图模型
@@ -31506,7 +33592,7 @@ var AppHub = class {
31506
33592
  );
31507
33593
  return model;
31508
33594
  }
31509
- throw new RuntimeError64("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
33595
+ throw new RuntimeError65("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
31510
33596
  }
31511
33597
  /**
31512
33598
  * 根据应用实体代码名称查找应用视图
@@ -31537,7 +33623,7 @@ var AppHub = class {
31537
33623
  this.registerAppDataEntity(entity, appId2);
31538
33624
  return entity;
31539
33625
  }
31540
- throw new RuntimeError64("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
33626
+ throw new RuntimeError65("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
31541
33627
  }
31542
33628
  /**
31543
33629
  * 新建 hub 应用
@@ -31552,7 +33638,7 @@ var AppHub = class {
31552
33638
  return this.appMap.get(id);
31553
33639
  }
31554
33640
  if (!this.modelLoaderProvider) {
31555
- throw new RuntimeError64("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
33641
+ throw new RuntimeError65("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
31556
33642
  }
31557
33643
  const appModel = await this.modelLoaderProvider.getApp(id);
31558
33644
  const app = new Application(appModel);
@@ -31651,8 +33737,8 @@ var EngineFactory = class {
31651
33737
  * @param {string} key
31652
33738
  * @param {IViewEngine} engine
31653
33739
  */
31654
- register(key, engine) {
31655
- this.viewEngines.set(key, engine);
33740
+ register(key, engine2) {
33741
+ this.viewEngines.set(key, engine2);
31656
33742
  }
31657
33743
  /**
31658
33744
  * 注销视图引擎
@@ -31683,7 +33769,7 @@ var EngineFactory = class {
31683
33769
  };
31684
33770
 
31685
33771
  // src/engine/view-base.engine.ts
31686
- import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
33772
+ import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
31687
33773
  var ViewEngineBase = class {
31688
33774
  /**
31689
33775
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -31871,7 +33957,7 @@ var ViewEngineBase = class {
31871
33957
  const { appDataEntityId } = this.view.model;
31872
33958
  const { evt, context, params } = this.view;
31873
33959
  if (!appDataEntityId) {
31874
- throw new RuntimeError65("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
33960
+ throw new RuntimeError66("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
31875
33961
  }
31876
33962
  const app = ibiz.hub.getApp(context.srfappid);
31877
33963
  const res = await app.deService.exec(
@@ -31892,8 +33978,8 @@ var ViewEngineBase = class {
31892
33978
  };
31893
33979
 
31894
33980
  // src/engine/md-view.engine.ts
31895
- import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
31896
- import { clone as clone30 } from "ramda";
33981
+ import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
33982
+ import { clone as clone31 } from "ramda";
31897
33983
  var MDViewEngine = class extends ViewEngineBase {
31898
33984
  /**
31899
33985
  * 多数据部件名称
@@ -32080,7 +34166,7 @@ var MDViewEngine = class extends ViewEngineBase {
32080
34166
  view: this.view
32081
34167
  }));
32082
34168
  if (result === -1) {
32083
- throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
34169
+ throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
32084
34170
  } else {
32085
34171
  return {
32086
34172
  cancel: !result.ok
@@ -32103,9 +34189,9 @@ var MDViewEngine = class extends ViewEngineBase {
32103
34189
  (item) => item.id === "newdata"
32104
34190
  );
32105
34191
  if (!openAppViewLogic) {
32106
- throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
34192
+ throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
32107
34193
  }
32108
- const params = clone30(this.view.params);
34194
+ const params = clone31(this.view.params);
32109
34195
  if (copyMode) {
32110
34196
  params.srfcopymode = copyMode;
32111
34197
  }
@@ -32117,7 +34203,7 @@ var MDViewEngine = class extends ViewEngineBase {
32117
34203
  view: this.view
32118
34204
  }));
32119
34205
  if (result === -1) {
32120
- throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
34206
+ throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
32121
34207
  } else {
32122
34208
  return {
32123
34209
  cancel: !result.ok
@@ -32292,6 +34378,22 @@ var GlobalUtil = class {
32292
34378
  * @date 2024-01-18 14:01:23
32293
34379
  */
32294
34380
  this.viewStack = new ViewStack();
34381
+ /**
34382
+ * 动画工具类
34383
+ *
34384
+ * @author zk
34385
+ * @date 2024-01-22 09:01:33
34386
+ * @memberof GlobalUtil
34387
+ */
34388
+ this.anime = new AnimeUtil();
34389
+ /**
34390
+ * 文件工具类
34391
+ *
34392
+ * @author zk
34393
+ * @date 2024-01-26 04:01:24
34394
+ * @memberof GlobalUtil
34395
+ */
34396
+ this.file = new FileUtil();
32295
34397
  this.error.register(new DefaultErrorHandler());
32296
34398
  }
32297
34399
  /**
@@ -32323,7 +34425,7 @@ var GlobalUtil = class {
32323
34425
  };
32324
34426
 
32325
34427
  // src/logic-scheduler/executor/logic-executor.ts
32326
- import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
34428
+ import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
32327
34429
  var LogicExecutor = class {
32328
34430
  /**
32329
34431
  * @author lxm
@@ -32344,7 +34446,7 @@ var LogicExecutor = class {
32344
34446
  */
32345
34447
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32346
34448
  execute(_executeParams) {
32347
- throw new RuntimeError66("Method not implemented.");
34449
+ throw new RuntimeError67("Method not implemented.");
32348
34450
  }
32349
34451
  /**
32350
34452
  * 销毁方法
@@ -32435,13 +34537,13 @@ var ScriptExecutor = class extends LogicExecutor {
32435
34537
  };
32436
34538
 
32437
34539
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
32438
- import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
34540
+ import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
32439
34541
  var AppDEUILogicExecutor = class extends LogicExecutor {
32440
34542
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32441
34543
  execute(executeParams) {
32442
34544
  const { appDEUILogicId, appDataEntityId } = this.logic;
32443
34545
  if (!appDEUILogicId) {
32444
- throw new RuntimeModelError72(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
34546
+ throw new RuntimeModelError71(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
32445
34547
  }
32446
34548
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
32447
34549
  }
@@ -32781,7 +34883,7 @@ var LogicSchedulerCenter = class {
32781
34883
  };
32782
34884
 
32783
34885
  // src/logic-scheduler/trigger/logic-trigger.ts
32784
- import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
34886
+ import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
32785
34887
  var LogicTrigger = class {
32786
34888
  /**
32787
34889
  * @author lxm
@@ -32841,7 +34943,7 @@ var LogicTrigger = class {
32841
34943
  if (this.executor) {
32842
34944
  return this.executor.execute(executeParams);
32843
34945
  }
32844
- throw new RuntimeError67("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
34946
+ throw new RuntimeError68("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
32845
34947
  }
32846
34948
  /**
32847
34949
  * 销毁方法
@@ -32858,12 +34960,12 @@ var CustomTrigger = class extends LogicTrigger {
32858
34960
  };
32859
34961
 
32860
34962
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
32861
- import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
34963
+ import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
32862
34964
  var ItemDynaLogicTrigger = class extends LogicTrigger {
32863
34965
  bindExecutor(executor) {
32864
34966
  super.bindExecutor(executor);
32865
34967
  if (this.executor.type !== "SCRIPT") {
32866
- throw new RuntimeError68(
34968
+ throw new RuntimeError69(
32867
34969
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
32868
34970
  );
32869
34971
  }
@@ -32899,7 +35001,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
32899
35001
  };
32900
35002
 
32901
35003
  // src/logic-scheduler/trigger/timer-trigger.ts
32902
- import { RuntimeError as RuntimeError69, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
35004
+ import { RuntimeError as RuntimeError70, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
32903
35005
  var TimerTrigger = class extends LogicTrigger {
32904
35006
  constructor() {
32905
35007
  super(...arguments);
@@ -32907,11 +35009,11 @@ var TimerTrigger = class extends LogicTrigger {
32907
35009
  }
32908
35010
  start() {
32909
35011
  if (!this.logic.timer) {
32910
- throw new RuntimeModelError73(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
35012
+ throw new RuntimeModelError72(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
32911
35013
  }
32912
35014
  this.timer = setInterval(() => {
32913
35015
  if (!this.scheduler.defaultParamsCb) {
32914
- throw new RuntimeError69("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
35016
+ throw new RuntimeError70("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
32915
35017
  }
32916
35018
  const params = this.scheduler.defaultParamsCb();
32917
35019
  this.executor.execute(params);
@@ -32928,8 +35030,8 @@ var TimerTrigger = class extends LogicTrigger {
32928
35030
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
32929
35031
  import {
32930
35032
  ModelError as ModelError34,
32931
- RuntimeError as RuntimeError70,
32932
- RuntimeModelError as RuntimeModelError74
35033
+ RuntimeError as RuntimeError71,
35034
+ RuntimeModelError as RuntimeModelError73
32933
35035
  } from "@ibiz-template/core";
32934
35036
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
32935
35037
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -32966,7 +35068,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32966
35068
  const { context, params, ...rest } = parameters;
32967
35069
  const { data } = parameters;
32968
35070
  if (!(data == null ? void 0 : data[0])) {
32969
- throw new RuntimeError70("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
35071
+ throw new RuntimeError71("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
32970
35072
  }
32971
35073
  const openViewRefs = appUILogic.openDataAppViews;
32972
35074
  let openViewRef;
@@ -32975,7 +35077,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32975
35077
  } else {
32976
35078
  openViewRef = appUILogic.openDataAppView;
32977
35079
  if (!openViewRef) {
32978
- throw new RuntimeModelError74(
35080
+ throw new RuntimeModelError73(
32979
35081
  appUILogic,
32980
35082
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
32981
35083
  );
@@ -32983,7 +35085,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
32983
35085
  }
32984
35086
  const openView = openViewRef.refAppViewId;
32985
35087
  if (!openView) {
32986
- throw new RuntimeModelError74(
35088
+ throw new RuntimeModelError73(
32987
35089
  appUILogic,
32988
35090
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
32989
35091
  );
@@ -33013,7 +35115,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33013
35115
  );
33014
35116
  const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
33015
35117
  if (!typeFileName) {
33016
- throw new RuntimeModelError74(
35118
+ throw new RuntimeModelError73(
33017
35119
  appUILogic,
33018
35120
  "".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
33019
35121
  );
@@ -33021,12 +35123,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
33021
35123
  const { data } = parameters;
33022
35124
  const formTypeValue = data[0][typeFileName];
33023
35125
  if (!formTypeValue) {
33024
- throw new RuntimeModelError74(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
35126
+ throw new RuntimeModelError73(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
33025
35127
  }
33026
35128
  const openViewRefs = appUILogic.openDataAppViews;
33027
35129
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
33028
35130
  if (!findView) {
33029
- throw new RuntimeError70(
35131
+ throw new RuntimeError71(
33030
35132
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
33031
35133
  );
33032
35134
  }
@@ -33063,7 +35165,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33063
35165
  return viewRef.refMode.toLowerCase() !== parentDeName;
33064
35166
  });
33065
35167
  if (!newViewRef) {
33066
- throw new RuntimeModelError74(
35168
+ throw new RuntimeModelError73(
33067
35169
  appUILogic,
33068
35170
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
33069
35171
  );
@@ -33073,7 +35175,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33073
35175
  } else {
33074
35176
  newViewRef = newDataAppView;
33075
35177
  if (!newViewRef || !newViewRef.refAppViewId) {
33076
- throw new RuntimeModelError74(
35178
+ throw new RuntimeModelError73(
33077
35179
  appUILogic,
33078
35180
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
33079
35181
  );
@@ -33137,7 +35239,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33137
35239
  const { wizardAppView, newDataAppViews } = appUILogic;
33138
35240
  const { context, params, ...rest } = parameters;
33139
35241
  if (!wizardAppView || !wizardAppView.refAppViewId) {
33140
- throw new RuntimeModelError74(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
35242
+ throw new RuntimeModelError73(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
33141
35243
  }
33142
35244
  const result = await ibiz.commands.execute(
33143
35245
  OpenAppViewCommand.TAG,
@@ -33151,7 +35253,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33151
35253
  }
33152
35254
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
33153
35255
  if (!selectData) {
33154
- throw new RuntimeError70("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
35256
+ throw new RuntimeError71("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
33155
35257
  }
33156
35258
  const indexType = selectData.srfkey;
33157
35259
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
@@ -33161,7 +35263,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33161
35263
  }
33162
35264
  );
33163
35265
  if (!findView) {
33164
- throw new RuntimeError70(
35266
+ throw new RuntimeError71(
33165
35267
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
33166
35268
  );
33167
35269
  }
@@ -33188,7 +35290,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33188
35290
  const minorDERs = selfDe.minorAppDERSs;
33189
35291
  const pickParentDeName = newViewRef.refMode.toLowerCase();
33190
35292
  if (!minorDERs) {
33191
- throw new RuntimeModelError74(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
35293
+ throw new RuntimeModelError73(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
33192
35294
  }
33193
35295
  let pickParentFieldName = "";
33194
35296
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -33198,7 +35300,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
33198
35300
  }
33199
35301
  });
33200
35302
  if (pickParentFieldName === void 0) {
33201
- throw new RuntimeError70(
35303
+ throw new RuntimeError71(
33202
35304
  "\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
33203
35305
  );
33204
35306
  }
@@ -33285,12 +35387,12 @@ var ControlEventTrigger = class extends LogicTrigger {
33285
35387
  };
33286
35388
 
33287
35389
  // src/logic-scheduler/executor/app-ui-action-executor.ts
33288
- import { RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
35390
+ import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
33289
35391
  var AppDEUIActionExecutor = class extends LogicExecutor {
33290
35392
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
33291
35393
  execute(executeParams) {
33292
35394
  if (!this.logic.appDEUIActionId) {
33293
- throw new RuntimeModelError75(
35395
+ throw new RuntimeModelError74(
33294
35396
  this.logic,
33295
35397
  "\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
33296
35398
  );
@@ -33468,6 +35570,7 @@ export {
33468
35570
  AcFetchMethod,
33469
35571
  ActionBarPortletController,
33470
35572
  ActivityCounter,
35573
+ AnimeUtil,
33471
35574
  AppCounter,
33472
35575
  AppDECounter,
33473
35576
  AppDECounterProvider,
@@ -33529,6 +35632,7 @@ export {
33529
35632
  ExpBarControlController,
33530
35633
  FORMDETAIL_PROVIDER_PREFIX,
33531
35634
  FetchMethod,
35635
+ FileUtil,
33532
35636
  FormButtonController,
33533
35637
  FormButtonState,
33534
35638
  FormController,
@@ -33618,6 +35722,7 @@ export {
33618
35722
  PluginStaticResource,
33619
35723
  PortletPartController,
33620
35724
  PortletPartState,
35725
+ PresetIdentifier,
33621
35726
  QXEventEx,
33622
35727
  RawItemPortletController,
33623
35728
  RawValueUtil,
@@ -33690,6 +35795,7 @@ export {
33690
35795
  calcContentAlignStyle,
33691
35796
  calcDeCodeNameById,
33692
35797
  calcDynaClass,
35798
+ calcDynaSysParams,
33693
35799
  calcGridLayoutPos,
33694
35800
  calcLayoutHeightWidth,
33695
35801
  calcMainStateOPPrivsStrs,