vue-devui 1.5.8 → 1.5.10

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 (100) hide show
  1. package/alert/index.es.js +4 -3
  2. package/alert/index.umd.js +3 -3
  3. package/alert/style.css +1 -1
  4. package/auto-complete/index.es.js +7 -1
  5. package/auto-complete/index.umd.js +7 -7
  6. package/auto-complete/style.css +1 -1
  7. package/avatar/index.es.js +4 -3
  8. package/avatar/index.umd.js +3 -3
  9. package/avatar/style.css +1 -1
  10. package/badge/index.es.js +1 -0
  11. package/badge/index.umd.js +1 -1
  12. package/carousel/index.es.js +46 -9
  13. package/carousel/index.umd.js +1 -1
  14. package/carousel/style.css +1 -1
  15. package/checkbox/index.es.js +7 -1
  16. package/checkbox/index.umd.js +13 -13
  17. package/checkbox/style.css +1 -1
  18. package/code-review/index.es.js +689 -143
  19. package/code-review/index.umd.js +50 -23
  20. package/code-review/style.css +1 -1
  21. package/collapse/index.es.js +1 -1
  22. package/collapse/index.umd.js +2 -2
  23. package/collapse/style.css +1 -1
  24. package/date-picker-pro/index.es.js +7 -1
  25. package/date-picker-pro/index.umd.js +8 -8
  26. package/date-picker-pro/style.css +1 -1
  27. package/dragdrop/index.es.js +158 -0
  28. package/dragdrop/index.umd.js +1 -0
  29. package/dragdrop/package.json +8 -0
  30. package/editor-md/style.css +1 -1
  31. package/form/index.es.js +7 -1
  32. package/form/index.umd.js +7 -7
  33. package/form/style.css +1 -1
  34. package/global.d.ts +1 -0
  35. package/input/index.es.js +7 -1
  36. package/input/index.umd.js +6 -6
  37. package/input/style.css +1 -1
  38. package/input-number/index.es.js +7 -1
  39. package/input-number/index.umd.js +10 -10
  40. package/input-number/style.css +1 -1
  41. package/mention/index.es.js +7 -1
  42. package/mention/index.umd.js +9 -9
  43. package/mention/style.css +1 -1
  44. package/modal/index.es.js +2 -1
  45. package/modal/index.umd.js +1 -1
  46. package/package.json +1 -1
  47. package/pagination/index.es.js +7 -1
  48. package/pagination/index.umd.js +7 -7
  49. package/pagination/style.css +1 -1
  50. package/radio/index.es.js +7 -1
  51. package/radio/index.umd.js +13 -13
  52. package/radio/style.css +1 -1
  53. package/search/index.es.js +7 -1
  54. package/search/index.umd.js +8 -8
  55. package/search/style.css +1 -1
  56. package/select/index.es.js +7 -1
  57. package/select/index.umd.js +5 -5
  58. package/select/style.css +1 -1
  59. package/splitter/index.es.js +14 -3
  60. package/splitter/index.umd.js +12 -12
  61. package/style.css +1 -1
  62. package/switch/index.es.js +7 -1
  63. package/switch/index.umd.js +14 -14
  64. package/switch/style.css +1 -1
  65. package/table/index.es.js +10 -4
  66. package/table/index.umd.js +5 -5
  67. package/table/style.css +1 -1
  68. package/textarea/index.es.js +7 -1
  69. package/textarea/index.umd.js +12 -12
  70. package/textarea/style.css +1 -1
  71. package/time-picker/index.es.js +7 -1
  72. package/time-picker/index.umd.js +7 -7
  73. package/time-picker/style.css +1 -1
  74. package/time-select/index.es.js +7 -1
  75. package/time-select/index.umd.js +5 -5
  76. package/time-select/style.css +1 -1
  77. package/tree/index.es.js +7 -1
  78. package/tree/index.umd.js +7 -7
  79. package/tree/style.css +1 -1
  80. package/types/code-review/src/code-review-types.d.ts +17 -1
  81. package/types/code-review/src/code-review.d.ts +37 -4
  82. package/types/code-review/src/composables/use-code-review-comment.d.ts +10 -6
  83. package/types/code-review/src/composables/use-code-review-expand.d.ts +3 -2
  84. package/types/code-review/src/composables/use-code-review-fold.d.ts +6 -0
  85. package/types/code-review/src/composables/use-code-review.d.ts +6 -5
  86. package/types/code-review/src/const.d.ts +20 -0
  87. package/types/code-review/src/utils.d.ts +15 -2
  88. package/types/dragdrop/src/const.d.ts +0 -1
  89. package/types/dragdrop/src/draggable-directive.d.ts +1 -18
  90. package/types/dragdrop/src/droppable-directive.d.ts +1 -14
  91. package/types/dragdrop/src/sortable-directive.d.ts +1 -15
  92. package/types/dragdrop/src/utils.d.ts +2 -80
  93. package/types/form/src/form-types.d.ts +4 -0
  94. package/types/form/src/form.d.ts +9 -0
  95. package/types/modal/src/modal-types.d.ts +1 -1
  96. package/types/modal/src/modal.d.ts +2 -1
  97. package/types/shared/utils/index.d.ts +2 -0
  98. package/types/shared/utils/use-namespace.d.ts +13 -0
  99. package/vue-devui.es.js +1167 -645
  100. package/vue-devui.umd.js +101 -74
package/vue-devui.es.js CHANGED
@@ -39,6 +39,7 @@ import Clipboard from "clipboard";
39
39
  import { offset, autoPlacement, arrow, shift, computePosition, flip } from "@floating-ui/dom";
40
40
  import { onClickOutside, toRefs as toRefs$1, useResizeObserver } from "@vueuse/core";
41
41
  import * as Diff2Html from "diff2html";
42
+ import { Diff2HtmlUI } from "diff2html/lib/ui/js/diff2html-ui";
42
43
  import * as echarts from "echarts";
43
44
  import * as hljs from "highlight.js";
44
45
  import MarkdownIt from "markdown-it";
@@ -126,7 +127,7 @@ const getRootSlots = () => {
126
127
  const rootComponent = getRootComponent(getCurrentInstance());
127
128
  return rootComponent == null ? void 0 : rootComponent.slots;
128
129
  };
129
- function createBem(namespace, element, modifier) {
130
+ function createBem$1(namespace, element, modifier) {
130
131
  let cls = namespace;
131
132
  if (element) {
132
133
  cls += `__${element}`;
@@ -136,12 +137,12 @@ function createBem(namespace, element, modifier) {
136
137
  }
137
138
  return cls;
138
139
  }
139
- function useNamespace(block, needDot = false) {
140
+ function useNamespace$1(block, needDot = false) {
140
141
  const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
141
- const b = () => createBem(namespace);
142
- const e = (element) => element ? createBem(namespace, element) : "";
143
- const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
144
- const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
142
+ const b = () => createBem$1(namespace);
143
+ const e = (element) => element ? createBem$1(namespace, element) : "";
144
+ const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
145
+ const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
145
146
  return {
146
147
  b,
147
148
  e,
@@ -181,7 +182,7 @@ var DAccordionMenu = defineComponent({
181
182
  titleKey,
182
183
  menuItemTemplate
183
184
  } = toRefs(props);
184
- const ns2 = useNamespace("accordion");
185
+ const ns2 = useNamespace$1("accordion");
185
186
  const rootSlots = getRootSlots();
186
187
  const accordionCtx = inject("accordionContext");
187
188
  const parentValue = parent.value;
@@ -295,7 +296,7 @@ var DAccordionItem = defineComponent({
295
296
  disabledKey,
296
297
  itemTemplate
297
298
  } = toRefs(props);
298
- const ns2 = useNamespace("accordion");
299
+ const ns2 = useNamespace$1("accordion");
299
300
  const rootSlots = getRootSlots();
300
301
  const accordionCtx = inject("accordionContext");
301
302
  const parentValue = parent.value;
@@ -374,7 +375,7 @@ var DAccordionItemHreflink = defineComponent({
374
375
  disabledKey,
375
376
  itemTemplate
376
377
  } = toRefs(props);
377
- const ns2 = useNamespace("accordion");
378
+ const ns2 = useNamespace$1("accordion");
378
379
  const rootSlots = getRootSlots();
379
380
  const accordionCtx = inject("accordionContext");
380
381
  const title = computed(() => {
@@ -465,7 +466,7 @@ var DAccordionItemRouterlink = defineComponent({
465
466
  disabledKey,
466
467
  itemTemplate
467
468
  } = toRefs(props);
468
- const ns2 = useNamespace("accordion");
469
+ const ns2 = useNamespace$1("accordion");
469
470
  const route = useRoute();
470
471
  const rootSlots = getRootSlots();
471
472
  const accordionCtx = inject("accordionContext");
@@ -750,7 +751,7 @@ var AccordionList = defineComponent({
750
751
  noContentTemplate,
751
752
  innerListTemplate
752
753
  } = toRefs(props);
753
- const ns2 = useNamespace("accordion");
754
+ const ns2 = useNamespace$1("accordion");
754
755
  const deepValue = deepth.value;
755
756
  const rootSlots = getRootSlots();
756
757
  const accordionCtx = inject("accordionContext");
@@ -852,8 +853,8 @@ var Accordion = defineComponent({
852
853
  autoOpenActiveMenu,
853
854
  restrictOneOpen
854
855
  } = toRefs(props);
855
- const ns2 = useNamespace("accordion");
856
- const scrollbarNs = useNamespace("scrollbar");
856
+ const ns2 = useNamespace$1("accordion");
857
+ const scrollbarNs = useNamespace$1("scrollbar");
857
858
  let clickActiveItem = void 0;
858
859
  const flatten = (arr, curChildrenKey = "children", includeParent = false, includeLeaf = true) => {
859
860
  return arr.reduce((acc, cur) => {
@@ -1145,6 +1146,175 @@ const AlertCloseIcon = () => createVNode("svg", {
1145
1146
  L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057
1146
1147
  C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z`
1147
1148
  }, null)])])]);
1149
+ function hasClass(el, className2) {
1150
+ if (el.classList) {
1151
+ return el.classList.contains(className2);
1152
+ }
1153
+ const originClass = el.className;
1154
+ return ` ${originClass} `.indexOf(` ${className2} `) > -1;
1155
+ }
1156
+ function addClass(el, className2) {
1157
+ if (el.classList) {
1158
+ el.classList.add(className2);
1159
+ } else {
1160
+ if (!hasClass(el, className2)) {
1161
+ el.className = `${el.className} ${className2}`;
1162
+ }
1163
+ }
1164
+ }
1165
+ function removeClass(el, className2) {
1166
+ if (el.classList) {
1167
+ el.classList.remove(className2);
1168
+ } else {
1169
+ if (hasClass(el, className2)) {
1170
+ const originClass = el.className;
1171
+ el.className = ` ${originClass} `.replace(` ${className2} `, " ");
1172
+ }
1173
+ }
1174
+ }
1175
+ const inBrowser = typeof window !== "undefined";
1176
+ function debounce(func, wait, immediate) {
1177
+ let timer, result2;
1178
+ return function(...args) {
1179
+ if (timer) {
1180
+ clearTimeout(timer);
1181
+ }
1182
+ if (immediate) {
1183
+ const localImmediate = !timer;
1184
+ timer = window.setTimeout(() => {
1185
+ timer = null;
1186
+ }, wait);
1187
+ if (localImmediate) {
1188
+ result2 = func.apply(this, args);
1189
+ }
1190
+ } else {
1191
+ timer = window.setTimeout(() => {
1192
+ func.apply(this, args);
1193
+ }, wait);
1194
+ }
1195
+ return result2;
1196
+ };
1197
+ }
1198
+ function getElement(element) {
1199
+ if (element instanceof Element) {
1200
+ return element;
1201
+ }
1202
+ if (element && typeof element === "object" && element.$el instanceof Element) {
1203
+ return element.$el;
1204
+ }
1205
+ return null;
1206
+ }
1207
+ function lockScroll() {
1208
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
1209
+ const scrollTop = document.documentElement.scrollTop;
1210
+ const style = document.documentElement.getAttribute("style");
1211
+ document.documentElement.style.position = "fixed";
1212
+ document.documentElement.style.top = `-${scrollTop}px`;
1213
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
1214
+ document.documentElement.style.overflowY = "scroll";
1215
+ return () => {
1216
+ if (style) {
1217
+ document.documentElement.setAttribute("style", style);
1218
+ } else {
1219
+ document.documentElement.removeAttribute("style");
1220
+ }
1221
+ document.documentElement.scrollTop = scrollTop;
1222
+ };
1223
+ }
1224
+ return;
1225
+ }
1226
+ function getPropsSlot(slots, props, prop = "default") {
1227
+ var _a, _b;
1228
+ return (_b = props[prop]) != null ? _b : (_a = slots[prop]) == null ? void 0 : _a.call(slots);
1229
+ }
1230
+ function randomId(n = 8) {
1231
+ const str = "abcdefghijklmnopqrstuvwxyz0123456789";
1232
+ let result2 = "";
1233
+ for (let i = 0; i < n; i++) {
1234
+ result2 += str[parseInt((Math.random() * str.length).toString())];
1235
+ }
1236
+ return result2;
1237
+ }
1238
+ function toClipboard(text) {
1239
+ return new Promise((resolve, reject) => {
1240
+ const ele = document.createElement("button");
1241
+ const clipboard = new Clipboard(ele, {
1242
+ text: () => text,
1243
+ action: () => "copy"
1244
+ });
1245
+ clipboard.on("success", (e) => {
1246
+ clipboard.destroy();
1247
+ resolve(e);
1248
+ });
1249
+ clipboard.on("error", (e) => {
1250
+ clipboard.destroy();
1251
+ reject(e);
1252
+ });
1253
+ document.body.appendChild(ele);
1254
+ ele.click();
1255
+ document.body.removeChild(ele);
1256
+ });
1257
+ }
1258
+ function setStyle(element, style) {
1259
+ const oldStyle = {};
1260
+ const styleKeys = Object.keys(style);
1261
+ styleKeys.forEach((key) => {
1262
+ oldStyle[key] = element.style[key];
1263
+ });
1264
+ styleKeys.forEach((key) => {
1265
+ element.style[key] = style[key];
1266
+ });
1267
+ return oldStyle;
1268
+ }
1269
+ function middleNum(num, min = 0, max = 100) {
1270
+ let middle = 0;
1271
+ middle = Math.min(num, max);
1272
+ middle = Math.max(middle, min);
1273
+ return middle;
1274
+ }
1275
+ const isNumber = (value) => typeof value === "number";
1276
+ const isBoolean = (value) => typeof value === "boolean";
1277
+ const isString$2 = (value) => typeof value === "string";
1278
+ const isFunction$3 = (value) => Object.prototype.toString.call(value) === "[object Function]";
1279
+ const isUndefined = (value) => value === void 0;
1280
+ const isHTMLElement = (value) => inBrowser && "HTMLElement" in window && value instanceof HTMLElement;
1281
+ function omit(obj, fields) {
1282
+ const shallowCopy = Object.assign({}, obj);
1283
+ for (let i = 0; i < fields.length; i += 1) {
1284
+ const key = fields[i];
1285
+ delete shallowCopy[key];
1286
+ }
1287
+ return shallowCopy;
1288
+ }
1289
+ function createBem(namespace, element, modifier) {
1290
+ let cls = namespace;
1291
+ if (element) {
1292
+ cls += `__${element}`;
1293
+ }
1294
+ if (modifier) {
1295
+ cls += `--${modifier}`;
1296
+ }
1297
+ return cls;
1298
+ }
1299
+ function useNamespace(block, needDot = false) {
1300
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
1301
+ const b = () => createBem(namespace);
1302
+ const e = (element) => element ? createBem(namespace, element) : "";
1303
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
1304
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
1305
+ return {
1306
+ b,
1307
+ e,
1308
+ m,
1309
+ em
1310
+ };
1311
+ }
1312
+ function isUrl(value) {
1313
+ return /^((http|https):)?\/\//.test(value);
1314
+ }
1315
+ function isBase64(value) {
1316
+ return /^data:image\/.*;base64,/.test(value);
1317
+ }
1148
1318
  const ns$k = useNamespace("alert");
1149
1319
  const AlertTypeIcon = (props) => createVNode("svg", {
1150
1320
  "width": "16px",
@@ -1294,10 +1464,10 @@ var Alert = defineComponent({
1294
1464
  "type": props.type
1295
1465
  }, null)]) : null, createVNode("div", {
1296
1466
  "class": ns2.e("content")
1297
- }, [createVNode("span", null, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), props.closeable ? createVNode("div", {
1467
+ }, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a), createTextVNode(" ")]), props.closeable ? createVNode("div", {
1298
1468
  "class": ns2.e("close-icon"),
1299
1469
  "onClick": close2
1300
- }, [createVNode(AlertCloseIcon, null, null)]) : null])]), [[vShow, !closing.value]])];
1470
+ }, [createVNode(AlertCloseIcon, null, null)]) : null]), [[vShow, !closing.value]])];
1301
1471
  }
1302
1472
  }) : null;
1303
1473
  };
@@ -1468,146 +1638,6 @@ const setActiveLink = (timeId) => {
1468
1638
  }
1469
1639
  };
1470
1640
  const onScroll = throttleAndDebounce(setActiveLink, 300);
1471
- function hasClass(el, className2) {
1472
- if (el.classList) {
1473
- return el.classList.contains(className2);
1474
- }
1475
- const originClass = el.className;
1476
- return ` ${originClass} `.indexOf(` ${className2} `) > -1;
1477
- }
1478
- function addClass(el, className2) {
1479
- if (el.classList) {
1480
- el.classList.add(className2);
1481
- } else {
1482
- if (!hasClass(el, className2)) {
1483
- el.className = `${el.className} ${className2}`;
1484
- }
1485
- }
1486
- }
1487
- function removeClass(el, className2) {
1488
- if (el.classList) {
1489
- el.classList.remove(className2);
1490
- } else {
1491
- if (hasClass(el, className2)) {
1492
- const originClass = el.className;
1493
- el.className = ` ${originClass} `.replace(` ${className2} `, " ");
1494
- }
1495
- }
1496
- }
1497
- const inBrowser = typeof window !== "undefined";
1498
- function debounce(func, wait, immediate) {
1499
- let timer, result2;
1500
- return function(...args) {
1501
- if (timer) {
1502
- clearTimeout(timer);
1503
- }
1504
- if (immediate) {
1505
- const localImmediate = !timer;
1506
- timer = window.setTimeout(() => {
1507
- timer = null;
1508
- }, wait);
1509
- if (localImmediate) {
1510
- result2 = func.apply(this, args);
1511
- }
1512
- } else {
1513
- timer = window.setTimeout(() => {
1514
- func.apply(this, args);
1515
- }, wait);
1516
- }
1517
- return result2;
1518
- };
1519
- }
1520
- function getElement(element) {
1521
- if (element instanceof Element) {
1522
- return element;
1523
- }
1524
- if (element && typeof element === "object" && element.$el instanceof Element) {
1525
- return element.$el;
1526
- }
1527
- return null;
1528
- }
1529
- function lockScroll() {
1530
- if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
1531
- const scrollTop = document.documentElement.scrollTop;
1532
- const style = document.documentElement.getAttribute("style");
1533
- document.documentElement.style.position = "fixed";
1534
- document.documentElement.style.top = `-${scrollTop}px`;
1535
- document.documentElement.style.width = document.documentElement.style.width || "100%";
1536
- document.documentElement.style.overflowY = "scroll";
1537
- return () => {
1538
- if (style) {
1539
- document.documentElement.setAttribute("style", style);
1540
- } else {
1541
- document.documentElement.removeAttribute("style");
1542
- }
1543
- document.documentElement.scrollTop = scrollTop;
1544
- };
1545
- }
1546
- return;
1547
- }
1548
- function getPropsSlot(slots, props, prop = "default") {
1549
- var _a, _b;
1550
- return (_b = props[prop]) != null ? _b : (_a = slots[prop]) == null ? void 0 : _a.call(slots);
1551
- }
1552
- function randomId(n = 8) {
1553
- const str = "abcdefghijklmnopqrstuvwxyz0123456789";
1554
- let result2 = "";
1555
- for (let i = 0; i < n; i++) {
1556
- result2 += str[parseInt((Math.random() * str.length).toString())];
1557
- }
1558
- return result2;
1559
- }
1560
- function toClipboard(text) {
1561
- return new Promise((resolve, reject) => {
1562
- const ele = document.createElement("button");
1563
- const clipboard = new Clipboard(ele, {
1564
- text: () => text,
1565
- action: () => "copy"
1566
- });
1567
- clipboard.on("success", (e) => {
1568
- clipboard.destroy();
1569
- resolve(e);
1570
- });
1571
- clipboard.on("error", (e) => {
1572
- clipboard.destroy();
1573
- reject(e);
1574
- });
1575
- document.body.appendChild(ele);
1576
- ele.click();
1577
- document.body.removeChild(ele);
1578
- });
1579
- }
1580
- function setStyle(element, style) {
1581
- const oldStyle = {};
1582
- const styleKeys = Object.keys(style);
1583
- styleKeys.forEach((key) => {
1584
- oldStyle[key] = element.style[key];
1585
- });
1586
- styleKeys.forEach((key) => {
1587
- element.style[key] = style[key];
1588
- });
1589
- return oldStyle;
1590
- }
1591
- function middleNum(num, min = 0, max = 100) {
1592
- let middle = 0;
1593
- middle = Math.min(num, max);
1594
- middle = Math.max(middle, min);
1595
- return middle;
1596
- }
1597
- const isNumber = (value) => typeof value === "number";
1598
- const isBoolean = (value) => typeof value === "boolean";
1599
- const isString$2 = (value) => typeof value === "string";
1600
- const isFunction$3 = (value) => Object.prototype.toString.call(value) === "[object Function]";
1601
- const isUndefined = (value) => value === void 0;
1602
- const isHTMLElement = (value) => inBrowser && "HTMLElement" in window && value instanceof HTMLElement;
1603
- function omit(obj, fields) {
1604
- const shallowCopy = Object.assign({}, obj);
1605
- for (let i = 0; i < fields.length; i += 1) {
1606
- const key = fields[i];
1607
- delete shallowCopy[key];
1608
- }
1609
- return shallowCopy;
1610
- }
1611
1641
  const cssChange = (mysidebar, postion, top, left) => {
1612
1642
  mysidebar.style.position = postion;
1613
1643
  mysidebar.style.top = top + "px";
@@ -2134,6 +2164,10 @@ const formProps = {
2134
2164
  },
2135
2165
  size: {
2136
2166
  type: String
2167
+ },
2168
+ hideRequiredMark: {
2169
+ type: Boolean,
2170
+ default: false
2137
2171
  }
2138
2172
  };
2139
2173
  const FORM_TOKEN = Symbol("dForm");
@@ -6927,7 +6961,7 @@ var lodash = { exports: {} };
6927
6961
  function iteratee(func) {
6928
6962
  return baseIteratee(typeof func == "function" ? func : baseClone2(func, CLONE_DEEP_FLAG2));
6929
6963
  }
6930
- function matches(source) {
6964
+ function matches2(source) {
6931
6965
  return baseMatches(baseClone2(source, CLONE_DEEP_FLAG2));
6932
6966
  }
6933
6967
  function matchesProperty(path, srcValue) {
@@ -7139,7 +7173,7 @@ var lodash = { exports: {} };
7139
7173
  lodash2.map = map;
7140
7174
  lodash2.mapKeys = mapKeys;
7141
7175
  lodash2.mapValues = mapValues;
7142
- lodash2.matches = matches;
7176
+ lodash2.matches = matches2;
7143
7177
  lodash2.matchesProperty = matchesProperty;
7144
7178
  lodash2.memoize = memoize;
7145
7179
  lodash2.merge = merge;
@@ -7616,7 +7650,7 @@ var Form = defineComponent({
7616
7650
  props: formProps,
7617
7651
  emits: ["validate"],
7618
7652
  setup(props, ctx2) {
7619
- const ns2 = useNamespace("form");
7653
+ const ns2 = useNamespace$1("form");
7620
7654
  const {
7621
7655
  itemContexts,
7622
7656
  addItemContext,
@@ -7749,7 +7783,7 @@ const FixedOverlay = defineComponent({
7749
7783
  const {
7750
7784
  modelValue
7751
7785
  } = toRefs(props);
7752
- const ns2 = useNamespace("fixed-overlay");
7786
+ const ns2 = useNamespace$1("fixed-overlay");
7753
7787
  const {
7754
7788
  onClick
7755
7789
  } = useFixedOverlay(props, ctx2);
@@ -7915,7 +7949,7 @@ const FlexibleOverlay = defineComponent({
7915
7949
  emit,
7916
7950
  expose
7917
7951
  }) {
7918
- const ns2 = useNamespace("flexible-overlay");
7952
+ const ns2 = useNamespace$1("flexible-overlay");
7919
7953
  const {
7920
7954
  clickEventBubble
7921
7955
  } = toRefs(props);
@@ -7963,7 +7997,7 @@ var OverlayInstall = {
7963
7997
  const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
7964
7998
  const isString$1 = (val) => typeof val === "string";
7965
7999
  const isObject$7 = (val) => val !== null && typeof val === "object";
7966
- const ns$j = useNamespace("popper-trigger");
8000
+ const ns$j = useNamespace$1("popper-trigger");
7967
8001
  function wrapContent(content2) {
7968
8002
  return h("span", { class: ns$j.b() }, content2);
7969
8003
  }
@@ -8150,7 +8184,7 @@ function usePopoverEvent(props, visible, origin) {
8150
8184
  });
8151
8185
  return { placement, handlePositionChange, onMouseenter, onMouseleave };
8152
8186
  }
8153
- const ns$i = useNamespace("popover");
8187
+ const ns$i = useNamespace$1("popover");
8154
8188
  function SuccessIcon$3() {
8155
8189
  return createVNode("svg", {
8156
8190
  "class": [ns$i.e("icon"), ns$i.em("icon", "success")],
@@ -8252,7 +8286,7 @@ var PopoverIcon = defineComponent({
8252
8286
  }
8253
8287
  },
8254
8288
  setup(props) {
8255
- const ns2 = useNamespace("popover");
8289
+ const ns2 = useNamespace$1("popover");
8256
8290
  return () => props.type && props.type !== "default" && createVNode("span", {
8257
8291
  "class": ns2.e("icon-wrap")
8258
8292
  }, [props.type === "success" && createVNode(SuccessIcon$3, null, null), props.type === "warning" && createVNode(WarningIcon$2, null, null), props.type === "info" && createVNode(InfoIcon$2, null, null), props.type === "error" && createVNode(ErrorIcon$3, null, null)]);
@@ -8289,7 +8323,7 @@ var Popover = defineComponent({
8289
8323
  const {
8290
8324
  overlayStyles
8291
8325
  } = usePopover(props, visible, placement, origin, popoverRef);
8292
- const ns2 = useNamespace("popover");
8326
+ const ns2 = useNamespace$1("popover");
8293
8327
  provide(POPPER_TRIGGER_TOKEN, origin);
8294
8328
  watch(visible, (newVal) => {
8295
8329
  if (newVal) {
@@ -8419,9 +8453,10 @@ function PendingIcon() {
8419
8453
  }, null)])]);
8420
8454
  }
8421
8455
  function useFormLabel() {
8456
+ const formContext = inject(FORM_TOKEN);
8422
8457
  const formItemContext = inject(FORM_ITEM_TOKEN);
8423
8458
  const labelData = inject(LABEL_DATA);
8424
- const ns2 = useNamespace("form");
8459
+ const ns2 = useNamespace$1("form");
8425
8460
  const labelClasses = computed(() => ({
8426
8461
  [`${ns2.e("label")}`]: true,
8427
8462
  [`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
@@ -8430,7 +8465,8 @@ function useFormLabel() {
8430
8465
  }));
8431
8466
  const labelInnerClasses = computed(() => ({
8432
8467
  [`${ns2.e("label-span")}`]: true,
8433
- [`${ns2.em("label", "required")}`]: formItemContext.isRequired
8468
+ [`${ns2.em("label", "required")}`]: formItemContext.isRequired,
8469
+ [`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
8434
8470
  }));
8435
8471
  return { labelClasses, labelInnerClasses };
8436
8472
  }
@@ -8439,7 +8475,7 @@ var FormLabel = defineComponent({
8439
8475
  name: "DFormLabel",
8440
8476
  props: formLabelProps,
8441
8477
  setup(props, ctx2) {
8442
- const ns2 = useNamespace("form");
8478
+ const ns2 = useNamespace$1("form");
8443
8479
  const {
8444
8480
  labelClasses,
8445
8481
  labelInnerClasses
@@ -8482,7 +8518,7 @@ var PopoverInstall = {
8482
8518
  };
8483
8519
  function useFormControl(props) {
8484
8520
  const labelData = inject(LABEL_DATA);
8485
- const ns2 = useNamespace("form");
8521
+ const ns2 = useNamespace$1("form");
8486
8522
  const { feedbackStatus } = toRefs(props);
8487
8523
  const controlClasses = computed(() => ({
8488
8524
  [ns2.e("control")]: true,
@@ -8512,7 +8548,7 @@ var FormControl = defineComponent({
8512
8548
  props: formControlProps,
8513
8549
  setup(props, ctx2) {
8514
8550
  const formControl2 = ref();
8515
- const ns2 = useNamespace("form");
8551
+ const ns2 = useNamespace$1("form");
8516
8552
  const {
8517
8553
  controlClasses,
8518
8554
  controlContainerClasses
@@ -9566,7 +9602,7 @@ function getFieldValue(obj, path) {
9566
9602
  }
9567
9603
  function useFormItem(messageType, _rules, validateState) {
9568
9604
  const formContext = inject(FORM_TOKEN);
9569
- const ns2 = useNamespace("form");
9605
+ const ns2 = useNamespace$1("form");
9570
9606
  const itemClasses = computed(() => ({
9571
9607
  [`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
9572
9608
  [`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
@@ -9808,15 +9844,15 @@ var FormInstall = {
9808
9844
  };
9809
9845
  function useAutoCompleteRender(props, ctx2, visible, isFocus, isDisabled, autoCompleteSize) {
9810
9846
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9811
- const ns2 = useNamespace("auto-complete");
9812
- const inputNs = useNamespace("auto-complete-input");
9813
- const slotNs = useNamespace("auto-complete-slot");
9814
- const formNs = useNamespace("form-group");
9815
- const feedbackNs = useNamespace("has-feedback");
9816
- const selectNs = useNamespace("select-open");
9817
- const formControlNs = useNamespace("form-control");
9818
- const dropdownNs = useNamespace("dropdown-origin");
9819
- const dropdownOpenNs = useNamespace("dropdown-origin-open");
9847
+ const ns2 = useNamespace$1("auto-complete");
9848
+ const inputNs = useNamespace$1("auto-complete-input");
9849
+ const slotNs = useNamespace$1("auto-complete-slot");
9850
+ const formNs = useNamespace$1("form-group");
9851
+ const feedbackNs = useNamespace$1("has-feedback");
9852
+ const selectNs = useNamespace$1("select-open");
9853
+ const formControlNs = useNamespace$1("form-control");
9854
+ const dropdownNs = useNamespace$1("dropdown-origin");
9855
+ const dropdownOpenNs = useNamespace$1("dropdown-origin-open");
9820
9856
  const slots = ctx2.slots;
9821
9857
  const isValidatorError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
9822
9858
  const autoCompleteTopClasses = computed(() => ({
@@ -9920,7 +9956,7 @@ var Loading = defineComponent({
9920
9956
  message: message2,
9921
9957
  $slots
9922
9958
  } = this;
9923
- const ns2 = useNamespace("loading");
9959
+ const ns2 = useNamespace$1("loading");
9924
9960
  return isShow && createVNode("div", {
9925
9961
  "class": [ns2.b(), isFull ? ns2.m("full") : ""]
9926
9962
  }, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
@@ -10088,10 +10124,10 @@ var DAutoCompleteDropdown = defineComponent({
10088
10124
  disabledKey,
10089
10125
  isSearching
10090
10126
  } = propsData.props;
10091
- const ns2 = useNamespace("auto-complete");
10092
- const noDataNs = useNamespace("no-data-tip");
10093
- const dropdownMenuNs = useNamespace("dropdown-menu");
10094
- const dropdownItemNs = useNamespace("dropdown-item");
10127
+ const ns2 = useNamespace$1("auto-complete");
10128
+ const noDataNs = useNamespace$1("no-data-tip");
10129
+ const dropdownMenuNs = useNamespace$1("dropdown-menu");
10130
+ const dropdownItemNs = useNamespace$1("dropdown-item");
10095
10131
  const onSelect = (item) => {
10096
10132
  item = valueParser.value(item);
10097
10133
  if (typeof item === "object" && item[disabledKey]) {
@@ -10260,7 +10296,7 @@ var svgIcon = defineComponent({
10260
10296
  color: color2,
10261
10297
  size
10262
10298
  } = toRefs(props);
10263
- const ns2 = useNamespace("svg-icon");
10299
+ const ns2 = useNamespace$1("svg-icon");
10264
10300
  const iconName = computed(() => `#icon-${name.value}`);
10265
10301
  const iconSize = computed(() => {
10266
10302
  return typeof size.value === "number" ? `${size.value}px` : size.value;
@@ -10280,12 +10316,6 @@ var svgIcon = defineComponent({
10280
10316
  };
10281
10317
  }
10282
10318
  });
10283
- function isUrl(value) {
10284
- return /^((http|https):)?\/\//.test(value);
10285
- }
10286
- function isBase64(value) {
10287
- return /^data:image\/.*;base64,/.test(value);
10288
- }
10289
10319
  function useIconDom(props, ctx2) {
10290
10320
  const {
10291
10321
  component,
@@ -10295,7 +10325,7 @@ function useIconDom(props, ctx2) {
10295
10325
  classPrefix,
10296
10326
  rotate
10297
10327
  } = toRefs(props);
10298
- const ns2 = useNamespace("icon");
10328
+ const ns2 = useNamespace$1("icon");
10299
10329
  const iconSize = computed(() => {
10300
10330
  return typeof size.value === "number" ? `${size.value}px` : size.value;
10301
10331
  });
@@ -10353,7 +10383,7 @@ var DIcon = defineComponent({
10353
10383
  const {
10354
10384
  iconDom
10355
10385
  } = useIconDom(props, ctx2);
10356
- const ns2 = useNamespace("icon");
10386
+ const ns2 = useNamespace$1("icon");
10357
10387
  const wrapClassed = computed(() => ({
10358
10388
  [ns2.e("container")]: true,
10359
10389
  [ns2.m("disabled")]: disabled.value,
@@ -10379,7 +10409,7 @@ var iconGroup = "";
10379
10409
  var IconGroup = defineComponent({
10380
10410
  name: "DIconGroup",
10381
10411
  setup(_, ctx2) {
10382
- const ns2 = useNamespace("icon-group");
10412
+ const ns2 = useNamespace$1("icon-group");
10383
10413
  return () => {
10384
10414
  var _a, _b;
10385
10415
  return createVNode("div", {
@@ -10427,8 +10457,8 @@ var AutoComplete = defineComponent({
10427
10457
  valueParser,
10428
10458
  placeholder
10429
10459
  } = toRefs(props);
10430
- const ns2 = useNamespace("auto-complete");
10431
- const inputNs = useNamespace("auto-complete-input");
10460
+ const ns2 = useNamespace$1("auto-complete");
10461
+ const inputNs = useNamespace$1("auto-complete-input");
10432
10462
  const isDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || disabled.value);
10433
10463
  const autoCompleteSize = computed(() => (formContext == null ? void 0 : formContext.size) || props.size);
10434
10464
  const {
@@ -10827,7 +10857,7 @@ var Avatar = defineComponent({
10827
10857
  const code = ref(1);
10828
10858
  const nameDisplay = ref();
10829
10859
  const ns2 = useNamespace("avatar");
10830
- const styleNS = ns2.e("style");
10860
+ const styleNS = ns2.m("style");
10831
10861
  const bgNS = computed(() => {
10832
10862
  return ns2.m(`${"background-" + code.value}`);
10833
10863
  });
@@ -10838,7 +10868,7 @@ var Avatar = defineComponent({
10838
10868
  } else if (gender.value.toLowerCase() === "female") {
10839
10869
  code.value = 0;
10840
10870
  } else {
10841
- console.warn('gender must be "Male" or "Female"');
10871
+ throw new Error('gender must be "Male" or "Female"');
10842
10872
  }
10843
10873
  return;
10844
10874
  }
@@ -10908,7 +10938,7 @@ var Avatar = defineComponent({
10908
10938
  }, null);
10909
10939
  const hasImgSrc = imgSrc.value && !isErrorImg.value ? imgElement : null;
10910
10940
  const nameElement = createVNode("span", {
10911
- "class": [styleNS, bgNS.value],
10941
+ "class": `${styleNS} ${bgNS.value}`,
10912
10942
  "style": {
10913
10943
  height: `${height.value}px`,
10914
10944
  width: `${width.value}px`,
@@ -11032,7 +11062,7 @@ var BackTop = defineComponent({
11032
11062
  setup(props, ctx2) {
11033
11063
  const slots = ctx2.slots;
11034
11064
  const backTopRef = ref(null);
11035
- const ns2 = useNamespace("back-top");
11065
+ const ns2 = useNamespace$1("back-top");
11036
11066
  const position = usePosition(props);
11037
11067
  const isVisible = useVisibility(props, backTopRef);
11038
11068
  const scrollToTop = (e) => {
@@ -11415,7 +11445,7 @@ var Dropdown$1 = defineComponent({
11415
11445
  const id = `dropdown_${dropdownId++}`;
11416
11446
  const isOpen = ref(false);
11417
11447
  const currentPosition = ref("bottom");
11418
- const ns2 = useNamespace("dropdown");
11448
+ const ns2 = useNamespace$1("dropdown");
11419
11449
  provide(POPPER_TRIGGER_TOKEN, origin);
11420
11450
  useDropdownEvent({
11421
11451
  id,
@@ -11491,7 +11521,7 @@ var BreadcrumbItem = defineComponent({
11491
11521
  }) {
11492
11522
  var _a;
11493
11523
  const separatorIcon = inject("separatorIcon");
11494
- const ns2 = useNamespace("breadcrumb");
11524
+ const ns2 = useNamespace$1("breadcrumb");
11495
11525
  const linkClass = props.to ? "is-link" : "";
11496
11526
  const dropdownTitleClass = props.showMenu && ((_a = props.menuList) == null ? void 0 : _a.length) ? ns2.e("dropdown-title") : "";
11497
11527
  const link = ref(null);
@@ -11576,7 +11606,7 @@ var Breadcrumb = defineComponent({
11576
11606
  var _a;
11577
11607
  const separatorIcon = (_a = getPropsSlot(slots, props, "separatorIcon")) != null ? _a : "/";
11578
11608
  provide("separatorIcon", separatorIcon);
11579
- const ns2 = useNamespace("breadcrumb");
11609
+ const ns2 = useNamespace$1("breadcrumb");
11580
11610
  const renderBreadcrumbItemRouted = (item) => {
11581
11611
  return createVNode(resolveComponent("d-breadcrumb-item"), {
11582
11612
  "to": `path: ${item.link}`,
@@ -11667,7 +11697,7 @@ const buttonGroupProps = {
11667
11697
  };
11668
11698
  const buttonGroupInjectionKey = Symbol("d-button-group");
11669
11699
  function useButton(props, ctx2) {
11670
- const ns2 = useNamespace("button");
11700
+ const ns2 = useNamespace$1("button");
11671
11701
  const hasContent = computed(() => ctx2.slots.default);
11672
11702
  const colorMap = {
11673
11703
  solid: "primary",
@@ -11756,7 +11786,7 @@ var ButtonGroup = defineComponent({
11756
11786
  setup(props, {
11757
11787
  slots
11758
11788
  }) {
11759
- const ns2 = useNamespace("button-group");
11789
+ const ns2 = useNamespace$1("button-group");
11760
11790
  provide(buttonGroupInjectionKey, {
11761
11791
  size: toRef(props, "size")
11762
11792
  });
@@ -11801,7 +11831,7 @@ var Card = defineComponent({
11801
11831
  align,
11802
11832
  src
11803
11833
  } = toRefs(props);
11804
- const ns2 = useNamespace("card");
11834
+ const ns2 = useNamespace$1("card");
11805
11835
  const alignClass = computed(() => {
11806
11836
  return {
11807
11837
  [ns2.e("actions")]: true,
@@ -12091,7 +12121,7 @@ var CarouselInstall = {
12091
12121
  app.component(CarouselItem.name, CarouselItem);
12092
12122
  }
12093
12123
  };
12094
- const ns$h = useNamespace("cascader");
12124
+ const ns$h = useNamespace$1("cascader");
12095
12125
  const useRootClassName = (props, menuShow) => {
12096
12126
  return computed(() => ({
12097
12127
  [`${ns$h.b()} ${ns$h.e("dropdown")} ${ns$h.em("dropdown", "animation")}`]: true,
@@ -12641,7 +12671,7 @@ var Checkbox = defineComponent({
12641
12671
  props: checkboxProps,
12642
12672
  emits: ["change", "update:checked", "update:modelValue"],
12643
12673
  setup(props, ctx2) {
12644
- const ns2 = useNamespace("checkbox");
12674
+ const ns2 = useNamespace$1("checkbox");
12645
12675
  const {
12646
12676
  mergedChecked,
12647
12677
  mergedDisabled,
@@ -12742,7 +12772,7 @@ var DCheckboxGroup = defineComponent({
12742
12772
  props: checkboxGroupProps,
12743
12773
  emits: ["change", "update:modelValue"],
12744
12774
  setup(props, ctx2) {
12745
- const ns2 = useNamespace("checkbox");
12775
+ const ns2 = useNamespace$1("checkbox");
12746
12776
  const {
12747
12777
  defaultOpt
12748
12778
  } = useCheckboxGroup(props, ctx2);
@@ -12788,7 +12818,7 @@ var CheckboxButton = defineComponent({
12788
12818
  props: checkboxProps,
12789
12819
  emits: ["change", "update:checked", "update:modelValue"],
12790
12820
  setup(props, ctx2) {
12791
- const ns2 = useNamespace("checkbox-button");
12821
+ const ns2 = useNamespace$1("checkbox-button");
12792
12822
  const {
12793
12823
  mergedChecked,
12794
12824
  mergedDisabled,
@@ -13364,8 +13394,8 @@ function useInputRender$1(props, ctx2) {
13364
13394
  const formContext = inject(FORM_TOKEN, void 0);
13365
13395
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
13366
13396
  const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
13367
- const ns2 = useNamespace("input");
13368
- const slotNs = useNamespace("input-slot");
13397
+ const ns2 = useNamespace$1("input");
13398
+ const slotNs = useNamespace$1("input-slot");
13369
13399
  const isFocus = ref(false);
13370
13400
  const { error: error2, size, disabled } = toRefs(props);
13371
13401
  const slots = ctx2.slots;
@@ -13451,8 +13481,8 @@ var DInput = defineComponent({
13451
13481
  const {
13452
13482
  modelValue
13453
13483
  } = toRefs(props);
13454
- const ns2 = useNamespace("input");
13455
- const slotNs = useNamespace("input-slot");
13484
+ const ns2 = useNamespace$1("input");
13485
+ const slotNs = useNamespace$1("input-slot");
13456
13486
  const {
13457
13487
  inputDisabled,
13458
13488
  inputSize,
@@ -13554,7 +13584,7 @@ var Cascader = defineComponent({
13554
13584
  props: cascaderProps,
13555
13585
  emits: ["update:modelValue", "change", "focus", "blur"],
13556
13586
  setup(props, ctx2) {
13557
- const ns2 = useNamespace("cascader");
13587
+ const ns2 = useNamespace$1("cascader");
13558
13588
  const {
13559
13589
  origin,
13560
13590
  overlayRef,
@@ -14248,13 +14278,28 @@ const codeReviewProps = {
14248
14278
  type: Boolean,
14249
14279
  default: false
14250
14280
  },
14281
+ allowComment: {
14282
+ type: Boolean,
14283
+ default: true
14284
+ },
14285
+ allowExpand: {
14286
+ type: Boolean,
14287
+ default: true
14288
+ },
14289
+ showBlob: {
14290
+ type: Boolean,
14291
+ default: false
14292
+ },
14251
14293
  outputFormat: {
14252
14294
  type: String,
14253
14295
  default: "line-by-line"
14254
14296
  },
14255
- expandAllThreshold: {
14297
+ expandThreshold: {
14256
14298
  type: Number,
14257
14299
  default: 50
14300
+ },
14301
+ expandLoader: {
14302
+ type: Function
14258
14303
  }
14259
14304
  };
14260
14305
  const CodeReviewInjectionKey = Symbol("d-code-review");
@@ -14271,7 +14316,7 @@ var CodeReviewHeader = defineComponent({
14271
14316
  name: "DCodeReviewHeader",
14272
14317
  emits: ["click"],
14273
14318
  setup(_, ctx2) {
14274
- const ns2 = useNamespace("code-review");
14319
+ const ns2 = useNamespace$1("code-review");
14275
14320
  const {
14276
14321
  diffInfo,
14277
14322
  isFold,
@@ -14326,10 +14371,285 @@ var CodeReviewHeader = defineComponent({
14326
14371
  });
14327
14372
  const ExpandLineReg = /^@@ -(\d+),(\d+) \+(\d+),(\d+) @@/;
14328
14373
  const FirstLineReg = /^@@ -[0,1](?!\d)/;
14374
+ const TableTrReg = /<tr[^>]*>[\s\S]*?<\/tr>/gi;
14375
+ const TableTdReg = /<td[^>]*>[\s\S]*?<\/td>/gi;
14376
+ const TableTbodyReg = /<tbody[^>]*>[\s\S]*?<\/tbody>/gi;
14377
+ const TableTbodyAttrReg = /<tbody([^>]*)>/i;
14378
+ const EmptyDataLangReg = /<div[^>]* data-lang="">[\s\S]*?<\/div>/gi;
14379
+ const LineByLineTemplate = `<div id="{{fileHtmlId}}" class="d2h-file-wrapper" data-lang="{{file.language}}">
14380
+ <div class="d2h-file-diff">
14381
+ <div class="d2h-code-wrapper">
14382
+ <table class="d2h-diff-table">
14383
+ <tbody class="d2h-diff-tbody">
14384
+ {{{diffs}}}
14385
+ </tbody>
14386
+ </table>
14387
+ </div>
14388
+ </div>
14389
+ </div>`;
14390
+ const SideBySideTemplate = `<div id="{{fileHtmlId}}" class="d2h-file-wrapper" data-lang="{{file.language}}">
14391
+ <div class="d2h-files-diff">
14392
+ <div class="d2h-file-side-diff">
14393
+ <div class="d2h-code-wrapper">
14394
+ <table class="d2h-diff-table">
14395
+ <tbody class="d2h-diff-tbody">
14396
+ {{{diffs.left}}}
14397
+ {{{diffs.right}}}
14398
+ </tbody>
14399
+ </table>
14400
+ </div>
14401
+ </div>
14402
+ </div>
14403
+ </div>`;
14404
+ const EmptyTemplate = {
14405
+ "generic-empty-diff": ""
14406
+ };
14407
+ const TemplateMap = {
14408
+ "line-by-line": __spreadValues({ "line-by-line-file-diff": LineByLineTemplate }, EmptyTemplate),
14409
+ "side-by-side": __spreadValues({ "side-by-side-file-diff": SideBySideTemplate }, EmptyTemplate)
14410
+ };
14329
14411
  function notEmptyNode(node) {
14330
14412
  const classes = node.classList;
14331
14413
  return !classes.contains("d2h-info") && !classes.contains("d2h-emptyplaceholder") && !classes.contains("comment-cell");
14332
14414
  }
14415
+ function insertIncrementLineToPage(referenceDom, trNodes, direction) {
14416
+ if (direction === "up") {
14417
+ const nextSibling = referenceDom.nextElementSibling;
14418
+ trNodes.forEach((item) => {
14419
+ var _a;
14420
+ (_a = referenceDom.parentNode) == null ? void 0 : _a.insertBefore(item, nextSibling);
14421
+ });
14422
+ } else {
14423
+ trNodes.forEach((item) => {
14424
+ var _a;
14425
+ (_a = referenceDom.parentNode) == null ? void 0 : _a.insertBefore(item, referenceDom);
14426
+ });
14427
+ }
14428
+ }
14429
+ function ifRemoveExpandLineForDoubleColumn(expandDom, newExpandDom, direction) {
14430
+ var _a, _b, _c, _d, _e, _f, _g, _h;
14431
+ const matches2 = newExpandDom.children[1].innerText.trim().match(ExpandLineReg);
14432
+ if (!matches2) {
14433
+ return true;
14434
+ }
14435
+ const leftLineNumber = parseInt(matches2[1]);
14436
+ const addedLine = parseInt(matches2[2]);
14437
+ const rightLineNumber = parseInt(matches2[3]);
14438
+ if (direction === "up") {
14439
+ const prevSibling = expandDom.previousElementSibling;
14440
+ if (!prevSibling) {
14441
+ if (leftLineNumber === 1 && rightLineNumber === 1) {
14442
+ expandDom == null ? void 0 : expandDom.remove();
14443
+ return true;
14444
+ }
14445
+ } else {
14446
+ const prevLeftLineNumber = parseInt((_b = (_a = prevSibling.children) == null ? void 0 : _a[0]) == null ? void 0 : _b.innerText);
14447
+ const prevRightLineNumber = parseInt((_d = (_c = prevSibling.children) == null ? void 0 : _c[2]) == null ? void 0 : _d.innerText);
14448
+ if (leftLineNumber === prevLeftLineNumber + 1 && rightLineNumber === prevRightLineNumber + 1) {
14449
+ expandDom.remove();
14450
+ return true;
14451
+ }
14452
+ }
14453
+ } else {
14454
+ const nextSibling = expandDom.nextElementSibling;
14455
+ if (nextSibling) {
14456
+ const nextLeftLineNumber = parseInt((_f = (_e = nextSibling == null ? void 0 : nextSibling.children) == null ? void 0 : _e[0]) == null ? void 0 : _f.innerText);
14457
+ const nextRightLineNumber = parseInt((_h = (_g = nextSibling == null ? void 0 : nextSibling.children) == null ? void 0 : _g[2]) == null ? void 0 : _h.innerText);
14458
+ if (leftLineNumber + addedLine === nextLeftLineNumber && rightLineNumber + addedLine === nextRightLineNumber) {
14459
+ expandDom.remove();
14460
+ return true;
14461
+ }
14462
+ }
14463
+ }
14464
+ return false;
14465
+ }
14466
+ function ifRemoveExpandLine(expandDom, newExpandDom, direction) {
14467
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
14468
+ const matches2 = newExpandDom.children[1].innerText.trim().match(ExpandLineReg);
14469
+ if (!matches2) {
14470
+ return true;
14471
+ }
14472
+ const leftLineNumber = parseInt(matches2[1]);
14473
+ const addedLine = parseInt(matches2[2]);
14474
+ const rightLineNumber = parseInt(matches2[3]);
14475
+ if (direction === "up") {
14476
+ const prevSibling = expandDom.previousElementSibling;
14477
+ if (!prevSibling) {
14478
+ if (leftLineNumber === 1 && rightLineNumber === 1) {
14479
+ expandDom == null ? void 0 : expandDom.remove();
14480
+ return true;
14481
+ }
14482
+ } else {
14483
+ const prevLeftLineNumber = parseInt((_c = (_b = (_a = prevSibling.children) == null ? void 0 : _a[0].children) == null ? void 0 : _b[0]) == null ? void 0 : _c.innerText);
14484
+ const prevRightLineNumber = parseInt((_f = (_e = (_d = prevSibling.children) == null ? void 0 : _d[0].children) == null ? void 0 : _e[1]) == null ? void 0 : _f.innerText);
14485
+ if (leftLineNumber === prevLeftLineNumber + 1 && rightLineNumber === prevRightLineNumber + 1) {
14486
+ expandDom.remove();
14487
+ return true;
14488
+ }
14489
+ }
14490
+ } else {
14491
+ const nextSibling = expandDom.nextElementSibling;
14492
+ if (nextSibling) {
14493
+ const nextLeftLineNumber = parseInt((_i = (_h = (_g = nextSibling == null ? void 0 : nextSibling.children) == null ? void 0 : _g[0].children) == null ? void 0 : _h[0]) == null ? void 0 : _i.innerText);
14494
+ const nextRightLineNumber = parseInt((_l = (_k = (_j = nextSibling == null ? void 0 : nextSibling.children) == null ? void 0 : _j[0].children) == null ? void 0 : _k[1]) == null ? void 0 : _l.innerText);
14495
+ if (leftLineNumber + addedLine === nextLeftLineNumber && rightLineNumber + addedLine === nextRightLineNumber) {
14496
+ expandDom.remove();
14497
+ return true;
14498
+ }
14499
+ }
14500
+ }
14501
+ return false;
14502
+ }
14503
+ function updateExpandLineCount(expandDom, newExpandDom) {
14504
+ if (!expandDom.nextElementSibling) {
14505
+ return;
14506
+ }
14507
+ const curMatches = expandDom.children[1].innerText.trim().match(ExpandLineReg);
14508
+ const newMatches = newExpandDom.children[1].innerText.trim().match(ExpandLineReg);
14509
+ const newChangedNumLeft = parseInt((curMatches == null ? void 0 : curMatches[2]) || "") + parseInt((newMatches == null ? void 0 : newMatches[2]) || "");
14510
+ const newChangedNumRight = parseInt((curMatches == null ? void 0 : curMatches[4]) || "") + parseInt((newMatches == null ? void 0 : newMatches[4]) || "");
14511
+ expandDom.children[1].children[0].innerText = `@@ -${(newMatches == null ? void 0 : newMatches[1]) || 0},${newChangedNumLeft} +${(newMatches == null ? void 0 : newMatches[3]) || 0},${newChangedNumRight} @@`;
14512
+ }
14513
+ function parseDiffCode(container, code, outputFormat) {
14514
+ var _a;
14515
+ const diff2HtmlUi = new Diff2HtmlUI(container, code, {
14516
+ drawFileList: false,
14517
+ matching: "lines",
14518
+ outputFormat,
14519
+ highlight: true,
14520
+ rawTemplates: TemplateMap[outputFormat]
14521
+ });
14522
+ if (outputFormat === "side-by-side") {
14523
+ let diffHtmlStr = diff2HtmlUi.diffHtml;
14524
+ if (diffHtmlStr.match(EmptyDataLangReg)) {
14525
+ diffHtmlStr = diffHtmlStr.replace(EmptyDataLangReg, "");
14526
+ }
14527
+ const trList = diffHtmlStr.match(TableTrReg);
14528
+ const trListLength = trList.length;
14529
+ let newTrStr = "";
14530
+ const offset2 = trListLength / 2;
14531
+ for (let i = 0; i < trListLength / 2; i++) {
14532
+ const leftTdList = trList[i].match(TableTdReg);
14533
+ const rightTdList = trList[i + offset2].match(TableTdReg);
14534
+ newTrStr += `<tr>${leftTdList == null ? void 0 : leftTdList.join("")}${rightTdList == null ? void 0 : rightTdList.join("")}</tr>`;
14535
+ }
14536
+ const tbodyAttr = ((_a = diffHtmlStr.match(TableTbodyAttrReg)) == null ? void 0 : _a[1]) || "";
14537
+ const newDiffHtmlStr = diffHtmlStr.replace(TableTbodyReg, `<tbody ${tbodyAttr}>${newTrStr}</tbody>`);
14538
+ diff2HtmlUi.diffHtml = newDiffHtmlStr;
14539
+ }
14540
+ diff2HtmlUi.draw();
14541
+ }
14542
+ function setLineNumberInDataset(trNode, prevL, prevR, nextL, nextR) {
14543
+ if (trNode) {
14544
+ trNode.classList.add("expand-line");
14545
+ trNode.dataset.prevL = String(prevL);
14546
+ trNode.dataset.prevR = String(prevR);
14547
+ trNode.dataset.nextL = String(nextL);
14548
+ trNode.dataset.nextR = String(nextR);
14549
+ }
14550
+ }
14551
+ function updateExpandUpDownButton(trNode) {
14552
+ trNode.children[0].children[0].remove();
14553
+ trNode.children[0].children[0].classList.remove("up-expand");
14554
+ trNode.children[0].children[0].classList.add("all-expand");
14555
+ trNode.children[0].children[0].innerHTML = AllExpandIcon();
14556
+ }
14557
+ function updateLineNumberInDatasetForDoubleColumn(trNode, expandThreshold, position, updateExpandButton = false) {
14558
+ let nextL;
14559
+ let prevL;
14560
+ let nextR;
14561
+ let prevR;
14562
+ if (position === "top") {
14563
+ const nextLineNode = trNode.nextElementSibling;
14564
+ nextL = parseInt(nextLineNode.children[0].innerText) - 1;
14565
+ prevL = Math.max(nextL - expandThreshold + 1, 1);
14566
+ nextR = parseInt(nextLineNode.children[2].innerText) - 1;
14567
+ prevR = Math.max(nextR - expandThreshold + 1, 1);
14568
+ } else if (position === "bottom") {
14569
+ const prevLineNode = trNode.previousElementSibling;
14570
+ prevL = parseInt(prevLineNode.children[0].innerText) + 1;
14571
+ nextL = prevL + expandThreshold - 1;
14572
+ prevR = parseInt(prevLineNode.children[2].innerText) + 1;
14573
+ nextR = prevR + expandThreshold - 1;
14574
+ } else {
14575
+ const prevLineNode = trNode.previousElementSibling;
14576
+ const nextLineNode = trNode.nextElementSibling;
14577
+ const prevLineNumber = parseInt(prevLineNode.children[0].innerText);
14578
+ const nextLineNumber = parseInt(nextLineNode.children[0].innerText);
14579
+ prevL = prevLineNumber + 1;
14580
+ prevR = parseInt(prevLineNode.children[2].innerText) + 1;
14581
+ nextL = nextLineNumber - 1;
14582
+ nextR = parseInt(nextLineNode.children[2].innerText) - 1;
14583
+ const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold;
14584
+ if (isExpandAll && updateExpandButton) {
14585
+ updateExpandUpDownButton(trNode);
14586
+ }
14587
+ }
14588
+ setLineNumberInDataset(trNode, prevL, prevR, nextL, nextR);
14589
+ }
14590
+ function updateLineNumberInDataset(trNode, expandThreshold, position, updateExpandButton = false) {
14591
+ let nextL;
14592
+ let prevL;
14593
+ let nextR;
14594
+ let prevR;
14595
+ if (position === "top") {
14596
+ const nextLineNode = trNode.nextElementSibling;
14597
+ nextL = parseInt(nextLineNode.children[0].children[0].innerText) - 1;
14598
+ prevL = Math.max(nextL - expandThreshold + 1, 1);
14599
+ nextR = parseInt(nextLineNode.children[0].children[1].innerText) - 1;
14600
+ prevR = Math.max(nextR - expandThreshold + 1, 1);
14601
+ } else if (position === "bottom") {
14602
+ const prevLineNode = trNode.previousElementSibling;
14603
+ prevL = parseInt(prevLineNode.children[0].children[0].innerText) + 1;
14604
+ nextL = prevL + expandThreshold - 1;
14605
+ prevR = parseInt(prevLineNode.children[0].children[1].innerText) + 1;
14606
+ nextR = prevR + expandThreshold - 1;
14607
+ } else {
14608
+ const prevLineNode = trNode.previousElementSibling;
14609
+ const nextLineNode = trNode.nextElementSibling;
14610
+ const prevLineNumber = parseInt(prevLineNode.children[0].children[0].innerText);
14611
+ const nextLineNumber = parseInt(nextLineNode.children[0].children[0].innerText);
14612
+ prevL = prevLineNumber + 1;
14613
+ prevR = parseInt(prevLineNode.children[0].children[1].innerText) + 1;
14614
+ nextL = nextLineNumber - 1;
14615
+ nextR = parseInt(nextLineNode.children[0].children[1].innerText) - 1;
14616
+ const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold;
14617
+ if (isExpandAll && updateExpandButton) {
14618
+ updateExpandUpDownButton(trNode);
14619
+ }
14620
+ }
14621
+ setLineNumberInDataset(trNode, prevL, prevR, nextL, nextR);
14622
+ }
14623
+ function getLineNumberFromDataset(expandDom, expandThreshold) {
14624
+ var _a, _b, _c;
14625
+ const attrsMap = (_b = (_a = expandDom.parentElement) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.dataset;
14626
+ const prevL = Number(attrsMap == null ? void 0 : attrsMap.prevL);
14627
+ const nextL = Number(attrsMap == null ? void 0 : attrsMap.nextL);
14628
+ const prevR = Number(attrsMap == null ? void 0 : attrsMap.prevR);
14629
+ const nextR = Number(attrsMap == null ? void 0 : attrsMap.nextR);
14630
+ let leftLineStart, leftLineEnd, rightLineStart, rightLineEnd;
14631
+ if (prevL && nextL && prevR && nextR) {
14632
+ const buttonClasses = Array.from(expandDom.classList);
14633
+ const direction = (_c = buttonClasses.find((item) => item.endsWith("expand"))) == null ? void 0 : _c.split("-")[0];
14634
+ if (direction === "up") {
14635
+ leftLineEnd = nextL;
14636
+ leftLineStart = Math.max(leftLineEnd - expandThreshold + 1, prevL);
14637
+ rightLineEnd = nextR;
14638
+ rightLineStart = Math.max(rightLineEnd - expandThreshold + 1, prevR);
14639
+ } else if (direction === "down") {
14640
+ leftLineStart = prevL;
14641
+ leftLineEnd = Math.min(leftLineStart + expandThreshold - 1, nextL);
14642
+ rightLineStart = prevR;
14643
+ rightLineEnd = Math.min(rightLineStart + expandThreshold - 1, nextR);
14644
+ } else {
14645
+ leftLineStart = prevL;
14646
+ leftLineEnd = nextL;
14647
+ rightLineStart = prevR;
14648
+ rightLineEnd = nextR;
14649
+ }
14650
+ }
14651
+ return [leftLineStart, leftLineEnd, rightLineStart, rightLineEnd];
14652
+ }
14333
14653
  function insertNode(parent, child) {
14334
14654
  if (parent.firstChild) {
14335
14655
  parent.insertBefore(child, parent.firstChild);
@@ -14364,7 +14684,7 @@ function attachExpandUpDownButton(parentNode, direction) {
14364
14684
  addExpandButton(parentNode, expandDirectionMap[direction], (_a = expandDirectionIconMap[direction]) == null ? void 0 : _a.call(expandDirectionIconMap));
14365
14685
  }
14366
14686
  }
14367
- function addCommentToPage(lineHost, commentDom, lineSide) {
14687
+ function addCommentToPageForSingleColumn(lineHost, commentDom, lineSide) {
14368
14688
  var _a, _b;
14369
14689
  const newLine = document.createElement("tr");
14370
14690
  const newCell = document.createElement("td");
@@ -14381,41 +14701,145 @@ function addCommentToPage(lineHost, commentDom, lineSide) {
14381
14701
  (_b = lineHost.parentElement) == null ? void 0 : _b.appendChild(newLine);
14382
14702
  }
14383
14703
  }
14384
- function useCodeReviewExpand(reviewContentRef, expandAllThreshold, outputFormat) {
14704
+ function addCommentToPageForDoubleColumn(lineHost, commentDom, lineSide) {
14705
+ var _a, _b, _c;
14706
+ const nextSibling = lineHost.nextElementSibling;
14707
+ if (nextSibling && ((_a = nextSibling.classList) == null ? void 0 : _a.contains("comment-block"))) {
14708
+ const insertTdDom = lineSide === "left" ? nextSibling.children[0] : nextSibling.children[1];
14709
+ insertTdDom.classList.add("comment-cell");
14710
+ insertTdDom.appendChild(commentDom);
14711
+ } else {
14712
+ const newLine = document.createElement("tr");
14713
+ const newLeftCell = document.createElement("td");
14714
+ const newRightCell = document.createElement("td");
14715
+ newLeftCell.style.width = "50%";
14716
+ newLeftCell.setAttribute("colspan", "2");
14717
+ newRightCell.style.width = "50%";
14718
+ newRightCell.setAttribute("colspan", "2");
14719
+ if (lineSide === "left") {
14720
+ newLeftCell.classList.add("comment-cell");
14721
+ newLeftCell.appendChild(commentDom);
14722
+ } else {
14723
+ newRightCell.classList.add("comment-cell");
14724
+ newRightCell.appendChild(commentDom);
14725
+ }
14726
+ newLine.classList.add("comment-block");
14727
+ newLine.classList.add(lineSide);
14728
+ newLine.appendChild(newLeftCell);
14729
+ newLine.appendChild(newRightCell);
14730
+ if (lineHost.nextElementSibling) {
14731
+ (_b = lineHost.parentElement) == null ? void 0 : _b.insertBefore(newLine, lineHost.nextElementSibling);
14732
+ } else {
14733
+ (_c = lineHost.parentElement) == null ? void 0 : _c.appendChild(newLine);
14734
+ }
14735
+ }
14736
+ }
14737
+ function findReferenceDomForSingleColumn(parentNode, lineNumber, lineSide) {
14738
+ var _a, _b, _c, _d;
14739
+ const trNodes = Array.from(parentNode.querySelectorAll("tr"));
14740
+ for (const index2 in trNodes) {
14741
+ const lineIndex = parseInt(index2);
14742
+ const lineNumberBox = Array.from(trNodes[lineIndex].children)[0];
14743
+ if (notEmptyNode(lineNumberBox)) {
14744
+ const oldLineNumber = parseInt((_b = (_a = lineNumberBox.children[0]) == null ? void 0 : _a.innerText) != null ? _b : -1);
14745
+ const newLineNumber = parseInt((_d = (_c = lineNumberBox.children[1]) == null ? void 0 : _c.innerText) != null ? _d : -1);
14746
+ if (lineSide === "left" && oldLineNumber === lineNumber || lineSide === "right" && newLineNumber === lineNumber) {
14747
+ return trNodes[lineIndex];
14748
+ }
14749
+ }
14750
+ }
14751
+ }
14752
+ function findReferenceDomForDoubleColumn(parentNode, lineNumber, lineSide) {
14753
+ const trNodes = Array.from(parentNode.querySelectorAll("tr"));
14754
+ for (const index2 in trNodes) {
14755
+ const lineIndex = parseInt(index2);
14756
+ let lineNumberBox;
14757
+ if (lineSide === "left") {
14758
+ lineNumberBox = trNodes[lineIndex].children[0];
14759
+ } else {
14760
+ lineNumberBox = trNodes[lineIndex].children[2];
14761
+ }
14762
+ if (lineNumberBox && notEmptyNode(lineNumberBox)) {
14763
+ const currentLineNumber = parseInt(lineNumberBox.innerText);
14764
+ if (currentLineNumber === lineNumber) {
14765
+ return trNodes[lineIndex];
14766
+ }
14767
+ }
14768
+ }
14769
+ }
14770
+ function useCodeReviewExpand(reviewContentRef, props) {
14771
+ const { outputFormat, expandThreshold, expandLoader } = toRefs(props);
14385
14772
  const processSideBySide = () => {
14386
- const [leftTable, rightTable] = reviewContentRef.value.querySelectorAll("table");
14387
- const trNodes = Array.from(leftTable.querySelectorAll("tr"));
14773
+ var _a;
14774
+ const trNodes = Array.from(reviewContentRef.value.querySelectorAll("tr"));
14388
14775
  const totalLines = trNodes.length;
14389
14776
  for (const index2 in trNodes) {
14390
14777
  const lineIndex = parseInt(index2);
14391
14778
  const lineChildren = Array.from(trNodes[lineIndex].children);
14392
14779
  const lineNumberBox = lineChildren[0];
14393
14780
  const lineContentBox = lineChildren[1];
14394
- const lineClassList = lineContentBox.classList.value;
14395
- const lineContent = lineContentBox.innerText.trim();
14396
- if (lineContent.match(ExpandLineReg) && !FirstLineReg.test(lineContent) && lineClassList && lineClassList.includes("d2h-info")) {
14781
+ const lineContent = lineContentBox.innerText;
14782
+ const lineClassList = lineContentBox.classList;
14783
+ if (lineContent.match(ExpandLineReg) && !FirstLineReg.test(lineContent) && lineClassList && lineClassList.contains("d2h-info")) {
14397
14784
  const nextLineIndex = lineIndex + 1;
14398
14785
  const prevLineIndex = lineIndex - 1;
14399
14786
  if (lineIndex === 0 && nextLineIndex in trNodes) {
14787
+ updateLineNumberInDatasetForDoubleColumn(trNodes[lineIndex], expandThreshold.value, "top");
14400
14788
  attachExpandUpDownButton(lineNumberBox, "up");
14401
14789
  } else if (lineIndex > 0 && lineIndex < totalLines - 1 && nextLineIndex in trNodes && prevLineIndex in trNodes) {
14402
- const preLineChildren = Array.from(trNodes[prevLineIndex].children);
14403
- const nextLineChildren = Array.from(trNodes[nextLineIndex].children);
14404
- const isExpandAll = parseInt(nextLineChildren[0].innerText) - parseInt(preLineChildren[0].innerText) - 1 < expandAllThreshold;
14790
+ const preLineNumber = parseInt(trNodes[prevLineIndex].children[0].innerText);
14791
+ const nextLineNumber = parseInt(trNodes[nextLineIndex].children[0].innerText);
14792
+ const isExpandAll = nextLineNumber - preLineNumber - 1 < expandThreshold.value;
14793
+ updateLineNumberInDatasetForDoubleColumn(trNodes[lineIndex], expandThreshold.value, "middle");
14405
14794
  attachExpandUpDownButton(lineNumberBox, isExpandAll ? "all" : "updown");
14406
14795
  }
14407
14796
  }
14408
14797
  }
14409
- const endLine = trNodes[0].cloneNode(true);
14410
- if (Object.prototype.hasOwnProperty.call(endLine.children[0].children, 0)) {
14411
- endLine.children[0].removeChild(endLine.children[0].children[0]);
14798
+ const loadMoreLine = trNodes[0].cloneNode(true);
14799
+ loadMoreLine.children[0].removeChild(loadMoreLine.children[0].children[0]);
14800
+ loadMoreLine.children[1].innerText = "";
14801
+ (_a = trNodes[0].parentElement) == null ? void 0 : _a.appendChild(loadMoreLine);
14802
+ updateLineNumberInDatasetForDoubleColumn(loadMoreLine, expandThreshold.value, "bottom");
14803
+ attachExpandUpDownButton(loadMoreLine.children[0], "down");
14804
+ };
14805
+ const insertIncrementCodeForDoubleColumn = (code, direction, referenceDom) => {
14806
+ if (!referenceDom) {
14807
+ return;
14808
+ }
14809
+ if (!code) {
14810
+ return referenceDom == null ? void 0 : referenceDom.remove();
14811
+ }
14812
+ const prefix = "--- updated_at Jan 1, 2019, 0:0:0 AM\n+++ updated_at Jan 1, 2019, 0:0:0 AM\n";
14813
+ const container = document.createElement("div");
14814
+ parseDiffCode(container, prefix + code, outputFormat.value);
14815
+ const trNodes = Array.from(container.querySelectorAll("tr"));
14816
+ const expandLine = trNodes.find((element) => {
14817
+ var _a;
14818
+ return (_a = element.children[1]) == null ? void 0 : _a.innerText.trim().match(ExpandLineReg);
14819
+ });
14820
+ if (!expandLine) {
14821
+ return;
14822
+ }
14823
+ const trNodesToBeInserted = trNodes.filter((element) => element !== expandLine);
14824
+ insertIncrementLineToPage(referenceDom, trNodesToBeInserted, direction);
14825
+ const removedExpandLine = ifRemoveExpandLineForDoubleColumn(referenceDom, expandLine, direction);
14826
+ if (removedExpandLine) {
14827
+ return;
14828
+ }
14829
+ updateExpandLineCount(referenceDom, expandLine);
14830
+ if (direction === "up") {
14831
+ if (!referenceDom.previousElementSibling) {
14832
+ updateLineNumberInDatasetForDoubleColumn(referenceDom, expandThreshold.value, "top");
14833
+ } else {
14834
+ updateLineNumberInDatasetForDoubleColumn(referenceDom, expandThreshold.value, "middle", true);
14835
+ }
14836
+ } else {
14837
+ if (referenceDom.nextElementSibling) {
14838
+ updateLineNumberInDatasetForDoubleColumn(referenceDom, expandThreshold.value, "middle", true);
14839
+ } else {
14840
+ updateLineNumberInDatasetForDoubleColumn(referenceDom, expandThreshold.value, "bottom");
14841
+ }
14412
14842
  }
14413
- endLine.children[1].innerText = "";
14414
- const leftEndLine = endLine.cloneNode(true);
14415
- const rightEndLint = endLine.cloneNode(true);
14416
- attachExpandUpDownButton(leftEndLine.children[0], "down");
14417
- leftTable.tBodies[0].appendChild(leftEndLine);
14418
- rightTable.tBodies[0].appendChild(rightEndLint);
14419
14843
  };
14420
14844
  const processLineByLine = () => {
14421
14845
  var _a;
@@ -14435,13 +14859,15 @@ function useCodeReviewExpand(reviewContentRef, expandAllThreshold, outputFormat)
14435
14859
  const nextLineIndex = lineIndex + 1;
14436
14860
  const prevLineIndex = lineIndex - 1;
14437
14861
  if (lineIndex === 0 && nextLineIndex in trNodes) {
14862
+ updateLineNumberInDataset(trNodes[lineIndex], expandThreshold.value, "top");
14438
14863
  attachExpandUpDownButton(lineNumberBox, "up");
14439
14864
  } else if (lineIndex > 0 && lineIndex < totalLines - 1 && nextLineIndex in trNodes && prevLineIndex in trNodes) {
14440
14865
  const prevTdNodes = Array.from(trNodes[prevLineIndex].children);
14441
14866
  const prevLineNumber = parseInt(prevTdNodes[0].children[0].innerText);
14442
14867
  const nextTdNodes = Array.from(trNodes[nextLineIndex].children);
14443
14868
  const nextLineNumber = parseInt(nextTdNodes[0].children[0].innerText);
14444
- const isExpandAll = nextLineNumber - prevLineNumber - 1 < expandAllThreshold;
14869
+ updateLineNumberInDataset(trNodes[lineIndex], expandThreshold.value, "middle");
14870
+ const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold.value;
14445
14871
  attachExpandUpDownButton(lineNumberBox, isExpandAll ? "all" : "updown");
14446
14872
  }
14447
14873
  }
@@ -14449,35 +14875,98 @@ function useCodeReviewExpand(reviewContentRef, expandAllThreshold, outputFormat)
14449
14875
  const loadMoreLine = trNodes[0].cloneNode(true);
14450
14876
  loadMoreLine.children[0].removeChild(loadMoreLine.children[0].children[0]);
14451
14877
  loadMoreLine.children[1].innerText = "";
14452
- loadMoreLine.children[1].style.height = "20px";
14453
- const lastTrNode = trNodes[totalLines - 1].children;
14454
- const leftLineStart = parseInt(lastTrNode[0].children[0].innerText) + 1;
14455
- const rightLineStart = parseInt(lastTrNode[0].children[1].innerText) + 1;
14456
- if (leftLineStart && rightLineStart) {
14457
- attachExpandUpDownButton(loadMoreLine.children[0], "down");
14458
- }
14459
14878
  (_a = trNodes[0].parentElement) == null ? void 0 : _a.appendChild(loadMoreLine);
14879
+ updateLineNumberInDataset(loadMoreLine, expandThreshold.value, "bottom");
14880
+ attachExpandUpDownButton(loadMoreLine.children[0], "down");
14881
+ };
14882
+ const insertIncrementCode = (code, direction, referenceDom) => {
14883
+ if (!referenceDom) {
14884
+ return;
14885
+ }
14886
+ if (!code) {
14887
+ return referenceDom == null ? void 0 : referenceDom.remove();
14888
+ }
14889
+ const prefix = "--- updated_at Jan 1, 2019, 0:0:0 AM\n+++ updated_at Jan 1, 2019, 0:0:0 AM\n";
14890
+ const container = document.createElement("div");
14891
+ parseDiffCode(container, prefix + code, outputFormat.value);
14892
+ const trNodes = Array.from(container.querySelectorAll("tr"));
14893
+ const expandLine = trNodes.find((element) => {
14894
+ var _a;
14895
+ return (_a = element.children[1]) == null ? void 0 : _a.innerText.trim().match(ExpandLineReg);
14896
+ });
14897
+ if (!expandLine) {
14898
+ return;
14899
+ }
14900
+ const trNodesToBeInserted = trNodes.filter((element) => element.children[0].children.length === 2);
14901
+ insertIncrementLineToPage(referenceDom, trNodesToBeInserted, direction);
14902
+ const removedExpandLine = ifRemoveExpandLine(referenceDom, expandLine, direction);
14903
+ if (removedExpandLine) {
14904
+ return;
14905
+ }
14906
+ updateExpandLineCount(referenceDom, expandLine);
14907
+ if (direction === "up") {
14908
+ if (!referenceDom.previousElementSibling) {
14909
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "top");
14910
+ } else {
14911
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "middle", true);
14912
+ }
14913
+ } else {
14914
+ if (referenceDom.nextElementSibling) {
14915
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "middle", true);
14916
+ } else {
14917
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "bottom");
14918
+ }
14919
+ }
14920
+ };
14921
+ const onExpandButtonClick = (e) => {
14922
+ var _a, _b;
14923
+ const composedPath = e.composedPath();
14924
+ const expandIconDom = composedPath.find((element) => {
14925
+ var _a2;
14926
+ return (_a2 = element.classList) == null ? void 0 : _a2.contains("expand-icon");
14927
+ });
14928
+ if (expandIconDom) {
14929
+ const expandDirection = (_a = Array.from(expandIconDom.classList).find((item) => item.endsWith("expand"))) == null ? void 0 : _a.split("-")[0];
14930
+ const direction = expandDirection === "up" || expandDirection === "all" ? "up" : "down";
14931
+ const [leftLineStart, leftLineEnd, rightLineStart, rightLineEnd] = getLineNumberFromDataset(expandIconDom, expandThreshold.value);
14932
+ (_b = expandLoader == null ? void 0 : expandLoader.value) == null ? void 0 : _b.call(expandLoader, [leftLineStart, leftLineEnd, rightLineStart, rightLineEnd], (code) => {
14933
+ var _a2, _b2;
14934
+ outputFormat.value === "line-by-line" ? insertIncrementCode(code, direction, (_a2 = expandIconDom.parentElement) == null ? void 0 : _a2.parentElement) : insertIncrementCodeForDoubleColumn(code, direction, (_b2 = expandIconDom.parentElement) == null ? void 0 : _b2.parentElement);
14935
+ });
14936
+ }
14460
14937
  };
14461
14938
  const insertExpandButton = () => {
14462
- outputFormat === "side-by-side" ? processSideBySide() : processLineByLine();
14939
+ outputFormat.value === "side-by-side" ? processSideBySide() : processLineByLine();
14463
14940
  };
14464
- return { insertExpandButton };
14941
+ return { insertExpandButton, onExpandButtonClick };
14465
14942
  }
14466
14943
  function useCodeReview(props, ctx2) {
14467
- const { diff, fold, outputFormat, expandAllThreshold } = toRefs(props);
14944
+ const { diff, outputFormat, allowExpand, showBlob } = toRefs(props);
14468
14945
  const renderHtml = ref("");
14469
- const isFold = ref(fold.value);
14470
14946
  const reviewContentRef = ref();
14471
- const diffFile = Diff2Html.parse(diff.value);
14472
- const { insertExpandButton } = useCodeReviewExpand(reviewContentRef, expandAllThreshold.value, outputFormat.value);
14947
+ const diffFile = ref([]);
14948
+ const { insertExpandButton, onExpandButtonClick } = useCodeReviewExpand(reviewContentRef, props);
14473
14949
  const initDiffContent = () => {
14474
- renderHtml.value = Diff2Html.html(diffFile, {
14475
- drawFileList: false,
14476
- matching: "lines",
14477
- outputFormat: outputFormat.value
14950
+ diffFile.value = Diff2Html.parse(diff.value);
14951
+ nextTick(() => {
14952
+ if (inBrowser && !showBlob.value) {
14953
+ parseDiffCode(reviewContentRef.value, diff.value, outputFormat.value);
14954
+ allowExpand.value && insertExpandButton();
14955
+ ctx2.emit("contentRefresh", JSON.parse(JSON.stringify(diffFile.value)));
14956
+ }
14478
14957
  });
14479
- nextTick(insertExpandButton);
14480
14958
  };
14959
+ const onContentClick = (e) => {
14960
+ onExpandButtonClick(e);
14961
+ };
14962
+ watch(showBlob, initDiffContent);
14963
+ watch(outputFormat, initDiffContent);
14964
+ watch(diff, initDiffContent, { immediate: true });
14965
+ return { renderHtml, reviewContentRef, diffFile, onContentClick };
14966
+ }
14967
+ function useCodeReviewFold(props, ctx2) {
14968
+ const { fold } = toRefs(props);
14969
+ const isFold = ref(fold.value);
14481
14970
  const toggleFold = (status2) => {
14482
14971
  if (status2 !== void 0) {
14483
14972
  isFold.value = status2;
@@ -14489,48 +14978,85 @@ function useCodeReview(props, ctx2) {
14489
14978
  isFold.value = val;
14490
14979
  });
14491
14980
  watch(isFold, () => {
14492
- if (!isFold.value && renderHtml.value === "") {
14493
- initDiffContent();
14494
- }
14495
14981
  ctx2.emit("foldChange", isFold.value);
14496
14982
  });
14497
- onBeforeMount(() => {
14498
- if (!isFold.value) {
14499
- initDiffContent();
14500
- }
14501
- });
14502
- provide(CodeReviewInjectionKey, { reviewContentRef, diffInfo: diffFile[0], isFold, rootCtx: ctx2 });
14503
- return { renderHtml, isFold, reviewContentRef, toggleFold };
14983
+ return { isFold, toggleFold };
14504
14984
  }
14505
- function useCodeReviewComment(reviewContentRef, ctx2) {
14506
- const ns2 = useNamespace("code-review");
14985
+ function useCodeReviewComment(reviewContentRef, props, ctx2) {
14986
+ const { outputFormat, allowComment } = toRefs(props);
14987
+ const ns2 = useNamespace$1("code-review");
14507
14988
  const commentLeft = ref(-100);
14508
14989
  const commentTop = ref(-100);
14509
14990
  let currentLeftLineNumber = -1;
14510
14991
  let currentRightLineNumber = -1;
14992
+ let lastLineNumberContainer;
14511
14993
  const resetLeftTop = () => {
14512
14994
  commentLeft.value = -100;
14513
14995
  commentTop.value = -100;
14514
14996
  currentLeftLineNumber = -1;
14515
14997
  currentRightLineNumber = -1;
14516
- };
14517
- const onMouseEnter = (e) => {
14518
- e.currentTarget.getBoundingClientRect();
14998
+ lastLineNumberContainer == null ? void 0 : lastLineNumberContainer.classList.remove("comment-icon-hover");
14999
+ lastLineNumberContainer = null;
14519
15000
  };
14520
15001
  const onMouseMove = (e) => {
14521
15002
  var _a, _b;
14522
15003
  const composedPath = e.composedPath();
14523
15004
  const trNode = composedPath.find((item) => item.tagName === "TR");
14524
15005
  if (trNode) {
14525
- const lineNumberContainer = Array.from(trNode.children)[0];
14526
- if (notEmptyNode(lineNumberContainer)) {
14527
- const { top, left } = lineNumberContainer.getBoundingClientRect();
14528
- commentLeft.value = left;
14529
- commentTop.value = top;
14530
- currentLeftLineNumber = parseInt((_a = lineNumberContainer.children[0]) == null ? void 0 : _a.innerText) || -1;
14531
- currentRightLineNumber = parseInt((_b = lineNumberContainer.children[1]) == null ? void 0 : _b.innerText) || -1;
15006
+ if (outputFormat.value === "line-by-line") {
15007
+ const lineNumberContainer = Array.from(trNode.children)[0];
15008
+ if (lastLineNumberContainer !== lineNumberContainer) {
15009
+ lastLineNumberContainer == null ? void 0 : lastLineNumberContainer.classList.remove("comment-icon-hover");
15010
+ }
15011
+ if (notEmptyNode(lineNumberContainer)) {
15012
+ lastLineNumberContainer = lineNumberContainer;
15013
+ lineNumberContainer.classList.add("comment-icon-hover");
15014
+ const { top, left } = lineNumberContainer.getBoundingClientRect();
15015
+ commentLeft.value = left;
15016
+ commentTop.value = top;
15017
+ currentLeftLineNumber = parseInt((_a = lineNumberContainer.children[0]) == null ? void 0 : _a.innerText) || -1;
15018
+ currentRightLineNumber = parseInt((_b = lineNumberContainer.children[1]) == null ? void 0 : _b.innerText) || -1;
15019
+ } else {
15020
+ resetLeftTop();
15021
+ }
14532
15022
  } else {
14533
- resetLeftTop();
15023
+ if (trNode.classList.contains("comment-block")) {
15024
+ return resetLeftTop();
15025
+ }
15026
+ const tdNode = composedPath.find((item) => item.tagName === "TD");
15027
+ const tdIndex = Array.from(trNode.children).findIndex((item) => item === tdNode);
15028
+ const tdNodes = Array.from(trNode.children);
15029
+ const leftLineNumberContainer = tdNodes[0];
15030
+ const rightLineNumberContainer = tdNodes[2];
15031
+ if (tdIndex < 2) {
15032
+ if (lastLineNumberContainer !== leftLineNumberContainer) {
15033
+ lastLineNumberContainer == null ? void 0 : lastLineNumberContainer.classList.remove("comment-icon-hover");
15034
+ }
15035
+ if (notEmptyNode(leftLineNumberContainer)) {
15036
+ lastLineNumberContainer = leftLineNumberContainer;
15037
+ leftLineNumberContainer.classList.add("comment-icon-hover");
15038
+ const { top, left } = leftLineNumberContainer.getBoundingClientRect();
15039
+ commentLeft.value = left;
15040
+ commentTop.value = top;
15041
+ currentLeftLineNumber = parseInt(leftLineNumberContainer.innerText);
15042
+ } else {
15043
+ resetLeftTop();
15044
+ }
15045
+ } else {
15046
+ if (lastLineNumberContainer !== rightLineNumberContainer) {
15047
+ lastLineNumberContainer == null ? void 0 : lastLineNumberContainer.classList.remove("comment-icon-hover");
15048
+ }
15049
+ if (rightLineNumberContainer && notEmptyNode(rightLineNumberContainer)) {
15050
+ lastLineNumberContainer = rightLineNumberContainer;
15051
+ rightLineNumberContainer.classList.add("comment-icon-hover");
15052
+ const { top, left } = rightLineNumberContainer.getBoundingClientRect();
15053
+ commentLeft.value = left;
15054
+ commentTop.value = top;
15055
+ currentRightLineNumber = parseInt(rightLineNumberContainer.innerText);
15056
+ } else {
15057
+ resetLeftTop();
15058
+ }
15059
+ }
14534
15060
  }
14535
15061
  }
14536
15062
  };
@@ -14546,46 +15072,68 @@ function useCodeReviewComment(reviewContentRef, ctx2) {
14546
15072
  resetLeftTop();
14547
15073
  }
14548
15074
  };
14549
- const onCommentIconClick = () => {
14550
- ctx2.emit("addComment", { left: currentLeftLineNumber, right: currentRightLineNumber });
14551
- };
14552
- const findReferenceDom = (lineNumber, lineSide) => {
14553
- var _a, _b, _c, _d;
14554
- const trNodes = Array.from(reviewContentRef.value.querySelectorAll("tr"));
14555
- for (const index2 in trNodes) {
14556
- const lineIndex = parseInt(index2);
14557
- const lineNumberBox = Array.from(trNodes[lineIndex].children)[0];
14558
- if (notEmptyNode(lineNumberBox)) {
14559
- const oldLineNumber = parseInt((_b = (_a = lineNumberBox.children[0]) == null ? void 0 : _a.innerText) != null ? _b : -1);
14560
- const newLineNumber = parseInt((_d = (_c = lineNumberBox.children[1]) == null ? void 0 : _c.innerText) != null ? _d : -1);
14561
- if (lineSide === "left" && oldLineNumber === lineNumber || lineSide === "right" && newLineNumber === lineNumber) {
14562
- return trNodes[lineIndex];
14563
- }
15075
+ const onCommentIconClick = (e) => {
15076
+ if (e) {
15077
+ const composedPath = e.composedPath();
15078
+ const lineNumberBox = composedPath.find((item) => {
15079
+ var _a, _b;
15080
+ return ((_a = item.classList) == null ? void 0 : _a.contains("comment-icon-hover")) || ((_b = item.classList) == null ? void 0 : _b.contains("comment-icon"));
15081
+ });
15082
+ if (!lineNumberBox) {
15083
+ return;
14564
15084
  }
14565
15085
  }
15086
+ if (outputFormat.value === "line-by-line")
15087
+ ;
15088
+ ctx2.emit("addComment", { left: currentLeftLineNumber, right: currentRightLineNumber });
14566
15089
  };
14567
15090
  const insertComment = (lineNumber, lineSide, commentDom) => {
14568
- const lineHost = findReferenceDom(lineNumber, lineSide);
14569
- lineHost && addCommentToPage(lineHost, commentDom, lineSide);
15091
+ if (outputFormat.value === "line-by-line") {
15092
+ const lineHost = findReferenceDomForSingleColumn(reviewContentRef.value, lineNumber, lineSide);
15093
+ lineHost && addCommentToPageForSingleColumn(lineHost, commentDom, lineSide);
15094
+ } else {
15095
+ const lineHost = findReferenceDomForDoubleColumn(reviewContentRef.value, lineNumber, lineSide);
15096
+ lineHost && addCommentToPageForDoubleColumn(lineHost, commentDom, lineSide);
15097
+ }
14570
15098
  };
14571
15099
  const removeComment = (lineNumber, lineSide) => {
14572
- const lineHost = findReferenceDom(lineNumber, lineSide);
14573
- let nextLineHost = lineHost == null ? void 0 : lineHost.nextElementSibling;
14574
- while (nextLineHost) {
14575
- const classList = nextLineHost == null ? void 0 : nextLineHost.classList;
14576
- if ((classList == null ? void 0 : classList.contains("comment-block")) && classList.contains(lineSide)) {
14577
- nextLineHost.remove();
14578
- return;
15100
+ if (outputFormat.value === "line-by-line") {
15101
+ const lineHost = findReferenceDomForSingleColumn(reviewContentRef.value, lineNumber, lineSide);
15102
+ let nextLineHost = lineHost == null ? void 0 : lineHost.nextElementSibling;
15103
+ while (nextLineHost) {
15104
+ const classList = nextLineHost == null ? void 0 : nextLineHost.classList;
15105
+ if ((classList == null ? void 0 : classList.contains("comment-block")) && classList.contains(lineSide)) {
15106
+ nextLineHost.remove();
15107
+ return;
15108
+ }
15109
+ nextLineHost = nextLineHost.nextElementSibling;
15110
+ }
15111
+ } else {
15112
+ const lineHost = findReferenceDomForDoubleColumn(reviewContentRef.value, lineNumber, lineSide);
15113
+ const nextLineHost = lineHost == null ? void 0 : lineHost.nextElementSibling;
15114
+ if (nextLineHost && nextLineHost.classList.contains("comment-block")) {
15115
+ const leftChildren = nextLineHost.children[0];
15116
+ const rightChildren = nextLineHost.children[1];
15117
+ if (lineSide === "left") {
15118
+ leftChildren.children[0].remove();
15119
+ } else {
15120
+ rightChildren.children[0].remove();
15121
+ }
15122
+ if (!leftChildren.children.length && !rightChildren.children.length) {
15123
+ nextLineHost.remove();
15124
+ }
14579
15125
  }
14580
- nextLineHost = nextLineHost.nextElementSibling;
14581
15126
  }
14582
15127
  };
15128
+ const mouseEvent = allowComment.value ? { onMousemove: onMouseMove, onMouseleave } : {};
15129
+ window.addEventListener("scroll", resetLeftTop);
15130
+ onUnmounted(() => {
15131
+ window.removeEventListener("scroll", resetLeftTop);
15132
+ });
14583
15133
  return {
14584
15134
  commentLeft,
14585
15135
  commentTop,
14586
- onMouseEnter,
14587
- onMouseMove,
14588
- onMouseleave,
15136
+ mouseEvent,
14589
15137
  onCommentMouseLeave,
14590
15138
  onCommentIconClick,
14591
15139
  insertComment,
@@ -14596,26 +15144,28 @@ var codeReview = "";
14596
15144
  var CodeReview = defineComponent({
14597
15145
  name: "DCodeReview",
14598
15146
  props: codeReviewProps,
14599
- emits: ["foldChange", "addComment", "afterViewInit"],
15147
+ emits: ["foldChange", "addComment", "afterViewInit", "contentRefresh"],
14600
15148
  setup(props, ctx2) {
14601
- const ns2 = useNamespace("code-review");
15149
+ const ns2 = useNamespace$1("code-review");
14602
15150
  const {
14603
15151
  renderHtml,
14604
- isFold,
14605
15152
  reviewContentRef,
14606
- toggleFold
15153
+ diffFile,
15154
+ onContentClick
14607
15155
  } = useCodeReview(props, ctx2);
15156
+ const {
15157
+ isFold,
15158
+ toggleFold
15159
+ } = useCodeReviewFold(props, ctx2);
14608
15160
  const {
14609
15161
  commentLeft,
14610
15162
  commentTop,
14611
- onMouseEnter,
14612
- onMouseMove,
14613
- onMouseleave,
15163
+ mouseEvent,
14614
15164
  onCommentMouseLeave,
14615
15165
  onCommentIconClick,
14616
15166
  insertComment,
14617
15167
  removeComment
14618
- } = useCodeReviewComment(reviewContentRef, ctx2);
15168
+ } = useCodeReviewComment(reviewContentRef, props, ctx2);
14619
15169
  onMounted(() => {
14620
15170
  ctx2.emit("afterViewInit", {
14621
15171
  toggleFold,
@@ -14623,28 +15173,36 @@ var CodeReview = defineComponent({
14623
15173
  removeComment
14624
15174
  });
14625
15175
  });
14626
- return () => createVNode("div", {
14627
- "class": ns2.b()
14628
- }, [createVNode(CodeReviewHeader, {
14629
- "onClick": () => isFold.value = !isFold.value
14630
- }, null), createVNode("div", {
14631
- "class": [ns2.e("content"), {
14632
- "hide-content": isFold.value
14633
- }],
14634
- "innerHTML": renderHtml.value,
14635
- "ref": reviewContentRef,
14636
- "onMouseenter": onMouseEnter,
14637
- "onMousemove": onMouseMove,
14638
- "onMouseleave": onMouseleave
14639
- }, null), createVNode("div", {
14640
- "class": "comment-icon",
14641
- "style": {
14642
- left: commentLeft.value + "px",
14643
- top: commentTop.value + "px"
14644
- },
14645
- "onClick": onCommentIconClick,
14646
- "onMouseleave": onCommentMouseLeave
14647
- }, [createVNode(CommentIcon, null, null)])]);
15176
+ provide(CodeReviewInjectionKey, {
15177
+ reviewContentRef,
15178
+ diffInfo: diffFile.value[0],
15179
+ isFold,
15180
+ rootCtx: ctx2
15181
+ });
15182
+ return () => {
15183
+ var _a, _b;
15184
+ return createVNode("div", {
15185
+ "class": ns2.b()
15186
+ }, [createVNode(CodeReviewHeader, {
15187
+ "onClick": () => isFold.value = !isFold.value
15188
+ }, null), withDirectives(createVNode("div", null, [props.showBlob ? (_b = (_a = ctx2.slots).blob) == null ? void 0 : _b.call(_a) : createVNode("div", mergeProps({
15189
+ "class": [ns2.e("content"), props.outputFormat],
15190
+ "innerHTML": renderHtml.value,
15191
+ "ref": reviewContentRef,
15192
+ "onClick": (e) => {
15193
+ onContentClick(e);
15194
+ onCommentIconClick(e);
15195
+ }
15196
+ }, mouseEvent), null)]), [[vShow, !isFold.value]]), props.allowComment && createVNode("div", {
15197
+ "class": "comment-icon",
15198
+ "style": {
15199
+ left: commentLeft.value + "px",
15200
+ top: commentTop.value + "px"
15201
+ },
15202
+ "onClick": onCommentIconClick,
15203
+ "onMouseleave": onCommentMouseLeave
15204
+ }, [createVNode(CommentIcon, null, null)])]);
15205
+ };
14648
15206
  }
14649
15207
  });
14650
15208
  var CodeReviewInstall = {
@@ -14747,7 +15305,6 @@ var CollapseItem = defineComponent({
14747
15305
  });
14748
15306
  const handlerTitleClick = (e) => {
14749
15307
  e.preventDefault();
14750
- e.stopPropagation();
14751
15308
  if (!props.disabled) {
14752
15309
  collapse2 == null ? void 0 : collapse2.collapseItemClick(props.name);
14753
15310
  }
@@ -14917,7 +15474,7 @@ const tabsProps = {
14917
15474
  default: "top"
14918
15475
  }
14919
15476
  };
14920
- const ns$g = useNamespace("tabs");
15477
+ const ns$g = useNamespace$1("tabs");
14921
15478
  function useTabNavRender(props, data) {
14922
15479
  const { cssClass, tabPosition, customWidth } = toRefs(props);
14923
15480
  const ulClasses = computed(() => ({
@@ -15045,7 +15602,7 @@ var TabNav = defineComponent({
15045
15602
  props: tabsProps,
15046
15603
  emits: ["active-tab-change", "tab-remove", "tab-add", "tab-change"],
15047
15604
  setup(props, ctx2) {
15048
- const ns2 = useNamespace("tabs");
15605
+ const ns2 = useNamespace$1("tabs");
15049
15606
  const tabsEle = shallowRef();
15050
15607
  const data = reactive({
15051
15608
  offsetLeft: 0,
@@ -15167,7 +15724,7 @@ var TabNav = defineComponent({
15167
15724
  };
15168
15725
  }
15169
15726
  });
15170
- const ns$f = useNamespace("tabs");
15727
+ const ns$f = useNamespace$1("tabs");
15171
15728
  function useTabsEvent(ctx2) {
15172
15729
  const onUpdateModelValue = (value) => {
15173
15730
  ctx2.emit("update:modelValue", value);
@@ -15274,7 +15831,7 @@ var Tab = defineComponent({
15274
15831
  slots
15275
15832
  }) {
15276
15833
  const tabs = inject("tabs");
15277
- const ns2 = useNamespace("tab");
15834
+ const ns2 = useNamespace$1("tab");
15278
15835
  const instance = getCurrentInstance();
15279
15836
  const tabContext = reactive({
15280
15837
  uid: instance == null ? void 0 : instance.uid,
@@ -19731,7 +20288,7 @@ var CalendarPanel = defineComponent({
19731
20288
  setup(props, ctx2) {
19732
20289
  const app = getCurrentInstance();
19733
20290
  const t = createI18nTranslate("DDatePickerPro", app);
19734
- const ns2 = useNamespace("date-picker-pro");
20291
+ const ns2 = useNamespace$1("date-picker-pro");
19735
20292
  const {
19736
20293
  yearScrollRef,
19737
20294
  monthScrollRef,
@@ -20180,7 +20737,7 @@ var TimeScroll = defineComponent({
20180
20737
  name: "DTimeScroll",
20181
20738
  props: timePickerProps,
20182
20739
  setup(props, ctx2) {
20183
- const ns2 = useNamespace("scroll-box");
20740
+ const ns2 = useNamespace$1("scroll-box");
20184
20741
  const {
20185
20742
  scrollBoxDom,
20186
20743
  scrollThumbDom,
@@ -20244,7 +20801,7 @@ var PopupLine = defineComponent({
20244
20801
  props: popupLineProps,
20245
20802
  emits: ["change"],
20246
20803
  setup(props, ctx2) {
20247
- const ns2 = useNamespace("time-list");
20804
+ const ns2 = useNamespace$1("time-list");
20248
20805
  const timeListDom = ref();
20249
20806
  const {
20250
20807
  getNewTime,
@@ -20387,7 +20944,7 @@ var TimerPickerPanel = defineComponent({
20387
20944
  setup(props, ctx2) {
20388
20945
  const app = getCurrentInstance();
20389
20946
  const t = createI18nTranslate("DDatePickerPro", app);
20390
- const ns2 = useNamespace("date-picker-pro");
20947
+ const ns2 = useNamespace$1("date-picker-pro");
20391
20948
  const {
20392
20949
  timeListDom,
20393
20950
  hourList,
@@ -20416,7 +20973,7 @@ var TimerPickerPanel = defineComponent({
20416
20973
  }
20417
20974
  });
20418
20975
  function useYearCalendarPanel(props, ctx2) {
20419
- const ns2 = useNamespace("date-picker-pro");
20976
+ const ns2 = useNamespace$1("date-picker-pro");
20420
20977
  const yarListScrollRef = ref();
20421
20978
  const yearList = ref([]);
20422
20979
  const { today, calendarRange, selectDate, rangeSelectDate, minDate, maxDate, fixRangeDate, getToDate, emitSelectedDate } = useCalendarSelected(props, ctx2);
@@ -20543,7 +21100,7 @@ var YearCalendarPanel = defineComponent({
20543
21100
  props: datePickerProPanelProps,
20544
21101
  emits: ["selectedDate", "changeRangeFocusType"],
20545
21102
  setup(props, ctx2) {
20546
- const ns2 = useNamespace("date-picker-pro");
21103
+ const ns2 = useNamespace$1("date-picker-pro");
20547
21104
  const {
20548
21105
  yarListScrollRef,
20549
21106
  yearList,
@@ -20579,7 +21136,7 @@ var YearCalendarPanel = defineComponent({
20579
21136
  }
20580
21137
  });
20581
21138
  function useMonthCalendarPanel(props, ctx2) {
20582
- const ns2 = useNamespace("date-picker-pro");
21139
+ const ns2 = useNamespace$1("date-picker-pro");
20583
21140
  const yearScrollRef = ref();
20584
21141
  const monthScrollRef = ref();
20585
21142
  const yearList = ref([]);
@@ -20768,7 +21325,7 @@ var MonthCalendarPanel = defineComponent({
20768
21325
  setup(props, ctx2) {
20769
21326
  const app = getCurrentInstance();
20770
21327
  const t = createI18nTranslate("DDatePickerPro", app);
20771
- const ns2 = useNamespace("date-picker-pro");
21328
+ const ns2 = useNamespace$1("date-picker-pro");
20772
21329
  const {
20773
21330
  yearScrollRef,
20774
21331
  monthScrollRef,
@@ -20982,7 +21539,7 @@ var DatePickerProPanel = defineComponent({
20982
21539
  setup(props, ctx2) {
20983
21540
  const app = getCurrentInstance();
20984
21541
  const t = createI18nTranslate("DDatePickerPro", app);
20985
- const ns2 = useNamespace("date-picker-pro");
21542
+ const ns2 = useNamespace$1("date-picker-pro");
20986
21543
  const {
20987
21544
  calendarPanelRef,
20988
21545
  timeData,
@@ -21092,7 +21649,7 @@ var DatePickerPro = defineComponent({
21092
21649
  setup(props, ctx2) {
21093
21650
  const app = getCurrentInstance();
21094
21651
  const t = createI18nTranslate("DDatePickerPro", app);
21095
- const ns2 = useNamespace("date-picker-pro");
21652
+ const ns2 = useNamespace$1("date-picker-pro");
21096
21653
  const {
21097
21654
  originRef,
21098
21655
  inputRef,
@@ -21318,7 +21875,7 @@ var DRangeDatePickerPro = defineComponent({
21318
21875
  setup(props, ctx2) {
21319
21876
  const app = getCurrentInstance();
21320
21877
  const t = createI18nTranslate("DDatePickerPro", app);
21321
- const ns2 = useNamespace("range-date-picker-pro");
21878
+ const ns2 = useNamespace$1("range-date-picker-pro");
21322
21879
  const {
21323
21880
  originRef,
21324
21881
  startInputRef,
@@ -21431,207 +21988,160 @@ var DatePickerProInstall = {
21431
21988
  app.component(DRangeDatePickerPro.name, DRangeDatePickerPro);
21432
21989
  }
21433
21990
  };
21434
- const SHADOW_ID = "devui-dragdrop-placeholder-shadow";
21435
- function getElementStyle(id, styleName) {
21436
- return document.getElementById(id).currentStyle ? document.getElementById(id).currentStyle[styleName] : window.getComputedStyle(document.getElementById(id), styleName);
21437
- }
21438
- function createShadow(originId) {
21439
- const shadow = document.createElement("div");
21440
- shadow.id = SHADOW_ID;
21441
- shadow.style.background = "rgb(206, 215, 255)";
21442
- shadow.style.width = getElementStyle(originId, "width");
21443
- shadow.style.height = "20px";
21444
- return shadow;
21445
- }
21446
- function changeDragState(el, originId, dragStart, drag, dragover, drop, shouldCreateShadow, dragFlag) {
21447
- el.dataset.originId = originId;
21448
- el.dataset.dragStart = dragStart;
21449
- el.dataset.dragover = dragover;
21450
- el.dataset.drop = drop;
21451
- el.dataset.shouldCreateShadow = shouldCreateShadow;
21452
- el.dataset.dragFlag = dragFlag;
21453
- }
21454
- function computeCompareElementHeight(compareElement) {
21455
- return compareElement.getBoundingClientRect().top + Math.floor(compareElement.offsetHeight / 2);
21456
- }
21457
- function createInsertSortableShadow(sortDropArea, mouseObject, originId) {
21458
- const sortDropAreaArr = [...sortDropArea.children];
21459
- if (sortDropAreaArr.length === 0) {
21460
- if (!document.getElementById(SHADOW_ID)) {
21461
- const shadowElement = createShadow(originId);
21462
- sortDropArea.appendChild(shadowElement);
21463
- }
21464
- } else {
21465
- for (let index2 = 0; index2 < sortDropAreaArr.length; index2++) {
21466
- const compareHeight = computeCompareElementHeight(sortDropAreaArr[index2]);
21467
- document.getElementById(SHADOW_ID) ? sortDropArea.removeChild(document.getElementById(SHADOW_ID)) : null;
21468
- if (Math.floor(mouseObject.clientY) <= Math.floor(compareHeight / 2) + sortDropAreaArr[index2].getBoundingClientRect().top) {
21469
- sortDropArea.insertBefore(createShadow(originId), sortDropAreaArr[index2]);
21470
- break;
21471
- } else {
21472
- index2 === sortDropAreaArr.length - 1 && sortDropArea.appendChild(createShadow(originId));
21473
- }
21474
- }
21475
- }
21476
- }
21477
- function deleteInsertedSortableShadow(dropSortArea) {
21478
- if (dropSortArea) {
21479
- if (document.getElementById(SHADOW_ID)) {
21480
- if (dropSortArea.contains(document.getElementById(SHADOW_ID))) {
21481
- dropSortArea.removeChild(document.getElementById(SHADOW_ID));
21482
- }
21483
- }
21484
- }
21485
- }
21486
- function judgeMouseIsInSortableArea(mouse, sortableArea) {
21487
- const { clientX, clientY } = mouse;
21488
- const eleLeft = sortableArea.getBoundingClientRect().left;
21489
- const eleRight = sortableArea.getBoundingClientRect().right;
21490
- const eleTop = sortableArea.getBoundingClientRect().top;
21491
- const eleBottom = sortableArea.getBoundingClientRect().bottom;
21492
- if (clientX > eleLeft && clientX < eleRight && clientY > eleTop && clientY < eleBottom) {
21493
- return true;
21494
- } else {
21495
- return false;
21496
- }
21497
- }
21498
- function sameOriginExchangeElementPosition(mouse, comparedArr, dragId, dropArea) {
21499
- if (comparedArr.length <= 1) {
21500
- return;
21501
- }
21502
- for (let index2 = 0; index2 < comparedArr.length; index2++) {
21503
- if (mouse.clientY < comparedArr[index2].getBoundingClientRect().top) {
21504
- dropArea.insertBefore(document.getElementById(dragId), comparedArr[index2]);
21505
- break;
21506
- }
21507
- if (index2 === comparedArr.length - 1 && mouse.clientY > comparedArr[index2].getBoundingClientRect().bottom) {
21508
- dropArea.appendChild(document.getElementById(dragId));
21509
- break;
21991
+ var draggableDirective = {};
21992
+ var droppableDirective = {};
21993
+ function matches(element, selector) {
21994
+ const proto = Element.prototype;
21995
+ const func = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector || function(s) {
21996
+ const ctx2 = this;
21997
+ const matchesElements = (ctx2.document || ctx2.ownerDocument).querySelectorAll(s);
21998
+ let i = matchesElements.length;
21999
+ while (--i >= 0 && matchesElements.item(i) !== ctx2) {
21510
22000
  }
21511
- }
22001
+ return i > -1;
22002
+ };
22003
+ return func.call(element, selector);
21512
22004
  }
21513
- function exchangeShadowPosition(mouse, dropAreaElements, dragId, dropArea) {
21514
- var _a, _b, _c;
21515
- for (let index2 = 0; index2 < dropAreaElements.length; index2++) {
21516
- if (((_a = dropAreaElements[index2]) == null ? void 0 : _a.id) !== SHADOW_ID) {
21517
- if (Math.floor(mouse.clientY) <= dropAreaElements[index2].getBoundingClientRect().top) {
21518
- if (((_b = dropAreaElements[index2 - 1]) == null ? void 0 : _b.id) !== SHADOW_ID) {
21519
- if (document.getElementById(SHADOW_ID)) {
21520
- dropArea.removeChild(document.getElementById(SHADOW_ID));
22005
+ var SortableDirective = {
22006
+ mounted(el, binding) {
22007
+ let sourceElement;
22008
+ let sourceIndex;
22009
+ let targetIndex;
22010
+ let mouseoverElement;
22011
+ let isDrop;
22012
+ const canDrag = () => {
22013
+ var _a, _b;
22014
+ if ((_a = binding == null ? void 0 : binding.value) == null ? void 0 : _a.handle) {
22015
+ const handleSelector = (_b = binding == null ? void 0 : binding.value) == null ? void 0 : _b.handle;
22016
+ let element = mouseoverElement;
22017
+ while (element !== el) {
22018
+ if (matches(element, handleSelector)) {
22019
+ return true;
21521
22020
  }
21522
- dropArea.insertBefore(createShadow(dragId), dropAreaElements[index2]);
21523
- break;
22021
+ element = element.parentNode;
21524
22022
  }
22023
+ return false;
21525
22024
  }
21526
- if (Math.floor(mouse.clientY) > dropAreaElements[dropAreaElements.length - 1].getBoundingClientRect().top) {
21527
- if (index2 === dropAreaElements.length - 1 && ((_c = dropAreaElements[index2]) == null ? void 0 : _c.id) !== SHADOW_ID) {
21528
- if (document.getElementById(SHADOW_ID)) {
21529
- dropArea.removeChild(document.getElementById(SHADOW_ID));
21530
- }
21531
- dropArea.appendChild(createShadow(dragId));
22025
+ return true;
22026
+ };
22027
+ const getCurrentTarget = (event) => {
22028
+ let index2 = -1;
22029
+ let element = event.target;
22030
+ while (element !== el) {
22031
+ if (element.parentNode === el) {
22032
+ index2 = Array.from(el.children).indexOf(element);
21532
22033
  }
21533
- break;
22034
+ element = element.parentNode;
21534
22035
  }
21535
- }
21536
- }
21537
- }
21538
- var DraggableDirective = {
21539
- mounted(el, binding) {
21540
- el.setAttribute("draggable", "true");
21541
- el.style.cursor = "grab";
21542
- el.addEventListener("drag", () => {
21543
- changeDragState(el, el.id, "true", "true", "false", "false", "false", "true");
21544
- if (binding.instance.$root.dropElement && document.getElementById(SHADOW_ID)) {
21545
- deleteInsertedSortableShadow(binding.instance.$root.dropElement);
21546
- binding.instance.$root.dropElement = null;
21547
- }
21548
- }, false);
21549
- el.addEventListener("dragstart", () => {
21550
- changeDragState(el, el.id, "true", "true", "false", "false", "false", "false");
21551
- binding.instance.$root.identity = el.id;
21552
- el.dataset.dragArea = el.parentNode.className;
21553
- }, false);
21554
- }
21555
- };
21556
- var DroppableDirective = {
21557
- mounted(el, binding) {
21558
- el.addEventListener("dragover", (event) => {
21559
- event.preventDefault();
21560
- const dragId = binding.instance.$root.identity;
21561
- changeDragState(document.getElementById(dragId), dragId, "true", "false", "true", "false", "false", "false");
21562
- document.getElementById(dragId).dataset.dropArea = [...el.childNodes][1].className;
21563
- }, false);
21564
- el.addEventListener("drop", (event) => {
21565
- event.preventDefault();
21566
- const dragId = binding.instance.$root.identity;
21567
- document.getElementById(dragId).dataset.parent = "not-sortable-drop-area";
21568
- if (document.getElementById(dragId).dataset.dropArea === document.getElementById(dragId).dataset.dragArea) {
21569
- return;
22036
+ return index2;
22037
+ };
22038
+ const getDragClass = () => {
22039
+ var _a;
22040
+ return ((_a = binding == null ? void 0 : binding.value) == null ? void 0 : _a.dragClass) || "devui-drag-item";
22041
+ };
22042
+ const emitEvent = (funcName, event) => {
22043
+ if (binding == null ? void 0 : binding.value[funcName]) {
22044
+ binding == null ? void 0 : binding.value[funcName](event);
21570
22045
  }
21571
- const childrenArr = [...Array.from(el.children)[1].children];
21572
- if (childrenArr.length > 0) {
21573
- for (let index2 = 0; index2 < childrenArr.length; index2++) {
21574
- const childrenYRange = childrenArr[index2].getBoundingClientRect().top + childrenArr[index2].offsetHeight / 2;
21575
- if (parseFloat(event.clientY) < parseFloat(childrenYRange)) {
21576
- el.children[1].insertBefore(document.getElementById(dragId), childrenArr[index2]);
21577
- break;
21578
- }
21579
- if (index2 === childrenArr.length - 1) {
21580
- el.children[1].appendChild(document.getElementById(dragId));
21581
- }
22046
+ };
22047
+ el.addEventListener("mouseover", (event) => {
22048
+ mouseoverElement = event.target;
22049
+ });
22050
+ Array.from(el.children).forEach((element) => {
22051
+ element.setAttribute("draggable", "true");
22052
+ element.addEventListener("dragstart", (event) => {
22053
+ if (canDrag()) {
22054
+ isDrop = false;
22055
+ sourceElement = element;
22056
+ sourceIndex = Array.from(el.children).indexOf(sourceElement);
22057
+ setTimeout(() => {
22058
+ sourceElement.classList.add(getDragClass());
22059
+ });
22060
+ } else {
22061
+ event.preventDefault();
22062
+ event.stopPropagation();
21582
22063
  }
21583
- } else {
21584
- el.childNodes[1].appendChild(document.getElementById(dragId));
21585
- }
22064
+ emitEvent("dragStart", event);
22065
+ });
22066
+ });
22067
+ el.addEventListener("dragenter", function(event) {
22068
+ emitEvent("dragEnter", event);
21586
22069
  });
21587
- }
21588
- };
21589
- var SortableDirective = {
21590
- mounted(el, binding) {
21591
- const self2 = el;
21592
22070
  el.addEventListener("dragover", function(event) {
21593
- var _a;
21594
- event.preventDefault();
21595
- const dragId = binding.instance.$root.identity;
21596
- if (((_a = document.getElementById(dragId)) == null ? void 0 : _a.dataset.parent) === "sortable-drop-area") {
21597
- return;
21598
- }
21599
- if (!document.getElementById(SHADOW_ID) && [...self2.childNodes[1].children].length === 0) {
21600
- createInsertSortableShadow([...self2.childNodes][1], event, dragId);
21601
- } else if ([...self2.childNodes[1].children].length >= 1) {
21602
- exchangeShadowPosition(event, [...self2.childNodes[1].children], dragId, self2.childNodes[1]);
22071
+ var _a, _b;
22072
+ const currentIndex = Array.from(el.children).indexOf(sourceElement);
22073
+ const toIndex = getCurrentTarget(event);
22074
+ if (currentIndex !== -1 && toIndex !== -1) {
22075
+ if (currentIndex > toIndex) {
22076
+ el.removeChild(sourceElement);
22077
+ el.insertBefore(sourceElement, el.children[toIndex]);
22078
+ targetIndex = toIndex;
22079
+ } else if (currentIndex < toIndex) {
22080
+ el.removeChild(sourceElement);
22081
+ if (el.children[toIndex]) {
22082
+ el.insertBefore(sourceElement, el.children[toIndex]);
22083
+ targetIndex = toIndex;
22084
+ } else {
22085
+ el.appendChild(sourceElement);
22086
+ targetIndex = el.children.length - 1;
22087
+ }
22088
+ }
22089
+ ((_a = binding == null ? void 0 : binding.value) == null ? void 0 : _a.dragover) && ((_b = binding == null ? void 0 : binding.value) == null ? void 0 : _b.dragover(event));
21603
22090
  }
22091
+ event.preventDefault();
22092
+ emitEvent("dragOver", event);
22093
+ });
22094
+ el.addEventListener("dragleave", function(event) {
22095
+ emitEvent("dragLeave", event);
21604
22096
  });
21605
22097
  el.addEventListener("drop", function(event) {
21606
- var _a;
21607
- const dropArea = [...el.childNodes][1];
21608
- const dragId = binding.instance.$root.identity;
21609
- if (((_a = document.getElementById(dragId)) == null ? void 0 : _a.dataset.parent) === "sortable-drop-area") {
21610
- sameOriginExchangeElementPosition(event, [...dropArea.children], dragId, dropArea);
21611
- return;
21612
- }
21613
- if (document.getElementById(SHADOW_ID)) {
21614
- dropArea.replaceChild(document.getElementById(dragId), document.getElementById(SHADOW_ID));
21615
- if (document.getElementById(dragId)) {
21616
- document.getElementById(dragId).dataset.parent = "sortable-drop-area";
22098
+ var _a, _b, _c;
22099
+ isDrop = true;
22100
+ if ((_a = binding == null ? void 0 : binding.value) == null ? void 0 : _a.list) {
22101
+ const list2 = (_b = binding == null ? void 0 : binding.value) == null ? void 0 : _b.list;
22102
+ const item = list2[sourceIndex];
22103
+ list2.splice(sourceIndex, 1);
22104
+ list2.splice(targetIndex, 0, item);
22105
+ if ((_c = binding == null ? void 0 : binding.value) == null ? void 0 : _c.drop) {
22106
+ emitEvent("drop", {
22107
+ event,
22108
+ list: list2,
22109
+ fromIndex: sourceIndex,
22110
+ targetIndex
22111
+ });
21617
22112
  }
21618
22113
  }
21619
22114
  });
21620
- el.addEventListener("dragleave", function(event) {
21621
- const dropArea = [...el.childNodes][1];
21622
- if (document.getElementById(SHADOW_ID) && !judgeMouseIsInSortableArea(event, el)) {
21623
- dropArea.removeChild(document.getElementById(SHADOW_ID));
22115
+ el.addEventListener("dragend", function(event) {
22116
+ if (!isDrop) {
22117
+ if (sourceIndex !== -1 && targetIndex !== -1) {
22118
+ if (targetIndex > sourceIndex) {
22119
+ el.removeChild(sourceElement);
22120
+ el.insertBefore(sourceElement, el.children[sourceIndex]);
22121
+ } else if (sourceIndex > targetIndex) {
22122
+ el.removeChild(sourceElement);
22123
+ if (el.children[sourceIndex]) {
22124
+ el.insertBefore(sourceElement, el.children[sourceIndex]);
22125
+ } else {
22126
+ el.appendChild(sourceElement);
22127
+ }
22128
+ }
22129
+ }
21624
22130
  }
22131
+ sourceIndex = -1;
22132
+ targetIndex = -1;
22133
+ setTimeout(() => {
22134
+ sourceElement.classList.remove(getDragClass());
22135
+ });
22136
+ emitEvent("dragEnd", event);
21625
22137
  });
21626
22138
  }
21627
22139
  };
21628
22140
  var DragdropInstall = {
21629
22141
  title: "Dragdrop \u62D6\u62FD",
21630
- category: "\u901A\u7528",
21631
- status: "10%",
22142
+ category: "\u6F14\u8FDB\u4E2D",
22143
+ status: "100%",
21632
22144
  install(app) {
21633
- app.directive("DDraggable", DraggableDirective);
21634
- app.directive("DDroppable", DroppableDirective);
21635
22145
  app.directive("DSortable", SortableDirective);
21636
22146
  }
21637
22147
  };
@@ -21683,7 +22193,7 @@ var DrawerOverlay = defineComponent({
21683
22193
  props: drawerOverlayProps,
21684
22194
  emits: ["click"],
21685
22195
  setup(props, ctx2) {
21686
- const ns2 = useNamespace("drawer");
22196
+ const ns2 = useNamespace$1("drawer");
21687
22197
  const handleClick = (e) => {
21688
22198
  ctx2.emit("click", e);
21689
22199
  };
@@ -21698,8 +22208,8 @@ var DrawerOverlay = defineComponent({
21698
22208
  }
21699
22209
  });
21700
22210
  function useDrawer(props, emit) {
21701
- const ns2 = useNamespace("drawer");
21702
- const modalNs = useNamespace("modal", true);
22211
+ const ns2 = useNamespace$1("drawer");
22212
+ const modalNs = useNamespace$1("modal", true);
21703
22213
  const drawerRef = ref();
21704
22214
  const overlayRef = ref();
21705
22215
  const drawerClasses = computed(() => ({
@@ -21907,7 +22417,7 @@ var DropdownMenu = defineComponent({
21907
22417
  overlayClass
21908
22418
  } = toRefs(props);
21909
22419
  const dropdownMenuRef = ref(null);
21910
- const ns2 = useNamespace("dropdown");
22420
+ const ns2 = useNamespace$1("dropdown");
21911
22421
  onClickOutside(dropdownMenuRef, (value) => {
21912
22422
  var _a, _b;
21913
22423
  if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
@@ -22421,7 +22931,7 @@ const editableSelectOptionProps = {
22421
22931
  }
22422
22932
  };
22423
22933
  function useOption$1(props) {
22424
- const ns2 = useNamespace("editable-select");
22934
+ const ns2 = useNamespace$1("editable-select");
22425
22935
  const select2 = inject(SELECT_KEY);
22426
22936
  const { disabled, hovering } = toRefs(props);
22427
22937
  const isSelected = computed(() => {
@@ -22468,7 +22978,7 @@ var Dropdown = defineComponent({
22468
22978
  setup(props, {
22469
22979
  slots
22470
22980
  }) {
22471
- const ns2 = useNamespace("editable-select");
22981
+ const ns2 = useNamespace$1("editable-select");
22472
22982
  const {
22473
22983
  width,
22474
22984
  maxHeight
@@ -22720,7 +23230,7 @@ function useKeyboardSelect(props, states, filteredOptions, scrollToItem, handleO
22720
23230
  };
22721
23231
  }
22722
23232
  function useInputRender(props, states) {
22723
- const ns2 = useNamespace("editable-select-input");
23233
+ const ns2 = useNamespace$1("editable-select-input");
22724
23234
  const inputClasses = computed(() => ({
22725
23235
  [ns2.b()]: true,
22726
23236
  [ns2.m("sm")]: props.size === "sm",
@@ -22847,7 +23357,7 @@ var EditableSelect = defineComponent({
22847
23357
  props: editableSelectProps,
22848
23358
  emits: ["update:modelValue", "focus", "blur", "clear", "change", "visibleChange", "loadMore"],
22849
23359
  setup(props, ctx2) {
22850
- const ns2 = useNamespace("editable-select");
23360
+ const ns2 = useNamespace$1("editable-select");
22851
23361
  const inputRef = ref();
22852
23362
  const originRef = ref();
22853
23363
  const dropdownRef = ref();
@@ -23019,7 +23529,7 @@ function useKeydown(props, ctx2) {
23019
23529
  document.removeEventListener("keydown", handleKeydown);
23020
23530
  });
23021
23531
  }
23022
- const ns$e = useNamespace("fullscreen");
23532
+ const ns$e = useNamespace$1("fullscreen");
23023
23533
  const launchNormalFullscreen = (targetElement, props) => {
23024
23534
  targetElement.classList.add(ns$e.b());
23025
23535
  if (props.zIndex) {
@@ -24233,7 +24743,7 @@ var Tooltip = defineComponent({
24233
24743
  onMouseleave,
24234
24744
  onMouseenterOverlay
24235
24745
  } = useTooltip(origin, props);
24236
- const ns2 = useNamespace("tooltip");
24746
+ const ns2 = useNamespace$1("tooltip");
24237
24747
  const className2 = computed(() => {
24238
24748
  return [ns2.b(), ns2.m(placement.value)].join(" ");
24239
24749
  });
@@ -27234,7 +27744,7 @@ var Row = defineComponent({
27234
27744
  slots
27235
27745
  }) {
27236
27746
  const gutterScreenSize = ref({});
27237
- const ns2 = useNamespace("row");
27747
+ const ns2 = useNamespace$1("row");
27238
27748
  const rowClass = computed(() => ({
27239
27749
  [ns2.em("align", props.align)]: true,
27240
27750
  [ns2.em("justify", props.justify)]: true,
@@ -27312,7 +27822,7 @@ var Row = defineComponent({
27312
27822
  };
27313
27823
  }
27314
27824
  });
27315
- const colNs = useNamespace("col");
27825
+ const colNs = useNamespace$1("col");
27316
27826
  function useColClassNames(props) {
27317
27827
  return computed(() => ({
27318
27828
  [colNs.em("span", props.span ? String(props.span) : "")]: true,
@@ -27356,7 +27866,7 @@ var Col = defineComponent({
27356
27866
  setup(props, {
27357
27867
  slots
27358
27868
  }) {
27359
- const ns2 = useNamespace("col");
27869
+ const ns2 = useNamespace$1("col");
27360
27870
  const formatFlex = (flex) => {
27361
27871
  if (typeof flex === "number") {
27362
27872
  return `${flex} ${flex} auto`;
@@ -27535,7 +28045,7 @@ var imagePreview = defineComponent({
27535
28045
  props: imagePreviewProps,
27536
28046
  emits: [],
27537
28047
  setup(props) {
27538
- const ns2 = useNamespace("image-preview");
28048
+ const ns2 = useNamespace$1("image-preview");
27539
28049
  let transform = null;
27540
28050
  const index2 = ref(0);
27541
28051
  const url2 = computed(() => props.previewUrlList[index2.value]);
@@ -28019,7 +28529,7 @@ const inputNumberProps = {
28019
28529
  default: ""
28020
28530
  }
28021
28531
  };
28022
- const ns$d = useNamespace("input-number");
28532
+ const ns$d = useNamespace$1("input-number");
28023
28533
  function IncIcon() {
28024
28534
  return createVNode("svg", {
28025
28535
  "class": ns$d.e("icon-arrow"),
@@ -28062,7 +28572,7 @@ function DecIcon() {
28062
28572
  "fill-rule": "nonzero"
28063
28573
  }, null)])]);
28064
28574
  }
28065
- const ns$c = useNamespace("input-number");
28575
+ const ns$c = useNamespace$1("input-number");
28066
28576
  function useRender$1(props, ctx2) {
28067
28577
  const formContext = inject(FORM_TOKEN, void 0);
28068
28578
  const _a = ctx2.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
@@ -28283,7 +28793,7 @@ var Layout = defineComponent({
28283
28793
  setup(props, {
28284
28794
  slots
28285
28795
  }) {
28286
- const ns2 = useNamespace("layout");
28796
+ const ns2 = useNamespace$1("layout");
28287
28797
  return () => {
28288
28798
  var _a;
28289
28799
  const slotDefault = (_a = slots.default) == null ? void 0 : _a.call(slots);
@@ -28301,7 +28811,7 @@ var Content = defineComponent({
28301
28811
  setup(props, {
28302
28812
  slots
28303
28813
  }) {
28304
- const ns2 = useNamespace("layout");
28814
+ const ns2 = useNamespace$1("layout");
28305
28815
  return () => {
28306
28816
  var _a;
28307
28817
  return createVNode("div", {
@@ -28316,7 +28826,7 @@ var Header = defineComponent({
28316
28826
  setup(props, {
28317
28827
  slots
28318
28828
  }) {
28319
- const ns2 = useNamespace("layout");
28829
+ const ns2 = useNamespace$1("layout");
28320
28830
  return () => {
28321
28831
  var _a;
28322
28832
  return createVNode("div", {
@@ -28331,7 +28841,7 @@ var Footer = defineComponent({
28331
28841
  setup(props, {
28332
28842
  slots
28333
28843
  }) {
28334
- const ns2 = useNamespace("layout");
28844
+ const ns2 = useNamespace$1("layout");
28335
28845
  return () => {
28336
28846
  var _a;
28337
28847
  return createVNode("div", {
@@ -28345,7 +28855,7 @@ var Aside = defineComponent({
28345
28855
  setup(props, {
28346
28856
  slots
28347
28857
  }) {
28348
- const ns2 = useNamespace("layout");
28858
+ const ns2 = useNamespace$1("layout");
28349
28859
  return () => {
28350
28860
  var _a;
28351
28861
  return createVNode("div", {
@@ -28372,7 +28882,7 @@ var List = defineComponent({
28372
28882
  setup(props, {
28373
28883
  slots
28374
28884
  }) {
28375
- const ns2 = useNamespace("list");
28885
+ const ns2 = useNamespace$1("list");
28376
28886
  return () => {
28377
28887
  var _a;
28378
28888
  return createVNode("div", {
@@ -28387,7 +28897,7 @@ var ListItem = defineComponent({
28387
28897
  setup(props, {
28388
28898
  slots
28389
28899
  }) {
28390
- const ns2 = useNamespace("list-item");
28900
+ const ns2 = useNamespace$1("list-item");
28391
28901
  return () => {
28392
28902
  var _a;
28393
28903
  return createVNode("div", {
@@ -28514,7 +29024,7 @@ const textareaProps = {
28514
29024
  function useTextareaRender(props) {
28515
29025
  const formContext = inject(FORM_TOKEN, void 0);
28516
29026
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
28517
- const ns2 = useNamespace("textarea");
29027
+ const ns2 = useNamespace$1("textarea");
28518
29028
  const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
28519
29029
  const isFocus = ref(false);
28520
29030
  const { error: error2, disabled } = toRefs(props);
@@ -28661,7 +29171,7 @@ var Textarea = defineComponent({
28661
29171
  } = toRefs(props);
28662
29172
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
28663
29173
  const textarea2 = shallowRef();
28664
- const ns2 = useNamespace("textarea");
29174
+ const ns2 = useNamespace$1("textarea");
28665
29175
  const {
28666
29176
  isFocus,
28667
29177
  textareaDisabled,
@@ -28724,7 +29234,7 @@ var Mention = defineComponent({
28724
29234
  slots,
28725
29235
  emit
28726
29236
  }) {
28727
- const ns2 = useNamespace("mention");
29237
+ const ns2 = useNamespace$1("mention");
28728
29238
  const textContext = ref("");
28729
29239
  const showSuggestions = ref(false);
28730
29240
  const currentIndex = ref(0);
@@ -28869,8 +29379,8 @@ var MentionInstall = {
28869
29379
  const elements = [];
28870
29380
  let parents = [];
28871
29381
  const defaultIndent = ref(24);
28872
- const ns$b = useNamespace("menu");
28873
- const subNs$2 = useNamespace("submenu");
29382
+ const ns$b = useNamespace$1("menu");
29383
+ const subNs$2 = useNamespace$1("submenu");
28874
29384
  const menuClass = ns$b.b();
28875
29385
  const menuItemHorizontalWrapper = `${ns$b.b()}-item-horizontal-wrapper`;
28876
29386
  const menuItemSelect$1 = `${ns$b.b()}-item-select`;
@@ -29028,7 +29538,7 @@ const menuItemProps = {
29028
29538
  type: [String, Object]
29029
29539
  }
29030
29540
  };
29031
- const ns$a = useNamespace("menu");
29541
+ const ns$a = useNamespace$1("menu");
29032
29542
  function initSelect(defaultSelectKeys, keys2, isMultiple, disabled) {
29033
29543
  const isSelect = ref(false);
29034
29544
  if (!isMultiple) {
@@ -29067,7 +29577,7 @@ function changeRoute(props, router, useRouter, key) {
29067
29577
  }
29068
29578
  return void 0;
29069
29579
  }
29070
- const ns$9 = useNamespace("menu");
29580
+ const ns$9 = useNamespace$1("menu");
29071
29581
  function useClick(e) {
29072
29582
  const paths = e.composedPath();
29073
29583
  for (let i = 0; i < paths.length; i++) {
@@ -29083,7 +29593,7 @@ function useClick(e) {
29083
29593
  }
29084
29594
  }
29085
29595
  }
29086
- const ns$8 = useNamespace("menu");
29596
+ const ns$8 = useNamespace$1("menu");
29087
29597
  const menuItemSelect = `${ns$8.b()}-item-select`;
29088
29598
  const menuItemDisabled = `${ns$8.b()}-item-disabled`;
29089
29599
  var MenuItem = defineComponent({
@@ -29354,8 +29864,8 @@ const subMenuProps = {
29354
29864
  default: false
29355
29865
  }
29356
29866
  };
29357
- const ns$7 = useNamespace("menu");
29358
- const subNs$1 = useNamespace("submenu");
29867
+ const ns$7 = useNamespace$1("menu");
29868
+ const subNs$1 = useNamespace$1("submenu");
29359
29869
  const menuItemHorizontalWrapperHidden = `${ns$7.b()}-item-horizontal-wrapper-hidden`;
29360
29870
  const menuItemHorizontalWrapperShow = `${ns$7.b()}-item-horizontal-wrapper-show`;
29361
29871
  function useShowSubMenu(eventName, e, wrapper) {
@@ -29399,8 +29909,8 @@ function useShowSubMenu(eventName, e, wrapper) {
29399
29909
  wrapper.classList.add(menuItemHorizontalWrapperHidden);
29400
29910
  }
29401
29911
  }
29402
- const ns$6 = useNamespace("menu");
29403
- const subNs = useNamespace("submenu");
29912
+ const ns$6 = useNamespace$1("menu");
29913
+ const subNs = useNamespace$1("submenu");
29404
29914
  const subMenuClass = subNs.b();
29405
29915
  var SubMenu = defineComponent({
29406
29916
  name: "DSubMenu",
@@ -29621,7 +30131,7 @@ var Menu = defineComponent({
29621
30131
  props: menuProps,
29622
30132
  emits: ["select", "deselect", "submenu-change"],
29623
30133
  setup(props, ctx2) {
29624
- const ns2 = useNamespace("menu");
30134
+ const ns2 = useNamespace$1("menu");
29625
30135
  const {
29626
30136
  openKeys,
29627
30137
  mode,
@@ -29767,7 +30277,7 @@ var Close$1 = defineComponent({
29767
30277
  setup(props, {
29768
30278
  emit
29769
30279
  }) {
29770
- const ns2 = useNamespace("message");
30280
+ const ns2 = useNamespace$1("message");
29771
30281
  return () => createVNode("div", {
29772
30282
  "class": ns2.e("icon-close"),
29773
30283
  "onClick": (e) => emit("click", e)
@@ -29814,7 +30324,7 @@ const messageProps = {
29814
30324
  type: Function
29815
30325
  }
29816
30326
  };
29817
- const ns$5 = useNamespace("message");
30327
+ const ns$5 = useNamespace$1("message");
29818
30328
  function SuccessIcon$1() {
29819
30329
  return createVNode("svg", {
29820
30330
  "viewBox": "0 0 1024 1024",
@@ -29872,7 +30382,7 @@ var Message$1 = defineComponent({
29872
30382
  shadow,
29873
30383
  showClose
29874
30384
  } = toRefs(props);
29875
- const ns2 = useNamespace("message");
30385
+ const ns2 = useNamespace$1("message");
29876
30386
  let timer = null;
29877
30387
  let timestamp;
29878
30388
  const handleDestroy = () => {
@@ -30127,6 +30637,7 @@ const modalProps = {
30127
30637
  function useModal(props, emit) {
30128
30638
  function close2() {
30129
30639
  emit("update:modelValue", false);
30640
+ emit("close");
30130
30641
  }
30131
30642
  function execClose() {
30132
30643
  props.beforeClose ? props.beforeClose(close2) : close2();
@@ -30252,7 +30763,7 @@ var ModalHeader = defineComponent({
30252
30763
  setup(props, {
30253
30764
  slots
30254
30765
  }) {
30255
- const ns2 = useNamespace("modal");
30766
+ const ns2 = useNamespace$1("modal");
30256
30767
  return () => {
30257
30768
  var _a;
30258
30769
  return createVNode("div", {
@@ -30266,7 +30777,7 @@ var ModalBody = defineComponent({
30266
30777
  setup(props, {
30267
30778
  slots
30268
30779
  }) {
30269
- const ns2 = useNamespace("modal");
30780
+ const ns2 = useNamespace$1("modal");
30270
30781
  return () => {
30271
30782
  var _a;
30272
30783
  return createVNode("div", {
@@ -30280,13 +30791,13 @@ var Modal = defineComponent({
30280
30791
  name: "DModal",
30281
30792
  inheritAttrs: false,
30282
30793
  props: modalProps,
30283
- emits: ["update:modelValue"],
30794
+ emits: ["update:modelValue", "close"],
30284
30795
  setup(props, {
30285
30796
  slots,
30286
30797
  attrs,
30287
30798
  emit
30288
30799
  }) {
30289
- const ns2 = useNamespace("modal");
30800
+ const ns2 = useNamespace$1("modal");
30290
30801
  const {
30291
30802
  modelValue,
30292
30803
  title,
@@ -30416,7 +30927,7 @@ var ModalFooter = defineComponent({
30416
30927
  setup(props, {
30417
30928
  slots
30418
30929
  }) {
30419
- const ns2 = useNamespace("modal");
30930
+ const ns2 = useNamespace$1("modal");
30420
30931
  return () => {
30421
30932
  var _a;
30422
30933
  return createVNode("div", {
@@ -30615,7 +31126,7 @@ var Close = defineComponent({
30615
31126
  setup(props, {
30616
31127
  emit
30617
31128
  }) {
30618
- const ns2 = useNamespace("notification");
31129
+ const ns2 = useNamespace$1("notification");
30619
31130
  return () => createVNode("div", {
30620
31131
  "class": ns2.e("icon-close"),
30621
31132
  "onClick": (e) => emit("click", e)
@@ -30625,7 +31136,7 @@ var Close = defineComponent({
30625
31136
  }, null)]);
30626
31137
  }
30627
31138
  });
30628
- const ns$4 = useNamespace("notification");
31139
+ const ns$4 = useNamespace$1("notification");
30629
31140
  const XLINK = {
30630
31141
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
30631
31142
  };
@@ -30739,7 +31250,7 @@ var TypeIcon = defineComponent({
30739
31250
  const {
30740
31251
  type: type4
30741
31252
  } = toRefs(props);
30742
- const ns2 = useNamespace("notification");
31253
+ const ns2 = useNamespace$1("notification");
30743
31254
  const classes = computed(() => ({
30744
31255
  [ns2.e("image")]: true,
30745
31256
  [ns2.em("image", type4.value)]: true
@@ -30814,7 +31325,7 @@ var Notification = defineComponent({
30814
31325
  close: close2,
30815
31326
  handleDestroy
30816
31327
  } = useEvent(props, emit);
30817
- const ns2 = useNamespace("notification");
31328
+ const ns2 = useNamespace$1("notification");
30818
31329
  return () => createVNode(Transition, {
30819
31330
  "name": "notification-fade",
30820
31331
  "onAfterLeave": handleDestroy
@@ -30922,7 +31433,7 @@ function className$1(classStr, classOpt) {
30922
31433
  function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
30923
31434
  const formContext = inject(FORM_TOKEN, void 0);
30924
31435
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
30925
- const ns2 = useNamespace("select");
31436
+ const ns2 = useNamespace$1("select");
30926
31437
  const dropdownRef = ref();
30927
31438
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
30928
31439
  const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
@@ -30939,7 +31450,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
30939
31450
  onClickOutside(dropdownRef, () => {
30940
31451
  toggleChange(false);
30941
31452
  }, { ignore: [selectRef] });
30942
- const dropdownMenuMultipleNs = useNamespace("dropdown-menu-multiple");
31453
+ const dropdownMenuMultipleNs = useNamespace$1("dropdown-menu-multiple");
30943
31454
  const selectCls = computed(() => {
30944
31455
  return className$1(ns2.b(), {
30945
31456
  [ns2.m("open")]: isOpen.value,
@@ -31347,7 +31858,7 @@ const optionGroupProps = {
31347
31858
  const SELECT_TOKEN = Symbol("dSelect");
31348
31859
  const OPTION_GROUP_TOKEN = Symbol("dOptionGroup");
31349
31860
  function useOption(props) {
31350
- const ns2 = useNamespace("select");
31861
+ const ns2 = useNamespace$1("select");
31351
31862
  const select2 = inject(SELECT_TOKEN, null);
31352
31863
  const optionGroup = inject(OPTION_GROUP_TOKEN, null);
31353
31864
  const currentName = computed(() => {
@@ -31469,7 +31980,7 @@ const tagProps = {
31469
31980
  }
31470
31981
  };
31471
31982
  function useClass(props) {
31472
- const ns2 = useNamespace("tag");
31983
+ const ns2 = useNamespace$1("tag");
31473
31984
  return computed(() => {
31474
31985
  const { type: type4, color: color2, deletable } = props;
31475
31986
  return `${ns2.e("item")} ${ns2.m(type4 || (color2 ? "colorful" : "") || "default")} ${deletable ? ns2.m("deletable") : ""} ${ns2.m(props.size)}`;
@@ -31511,7 +32022,7 @@ var Tag = defineComponent({
31511
32022
  slots,
31512
32023
  emit
31513
32024
  }) {
31514
- const ns2 = useNamespace("tag");
32025
+ const ns2 = useNamespace$1("tag");
31515
32026
  const {
31516
32027
  type: type4,
31517
32028
  color: color2,
@@ -31574,7 +32085,7 @@ var TagInstall = {
31574
32085
  }
31575
32086
  };
31576
32087
  function useSelectContent() {
31577
- const ns2 = useNamespace("select");
32088
+ const ns2 = useNamespace$1("select");
31578
32089
  const select2 = inject(SELECT_TOKEN);
31579
32090
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31580
32091
  const app = getCurrentInstance();
@@ -31671,7 +32182,7 @@ var SelectContent = defineComponent({
31671
32182
  name: "SelectContent",
31672
32183
  setup() {
31673
32184
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31674
- const ns2 = useNamespace("select");
32185
+ const ns2 = useNamespace$1("select");
31675
32186
  const clearCls = computed(() => ({
31676
32187
  [ns2.e("clear")]: true,
31677
32188
  [ns2.em("clear", "feedback")]: Boolean(formItemContext == null ? void 0 : formItemContext.validateState) && (formItemContext == null ? void 0 : formItemContext.showFeedback)
@@ -31830,8 +32341,8 @@ var Select = defineComponent({
31830
32341
  toggleChange,
31831
32342
  isShowCreateOption
31832
32343
  } = useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t);
31833
- const scrollbarNs = useNamespace("scrollbar");
31834
- const ns2 = useNamespace("select");
32344
+ const scrollbarNs = useNamespace$1("scrollbar");
32345
+ const ns2 = useNamespace$1("select");
31835
32346
  const dropdownCls = ns2.e("dropdown");
31836
32347
  const listCls = {
31837
32348
  [ns2.e("dropdown-list")]: true,
@@ -31949,7 +32460,7 @@ var OptionGroup = defineComponent({
31949
32460
  name: "DOptionGroup",
31950
32461
  props: optionGroupProps,
31951
32462
  setup(props, ctx2) {
31952
- const ns2 = useNamespace("select");
32463
+ const ns2 = useNamespace$1("select");
31953
32464
  provide(OPTION_GROUP_TOKEN, reactive(__spreadValues({}, toRefs(props))));
31954
32465
  return () => {
31955
32466
  var _a;
@@ -32134,7 +32645,7 @@ var ConfigMenu = defineComponent({
32134
32645
  isShowConfig,
32135
32646
  $slots
32136
32647
  } = this;
32137
- const ns2 = useNamespace("pagination");
32648
+ const ns2 = useNamespace$1("pagination");
32138
32649
  return withDirectives(createVNode("div", {
32139
32650
  "class": ns2.e("config"),
32140
32651
  "ref": "paginationConfig"
@@ -32224,7 +32735,7 @@ var JumpPage = defineComponent({
32224
32735
  jump,
32225
32736
  showJumpButton
32226
32737
  } = this;
32227
- const ns2 = useNamespace("pagination");
32738
+ const ns2 = useNamespace$1("pagination");
32228
32739
  const inputProps2 = {
32229
32740
  class: [ns2.e("input"), size ? ns2.em("input", size) : ""],
32230
32741
  size,
@@ -32346,7 +32857,7 @@ var PageNumBtn = defineComponent({
32346
32857
  nextChange,
32347
32858
  showTruePageIndex
32348
32859
  } = this;
32349
- const ns2 = useNamespace("pagination");
32860
+ const ns2 = useNamespace$1("pagination");
32350
32861
  return createVNode("ul", {
32351
32862
  "class": [ns2.e("list"), size ? ns2.m(size) : ""]
32352
32863
  }, [createVNode("li", {
@@ -32432,7 +32943,7 @@ var PageNumBtn = defineComponent({
32432
32943
  });
32433
32944
  var PageSize = defineComponent({
32434
32945
  setup() {
32435
- const ns2 = useNamespace("pagination");
32946
+ const ns2 = useNamespace$1("pagination");
32436
32947
  const paginationContext = inject(paginationInjectionKey);
32437
32948
  const iconRotate = ref(0);
32438
32949
  const {
@@ -32510,7 +33021,7 @@ var Pagination = defineComponent({
32510
33021
  showJumpButton,
32511
33022
  haveConfigMenu
32512
33023
  } = toRefs(props);
32513
- const ns2 = useNamespace("pagination");
33024
+ const ns2 = useNamespace$1("pagination");
32514
33025
  const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
32515
33026
  const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
32516
33027
  const cursor = computed({
@@ -32947,7 +33458,7 @@ var Progress = defineComponent({
32947
33458
  data,
32948
33459
  $slots
32949
33460
  } = this;
32950
- const ns2 = useNamespace("progress");
33461
+ const ns2 = useNamespace$1("progress");
32951
33462
  const isOutside = percentageTextPlacement === "outside";
32952
33463
  const isInsideBg = percentageTextPlacement === "insideBg";
32953
33464
  const createPercentageText = () => {
@@ -33489,7 +34000,7 @@ var Radio = defineComponent({
33489
34000
  props: radioProps,
33490
34001
  emits: ["change", "update:modelValue"],
33491
34002
  setup(props, ctx2) {
33492
- const ns2 = useNamespace("radio");
34003
+ const ns2 = useNamespace$1("radio");
33493
34004
  const {
33494
34005
  isChecked,
33495
34006
  radioName,
@@ -33562,7 +34073,7 @@ var RadioGroup = defineComponent({
33562
34073
  props: radioGroupProps,
33563
34074
  emits: ["change", "update:modelValue"],
33564
34075
  setup(props, ctx2) {
33565
- const ns2 = useNamespace("radio-group");
34076
+ const ns2 = useNamespace$1("radio-group");
33566
34077
  useRadioGroup(props, ctx2);
33567
34078
  return () => {
33568
34079
  const getContent = () => {
@@ -33597,7 +34108,7 @@ var RadioButton = defineComponent({
33597
34108
  props: radioProps,
33598
34109
  emits: ["change", "update:modelValue"],
33599
34110
  setup(props, ctx2) {
33600
- const ns2 = useNamespace("radio-button");
34111
+ const ns2 = useNamespace$1("radio-button");
33601
34112
  const {
33602
34113
  isChecked,
33603
34114
  radioName,
@@ -33781,7 +34292,7 @@ var Rate = defineComponent({
33781
34292
  selectValue,
33782
34293
  onMouseleave
33783
34294
  } = this;
33784
- const ns2 = useNamespace("rate");
34295
+ const ns2 = useNamespace$1("rate");
33785
34296
  return createVNode("div", {
33786
34297
  "class": ns2.b(),
33787
34298
  "onMouseleave": onMouseleave,
@@ -34381,7 +34892,7 @@ const useSearchClass = (props, isFocus) => {
34381
34892
  right: "right",
34382
34893
  left: "left"
34383
34894
  };
34384
- const ns2 = useNamespace("search");
34895
+ const ns2 = useNamespace$1("search");
34385
34896
  const searchSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
34386
34897
  const rootClass = computed(() => ({
34387
34898
  [ns2.b()]: true,
@@ -34469,7 +34980,7 @@ var DSearch = defineComponent({
34469
34980
  setup(props, ctx2) {
34470
34981
  const app = getCurrentInstance();
34471
34982
  const t = createI18nTranslate("DSearch", app);
34472
- const ns2 = useNamespace("search");
34983
+ const ns2 = useNamespace$1("search");
34473
34984
  const isFocus = ref(false);
34474
34985
  const {
34475
34986
  rootClass,
@@ -34565,7 +35076,7 @@ const skeletonProps = {
34565
35076
  const roundInjectionKey = Symbol("round");
34566
35077
  const animationInjectionKey = Symbol("showAnimation");
34567
35078
  function useSkeletonItem(props) {
34568
- const ns2 = useNamespace("skeleton-item");
35079
+ const ns2 = useNamespace$1("skeleton-item");
34569
35080
  const { variant, size } = toRefs(props);
34570
35081
  const round = inject(roundInjectionKey, void 0);
34571
35082
  const showAnimation = inject(animationInjectionKey, void 0);
@@ -34639,7 +35150,7 @@ var Skeleton = defineComponent({
34639
35150
  name: "DSkeleton",
34640
35151
  props: skeletonProps,
34641
35152
  setup(props, ctx2) {
34642
- const ns2 = useNamespace("skeleton");
35153
+ const ns2 = useNamespace$1("skeleton");
34643
35154
  const {
34644
35155
  loading: loading2,
34645
35156
  rows,
@@ -34794,7 +35305,7 @@ var Slider = defineComponent({
34794
35305
  props: sliderProps,
34795
35306
  emits: ["update:modelValue"],
34796
35307
  setup(props, ctx2) {
34797
- const ns2 = useNamespace("slider");
35308
+ const ns2 = useNamespace$1("slider");
34798
35309
  const {
34799
35310
  sliderRunway,
34800
35311
  popoverShow,
@@ -34929,7 +35440,7 @@ var DSplitterBar = defineComponent({
34929
35440
  setup(props) {
34930
35441
  const app = getCurrentInstance();
34931
35442
  const t = createI18nTranslate("DSplitterBar", app);
34932
- const ns2 = useNamespace("splitter");
35443
+ const ns2 = useNamespace$1("splitter");
34933
35444
  const store = inject("splitterStore");
34934
35445
  const state = reactive({
34935
35446
  wrapperClass: `${ns2.e("bar")} ${ns2.em("bar", props.orientation)} `
@@ -35284,7 +35795,7 @@ var Splitter = defineComponent({
35284
35795
  const state = reactive({
35285
35796
  panes: []
35286
35797
  });
35287
- const ns2 = useNamespace("splitter");
35798
+ const ns2 = useNamespace$1("splitter");
35288
35799
  state.panes = ((_b = (_a = ctx2.slots).DSplitterPane) == null ? void 0 : _b.call(_a)) || [];
35289
35800
  store.setPanes({
35290
35801
  panes: state.panes
@@ -35374,10 +35885,12 @@ var SplitterPane = defineComponent({
35374
35885
  slots,
35375
35886
  expose
35376
35887
  }) {
35888
+ var _a;
35377
35889
  const store = inject("splitterStore");
35378
35890
  const domRef = ref();
35379
35891
  const orderRef = ref();
35380
- const ns2 = useNamespace("splitter");
35892
+ const currentVnode = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode;
35893
+ const ns2 = useNamespace$1("splitter");
35381
35894
  watch([orderRef, domRef], ([order, ele]) => {
35382
35895
  if (!ele) {
35383
35896
  return;
@@ -35470,17 +35983,26 @@ var SplitterPane = defineComponent({
35470
35983
  addClass(ele, flexGrowClass);
35471
35984
  }
35472
35985
  };
35986
+ const updateCollapsed = (collapsed) => {
35987
+ var _a2;
35988
+ if (typeof collapsed === "boolean") {
35989
+ currentVnode.component.props.collapsed = collapsed;
35990
+ return;
35991
+ }
35992
+ currentVnode.component.props.collapsed = !((_a2 = currentVnode == null ? void 0 : currentVnode.component) == null ? void 0 : _a2.props.collapsed);
35993
+ };
35473
35994
  expose({
35474
35995
  order: orderRef,
35475
35996
  getPaneSize,
35476
- toggleNearPaneFlexGrow
35997
+ toggleNearPaneFlexGrow,
35998
+ updateCollapsed
35477
35999
  });
35478
36000
  return () => {
35479
- var _a;
36001
+ var _a2;
35480
36002
  return createVNode("div", {
35481
36003
  "class": ns2.e("pane"),
35482
36004
  "ref": domRef
35483
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
36005
+ }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
35484
36006
  };
35485
36007
  }
35486
36008
  });
@@ -35672,7 +36194,7 @@ var Statistic = defineComponent({
35672
36194
  var _a;
35673
36195
  const innerValue = ref((_a = props.valueFrom) != null ? _a : props.value);
35674
36196
  const tween = ref(null);
35675
- const ns2 = useNamespace("statistic");
36197
+ const ns2 = useNamespace$1("statistic");
35676
36198
  const animation = (from = ((_b) => (_b = props.valueFrom) != null ? _b : 0)(), to = typeof props.value === "number" ? props.value : Number(props.value)) => {
35677
36199
  if (from !== to) {
35678
36200
  tween.value = new Tween({
@@ -35746,7 +36268,7 @@ var Status = defineComponent({
35746
36268
  }
35747
36269
  },
35748
36270
  setup(props, ctx2) {
35749
- const ns2 = useNamespace("status");
36271
+ const ns2 = useNamespace$1("status");
35750
36272
  const typeClass = computed(() => {
35751
36273
  const {
35752
36274
  type: type4
@@ -35815,7 +36337,7 @@ var Steps = defineComponent({
35815
36337
  direction,
35816
36338
  simple
35817
36339
  } = toRefs(props);
35818
- const ns2 = useNamespace("steps");
36340
+ const ns2 = useNamespace$1("steps");
35819
36341
  const activeStep = ref(modelValue.value);
35820
36342
  provide(ACTIVE_STEP, activeStep);
35821
36343
  provide(STEPS_PROPS, props);
@@ -35865,7 +36387,7 @@ var Step = defineComponent({
35865
36387
  icon: icon2,
35866
36388
  status: status2
35867
36389
  } = toRefs(props);
35868
- const ns2 = useNamespace("step");
36390
+ const ns2 = useNamespace$1("step");
35869
36391
  const instance = getCurrentInstance();
35870
36392
  const activeStep = inject(ACTIVE_STEP);
35871
36393
  const steps2 = inject(STEPS);
@@ -35985,7 +36507,7 @@ const stepsGuideProps = {
35985
36507
  }
35986
36508
  };
35987
36509
  function useStepsGuidePosition(props, currentStep) {
35988
- const guideClassList = reactive([useNamespace("steps-guide").b()]);
36510
+ const guideClassList = reactive([useNamespace$1("steps-guide").b()]);
35989
36511
  const stepsRef = ref(null);
35990
36512
  const guidePosition = reactive({
35991
36513
  left: "",
@@ -36097,7 +36619,7 @@ var StepsGuide = defineComponent({
36097
36619
  var _a;
36098
36620
  const app = getCurrentInstance();
36099
36621
  const t = createI18nTranslate("DStepsGuide", app);
36100
- const ns2 = useNamespace("steps-guide");
36622
+ const ns2 = useNamespace$1("steps-guide");
36101
36623
  const stepIndexData = ref((_a = props.stepIndex) != null ? _a : 0);
36102
36624
  const stepIndex = computed({
36103
36625
  set: (val) => {
@@ -36460,7 +36982,7 @@ var Switch = defineComponent({
36460
36982
  props: switchProps,
36461
36983
  emits: ["change", "update:modelValue"],
36462
36984
  setup(props, ctx2) {
36463
- const ns2 = useNamespace("switch");
36985
+ const ns2 = useNamespace$1("switch");
36464
36986
  const {
36465
36987
  toggle,
36466
36988
  checked,
@@ -36598,7 +37120,7 @@ const tableProps = {
36598
37120
  };
36599
37121
  const TABLE_TOKEN = Symbol();
36600
37122
  function useTable(props, tableWidth) {
36601
- const ns2 = useNamespace("table");
37123
+ const ns2 = useNamespace$1("table");
36602
37124
  const classes = computed(() => ({
36603
37125
  [ns2.e("view")]: true,
36604
37126
  [ns2.m("striped")]: props.striped,
@@ -36616,7 +37138,7 @@ function useTable(props, tableWidth) {
36616
37138
  return { classes, styles };
36617
37139
  }
36618
37140
  const useFixedColumn = (column2) => {
36619
- const ns2 = useNamespace("table");
37141
+ const ns2 = useNamespace$1("table");
36620
37142
  const stickyClass = computed(() => ({
36621
37143
  [ns2.e("checkable-cell")]: column2.value.type === "checkable",
36622
37144
  [ns2.m("sticky-cell")]: Boolean(column2.value.fixedLeft) || Boolean(column2.value.fixedRight),
@@ -36709,7 +37231,7 @@ function useTableWatcher(props, store) {
36709
37231
  }, { deep: true });
36710
37232
  }
36711
37233
  function useHorizontalScroll(table2) {
36712
- const ns2 = useNamespace("table");
37234
+ const ns2 = useNamespace$1("table");
36713
37235
  const setScrollViewClass = (position) => {
36714
37236
  const element = table2.vnode.el;
36715
37237
  const className2 = ns2.m(`scroll-${position}`);
@@ -37199,7 +37721,7 @@ var Sort = defineComponent({
37199
37721
  const changeDirection = () => {
37200
37722
  ctx2.emit("sort", directionMap[props.sortDirection || "default"]);
37201
37723
  };
37202
- const ns2 = useNamespace("table");
37724
+ const ns2 = useNamespace$1("table");
37203
37725
  return () => createVNode("span", {
37204
37726
  "onClick": changeDirection,
37205
37727
  "class": ns2.e("sort-clickable")
@@ -37749,7 +38271,7 @@ var body = "";
37749
38271
  var TableHeader = defineComponent({
37750
38272
  name: "DTableHeader",
37751
38273
  setup() {
37752
- const ns2 = useNamespace("table");
38274
+ const ns2 = useNamespace$1("table");
37753
38275
  const {
37754
38276
  headerRows
37755
38277
  } = useHeader();
@@ -37892,7 +38414,7 @@ var TD = defineComponent({
37892
38414
  };
37893
38415
  }
37894
38416
  });
37895
- const ns$3 = useNamespace("table");
38417
+ const ns$3 = useNamespace$1("table");
37896
38418
  function useMergeCell() {
37897
38419
  const table2 = inject(TABLE_TOKEN);
37898
38420
  const { _data: data, _columns: columns } = table2.store.states;
@@ -37999,7 +38521,7 @@ var TableBody = defineComponent({
37999
38521
  flatColumns,
38000
38522
  flatRows
38001
38523
  } = table2.store.states;
38002
- const ns2 = useNamespace("table");
38524
+ const ns2 = useNamespace$1("table");
38003
38525
  const {
38004
38526
  tableSpans,
38005
38527
  removeCells
@@ -38073,7 +38595,7 @@ var FixHeader = defineComponent({
38073
38595
  }
38074
38596
  },
38075
38597
  setup(props) {
38076
- const ns2 = useNamespace("table");
38598
+ const ns2 = useNamespace$1("table");
38077
38599
  const table2 = inject(TABLE_TOKEN, void 0);
38078
38600
  const showHeader = computed(() => Boolean(table2 == null ? void 0 : table2.props.showHeader));
38079
38601
  const {
@@ -38151,7 +38673,7 @@ var Table = defineComponent({
38151
38673
  } = useHorizontalScroll(table2);
38152
38674
  useTableWatcher(props, store);
38153
38675
  const isEmpty2 = computed(() => props.data.length === 0);
38154
- const ns2 = useNamespace("table");
38676
+ const ns2 = useNamespace$1("table");
38155
38677
  const hiddenColumns = ref(null);
38156
38678
  table2.hiddenColumns = hiddenColumns;
38157
38679
  table2.tableRef = tableRef;
@@ -38324,7 +38846,7 @@ const IconClose$1 = () => createVNode("svg", {
38324
38846
  "fill": "#252b3a",
38325
38847
  "d": "M8.75,4 L8.75,7.25 L12,7.25 L12,8.75 L8.749,8.75 L8.75,12 L7.25,12 L7.249,8.75 L4,8.75 L4,7.25 L7.25,7.25 L7.25,4 L8.75,4 Z"
38326
38848
  }, null)])]);
38327
- const ns$2 = useNamespace("table");
38849
+ const ns$2 = useNamespace$1("table");
38328
38850
  const cellMap = {
38329
38851
  checkable: {
38330
38852
  renderHeader(column2, store) {
@@ -38742,7 +39264,7 @@ var TagInput = defineComponent({
38742
39264
  setup(props, ctx2) {
38743
39265
  const app = getCurrentInstance();
38744
39266
  const t = createI18nTranslate("DTagInput", app);
38745
- const ns2 = useNamespace("tag-input");
39267
+ const ns2 = useNamespace$1("tag-input");
38746
39268
  const selectedTags = ref([]);
38747
39269
  watch(() => props.modelValue, () => {
38748
39270
  selectedTags.value = props.modelValue;
@@ -39156,7 +39678,7 @@ var TimePopup = defineComponent({
39156
39678
  setup(props, ctx2) {
39157
39679
  const app = getCurrentInstance();
39158
39680
  const t = createI18nTranslate("DTimePopup", app);
39159
- const ns2 = useNamespace("time-popup");
39681
+ const ns2 = useNamespace$1("time-popup");
39160
39682
  const popupDome = ref();
39161
39683
  const timeListDom = ref();
39162
39684
  const hourList = initializeTimeData("hour");
@@ -39229,7 +39751,7 @@ var TimePicker = defineComponent({
39229
39751
  props: timePickerProps,
39230
39752
  emits: ["change", "update:modelValue"],
39231
39753
  setup(props, ctx2) {
39232
- const ns2 = useNamespace("time-picker");
39754
+ const ns2 = useNamespace$1("time-picker");
39233
39755
  const activeHour = ref("00");
39234
39756
  const activeMinute = ref("00");
39235
39757
  const activeSecond = ref("00");
@@ -39959,7 +40481,7 @@ var transferHeader = defineComponent({
39959
40481
  setup(props, ctx2) {
39960
40482
  const app = getCurrentInstance();
39961
40483
  const t = createI18nTranslate("DTransfer", app);
39962
- const ns2 = useNamespace("transfer");
40484
+ const ns2 = useNamespace$1("transfer");
39963
40485
  const {
39964
40486
  allCheckedChangeHandle
39965
40487
  } = transferHeaderState$1(props, ctx2);
@@ -40175,7 +40697,7 @@ var transferBody = defineComponent({
40175
40697
  setup(props, ctx2) {
40176
40698
  const app = getCurrentInstance();
40177
40699
  const t = createI18nTranslate("DTransferBody", app);
40178
- const ns2 = useNamespace("transfer");
40700
+ const ns2 = useNamespace$1("transfer");
40179
40701
  const {
40180
40702
  bodyHeight,
40181
40703
  query,
@@ -40319,7 +40841,7 @@ var transferPanel = defineComponent({
40319
40841
  setup(props, ctx2) {
40320
40842
  const app = getCurrentInstance();
40321
40843
  const t = createI18nTranslate("DTransfer", app);
40322
- const ns2 = useNamespace("transfer");
40844
+ const ns2 = useNamespace$1("transfer");
40323
40845
  const {
40324
40846
  allChecked,
40325
40847
  allHalfchecked,
@@ -40410,7 +40932,7 @@ var transferOperate = defineComponent({
40410
40932
  },
40411
40933
  props: transferOperateProps,
40412
40934
  setup(props, ctx2) {
40413
- const ns2 = useNamespace("transfer");
40935
+ const ns2 = useNamespace$1("transfer");
40414
40936
  const {
40415
40937
  toTargetHandle,
40416
40938
  toSourceHandle
@@ -40685,7 +41207,7 @@ var Transfer = defineComponent({
40685
41207
  setup(props, ctx2) {
40686
41208
  const app = getCurrentInstance();
40687
41209
  const t = createI18nTranslate("DTransfer", app);
40688
- const ns2 = useNamespace("transfer");
41210
+ const ns2 = useNamespace$1("transfer");
40689
41211
  const {
40690
41212
  sourceTitle,
40691
41213
  targetTitle,
@@ -41096,7 +41618,7 @@ const formatBasicTree = (trees, keyName = "id", childrenName = "children", paren
41096
41618
  return curItem;
41097
41619
  });
41098
41620
  };
41099
- const ns$1 = useNamespace("tree");
41621
+ const ns$1 = useNamespace$1("tree");
41100
41622
  const dropTypeMap = {
41101
41623
  dropPrev: ns$1.em("node", "drop-prev"),
41102
41624
  dropNext: ns$1.em("node", "drop-next"),
@@ -41632,7 +42154,7 @@ function useTree(tree2, plugins = [], context) {
41632
42154
  treeData
41633
42155
  }, pluginMethods), core);
41634
42156
  }
41635
- const ns = useNamespace("tree");
42157
+ const ns = useNamespace$1("tree");
41636
42158
  function useTreeNode(data) {
41637
42159
  const nodeClass = computed(() => {
41638
42160
  var _a;
@@ -41707,7 +42229,7 @@ var DTreeNodeToggle = defineComponent({
41707
42229
  const {
41708
42230
  toggleNode
41709
42231
  } = inject(USE_TREE_TOKEN);
41710
- const ns2 = useNamespace("tree");
42232
+ const ns2 = useNamespace$1("tree");
41711
42233
  return () => {
41712
42234
  var _a;
41713
42235
  return createVNode("span", {
@@ -41733,7 +42255,7 @@ var DTreeNodeLoading = defineComponent({
41733
42255
  setup() {
41734
42256
  const app = getCurrentInstance();
41735
42257
  const t = createI18nTranslate("DTree", app);
41736
- const ns2 = useNamespace("loading-children ");
42258
+ const ns2 = useNamespace$1("loading-children ");
41737
42259
  return () => {
41738
42260
  return createVNode("span", {
41739
42261
  "class": ns2.b()
@@ -41797,7 +42319,7 @@ var DTreeNode = defineComponent({
41797
42319
  onDragend
41798
42320
  } = inject(USE_TREE_TOKEN);
41799
42321
  const treeInstance = inject(TREE_INSTANCE);
41800
- const ns2 = useNamespace("tree");
42322
+ const ns2 = useNamespace$1("tree");
41801
42323
  const {
41802
42324
  nodeClass,
41803
42325
  nodeStyle,
@@ -41929,7 +42451,7 @@ var Tree = defineComponent({
41929
42451
  dragdrop,
41930
42452
  operate
41931
42453
  } = toRefs(props);
41932
- const ns2 = useNamespace("tree");
42454
+ const ns2 = useNamespace$1("tree");
41933
42455
  const normalRef = ref();
41934
42456
  const data = ref(formatBasicTree(props.data));
41935
42457
  const userPlugins = [useSelect$1(), useOperate(), useMergeNodes(), useSearchFilter()];
@@ -42810,10 +43332,10 @@ var Upload = defineComponent({
42810
43332
  limit,
42811
43333
  httpRequest
42812
43334
  } = toRefs(props);
42813
- const ns2 = useNamespace("upload");
42814
- const inputGroupNs = useNamespace("input-group");
42815
- const formControlNs = useNamespace("form-control");
42816
- const inputGroupAddOnNs = useNamespace("input-group-addon");
43335
+ const ns2 = useNamespace$1("upload");
43336
+ const inputGroupNs = useNamespace$1("input-group");
43337
+ const formControlNs = useNamespace$1("form-control");
43338
+ const inputGroupAddOnNs = useNamespace$1("input-group-addon");
42817
43339
  const {
42818
43340
  triggerSelectFiles,
42819
43341
  _validateFiles,
@@ -43199,9 +43721,9 @@ const installs = [
43199
43721
  VirtualListInstall
43200
43722
  ];
43201
43723
  var vueDevui = {
43202
- version: "1.5.8",
43724
+ version: "1.5.10",
43203
43725
  install(app) {
43204
43726
  installs.forEach((p) => app.use(p));
43205
43727
  }
43206
43728
  };
43207
- export { Accordion, ActionTimeline, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, DButton as Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, DCheckboxGroup as CheckboxGroup, CodeEditor, CodeReview, Col, Collapse, CollapseItem, ColorPicker, Column, Comment, Content, Countdown, DChart, DRangeDatePickerPro, DatePicker, DatePickerPro, DraggableDirective, Drawer, DrawerService, Dropdown$1 as Dropdown, DropdownMenu, DroppableDirective, EditableSelect, EditorMd, FixedOverlay, FlexibleOverlay, Footer, Form, FormItem, FormOperation, Fullscreen, Gantt, GitGraph, Header, DIcon as Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, LoadingDirective, loading as LoadingService, MdRender, Mention, Menu, MenuItem, Message, Modal, ModalBody, ModalFooter, ModalHeader, MultiAutoComplete, NavSprite, Notification, NotificationService, Option, OptionGroup, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioButton, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, SplitterPane, Statistic, Status, Step, Steps, StepsGuide, StepsGuideDirective, StickSlider, Sticky, SubMenu, Switch, Tab, Table, Tabs, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, VirtualList, vueDevui as default, fileDropDirective };
43729
+ export { Accordion, ActionTimeline, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, DButton as Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxButton, DCheckboxGroup as CheckboxGroup, CodeEditor, CodeReview, Col, Collapse, CollapseItem, ColorPicker, Column, Comment, Content, Countdown, DChart, DRangeDatePickerPro, DatePicker, DatePickerPro, draggableDirective as DraggableDirective, Drawer, DrawerService, Dropdown$1 as Dropdown, DropdownMenu, droppableDirective as DroppableDirective, EditableSelect, EditorMd, FixedOverlay, FlexibleOverlay, Footer, Form, FormItem, FormOperation, Fullscreen, Gantt, GitGraph, Header, DIcon as Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, LoadingDirective, loading as LoadingService, MdRender, Mention, Menu, MenuItem, Message, Modal, ModalBody, ModalFooter, ModalHeader, MultiAutoComplete, NavSprite, Notification, NotificationService, Option, OptionGroup, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioButton, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, SplitterPane, Statistic, Status, Step, Steps, StepsGuide, StepsGuideDirective, StickSlider, Sticky, SubMenu, Switch, Tab, Table, Tabs, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, VirtualList, vueDevui as default, fileDropDirective };