vue-devui 1.5.9 → 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.
package/vue-devui.es.js CHANGED
@@ -127,7 +127,7 @@ const getRootSlots = () => {
127
127
  const rootComponent = getRootComponent(getCurrentInstance());
128
128
  return rootComponent == null ? void 0 : rootComponent.slots;
129
129
  };
130
- function createBem(namespace, element, modifier) {
130
+ function createBem$1(namespace, element, modifier) {
131
131
  let cls = namespace;
132
132
  if (element) {
133
133
  cls += `__${element}`;
@@ -137,12 +137,12 @@ function createBem(namespace, element, modifier) {
137
137
  }
138
138
  return cls;
139
139
  }
140
- function useNamespace(block, needDot = false) {
140
+ function useNamespace$1(block, needDot = false) {
141
141
  const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
142
- const b = () => createBem(namespace);
143
- const e = (element) => element ? createBem(namespace, element) : "";
144
- const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
145
- 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) : "";
146
146
  return {
147
147
  b,
148
148
  e,
@@ -182,7 +182,7 @@ var DAccordionMenu = defineComponent({
182
182
  titleKey,
183
183
  menuItemTemplate
184
184
  } = toRefs(props);
185
- const ns2 = useNamespace("accordion");
185
+ const ns2 = useNamespace$1("accordion");
186
186
  const rootSlots = getRootSlots();
187
187
  const accordionCtx = inject("accordionContext");
188
188
  const parentValue = parent.value;
@@ -296,7 +296,7 @@ var DAccordionItem = defineComponent({
296
296
  disabledKey,
297
297
  itemTemplate
298
298
  } = toRefs(props);
299
- const ns2 = useNamespace("accordion");
299
+ const ns2 = useNamespace$1("accordion");
300
300
  const rootSlots = getRootSlots();
301
301
  const accordionCtx = inject("accordionContext");
302
302
  const parentValue = parent.value;
@@ -375,7 +375,7 @@ var DAccordionItemHreflink = defineComponent({
375
375
  disabledKey,
376
376
  itemTemplate
377
377
  } = toRefs(props);
378
- const ns2 = useNamespace("accordion");
378
+ const ns2 = useNamespace$1("accordion");
379
379
  const rootSlots = getRootSlots();
380
380
  const accordionCtx = inject("accordionContext");
381
381
  const title = computed(() => {
@@ -466,7 +466,7 @@ var DAccordionItemRouterlink = defineComponent({
466
466
  disabledKey,
467
467
  itemTemplate
468
468
  } = toRefs(props);
469
- const ns2 = useNamespace("accordion");
469
+ const ns2 = useNamespace$1("accordion");
470
470
  const route = useRoute();
471
471
  const rootSlots = getRootSlots();
472
472
  const accordionCtx = inject("accordionContext");
@@ -751,7 +751,7 @@ var AccordionList = defineComponent({
751
751
  noContentTemplate,
752
752
  innerListTemplate
753
753
  } = toRefs(props);
754
- const ns2 = useNamespace("accordion");
754
+ const ns2 = useNamespace$1("accordion");
755
755
  const deepValue = deepth.value;
756
756
  const rootSlots = getRootSlots();
757
757
  const accordionCtx = inject("accordionContext");
@@ -853,8 +853,8 @@ var Accordion = defineComponent({
853
853
  autoOpenActiveMenu,
854
854
  restrictOneOpen
855
855
  } = toRefs(props);
856
- const ns2 = useNamespace("accordion");
857
- const scrollbarNs = useNamespace("scrollbar");
856
+ const ns2 = useNamespace$1("accordion");
857
+ const scrollbarNs = useNamespace$1("scrollbar");
858
858
  let clickActiveItem = void 0;
859
859
  const flatten = (arr, curChildrenKey = "children", includeParent = false, includeLeaf = true) => {
860
860
  return arr.reduce((acc, cur) => {
@@ -1146,6 +1146,175 @@ const AlertCloseIcon = () => createVNode("svg", {
1146
1146
  L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057
1147
1147
  C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z`
1148
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
+ }
1149
1318
  const ns$k = useNamespace("alert");
1150
1319
  const AlertTypeIcon = (props) => createVNode("svg", {
1151
1320
  "width": "16px",
@@ -1295,10 +1464,10 @@ var Alert = defineComponent({
1295
1464
  "type": props.type
1296
1465
  }, null)]) : null, createVNode("div", {
1297
1466
  "class": ns2.e("content")
1298
- }, [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", {
1299
1468
  "class": ns2.e("close-icon"),
1300
1469
  "onClick": close2
1301
- }, [createVNode(AlertCloseIcon, null, null)]) : null])]), [[vShow, !closing.value]])];
1470
+ }, [createVNode(AlertCloseIcon, null, null)]) : null]), [[vShow, !closing.value]])];
1302
1471
  }
1303
1472
  }) : null;
1304
1473
  };
@@ -1469,146 +1638,6 @@ const setActiveLink = (timeId) => {
1469
1638
  }
1470
1639
  };
1471
1640
  const onScroll = throttleAndDebounce(setActiveLink, 300);
1472
- function hasClass(el, className2) {
1473
- if (el.classList) {
1474
- return el.classList.contains(className2);
1475
- }
1476
- const originClass = el.className;
1477
- return ` ${originClass} `.indexOf(` ${className2} `) > -1;
1478
- }
1479
- function addClass(el, className2) {
1480
- if (el.classList) {
1481
- el.classList.add(className2);
1482
- } else {
1483
- if (!hasClass(el, className2)) {
1484
- el.className = `${el.className} ${className2}`;
1485
- }
1486
- }
1487
- }
1488
- function removeClass(el, className2) {
1489
- if (el.classList) {
1490
- el.classList.remove(className2);
1491
- } else {
1492
- if (hasClass(el, className2)) {
1493
- const originClass = el.className;
1494
- el.className = ` ${originClass} `.replace(` ${className2} `, " ");
1495
- }
1496
- }
1497
- }
1498
- const inBrowser = typeof window !== "undefined";
1499
- function debounce(func, wait, immediate) {
1500
- let timer, result2;
1501
- return function(...args) {
1502
- if (timer) {
1503
- clearTimeout(timer);
1504
- }
1505
- if (immediate) {
1506
- const localImmediate = !timer;
1507
- timer = window.setTimeout(() => {
1508
- timer = null;
1509
- }, wait);
1510
- if (localImmediate) {
1511
- result2 = func.apply(this, args);
1512
- }
1513
- } else {
1514
- timer = window.setTimeout(() => {
1515
- func.apply(this, args);
1516
- }, wait);
1517
- }
1518
- return result2;
1519
- };
1520
- }
1521
- function getElement(element) {
1522
- if (element instanceof Element) {
1523
- return element;
1524
- }
1525
- if (element && typeof element === "object" && element.$el instanceof Element) {
1526
- return element.$el;
1527
- }
1528
- return null;
1529
- }
1530
- function lockScroll() {
1531
- if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
1532
- const scrollTop = document.documentElement.scrollTop;
1533
- const style = document.documentElement.getAttribute("style");
1534
- document.documentElement.style.position = "fixed";
1535
- document.documentElement.style.top = `-${scrollTop}px`;
1536
- document.documentElement.style.width = document.documentElement.style.width || "100%";
1537
- document.documentElement.style.overflowY = "scroll";
1538
- return () => {
1539
- if (style) {
1540
- document.documentElement.setAttribute("style", style);
1541
- } else {
1542
- document.documentElement.removeAttribute("style");
1543
- }
1544
- document.documentElement.scrollTop = scrollTop;
1545
- };
1546
- }
1547
- return;
1548
- }
1549
- function getPropsSlot(slots, props, prop = "default") {
1550
- var _a, _b;
1551
- return (_b = props[prop]) != null ? _b : (_a = slots[prop]) == null ? void 0 : _a.call(slots);
1552
- }
1553
- function randomId(n = 8) {
1554
- const str = "abcdefghijklmnopqrstuvwxyz0123456789";
1555
- let result2 = "";
1556
- for (let i = 0; i < n; i++) {
1557
- result2 += str[parseInt((Math.random() * str.length).toString())];
1558
- }
1559
- return result2;
1560
- }
1561
- function toClipboard(text) {
1562
- return new Promise((resolve, reject) => {
1563
- const ele = document.createElement("button");
1564
- const clipboard = new Clipboard(ele, {
1565
- text: () => text,
1566
- action: () => "copy"
1567
- });
1568
- clipboard.on("success", (e) => {
1569
- clipboard.destroy();
1570
- resolve(e);
1571
- });
1572
- clipboard.on("error", (e) => {
1573
- clipboard.destroy();
1574
- reject(e);
1575
- });
1576
- document.body.appendChild(ele);
1577
- ele.click();
1578
- document.body.removeChild(ele);
1579
- });
1580
- }
1581
- function setStyle(element, style) {
1582
- const oldStyle = {};
1583
- const styleKeys = Object.keys(style);
1584
- styleKeys.forEach((key) => {
1585
- oldStyle[key] = element.style[key];
1586
- });
1587
- styleKeys.forEach((key) => {
1588
- element.style[key] = style[key];
1589
- });
1590
- return oldStyle;
1591
- }
1592
- function middleNum(num, min = 0, max = 100) {
1593
- let middle = 0;
1594
- middle = Math.min(num, max);
1595
- middle = Math.max(middle, min);
1596
- return middle;
1597
- }
1598
- const isNumber = (value) => typeof value === "number";
1599
- const isBoolean = (value) => typeof value === "boolean";
1600
- const isString$2 = (value) => typeof value === "string";
1601
- const isFunction$3 = (value) => Object.prototype.toString.call(value) === "[object Function]";
1602
- const isUndefined = (value) => value === void 0;
1603
- const isHTMLElement = (value) => inBrowser && "HTMLElement" in window && value instanceof HTMLElement;
1604
- function omit(obj, fields) {
1605
- const shallowCopy = Object.assign({}, obj);
1606
- for (let i = 0; i < fields.length; i += 1) {
1607
- const key = fields[i];
1608
- delete shallowCopy[key];
1609
- }
1610
- return shallowCopy;
1611
- }
1612
1641
  const cssChange = (mysidebar, postion, top, left) => {
1613
1642
  mysidebar.style.position = postion;
1614
1643
  mysidebar.style.top = top + "px";
@@ -7621,7 +7650,7 @@ var Form = defineComponent({
7621
7650
  props: formProps,
7622
7651
  emits: ["validate"],
7623
7652
  setup(props, ctx2) {
7624
- const ns2 = useNamespace("form");
7653
+ const ns2 = useNamespace$1("form");
7625
7654
  const {
7626
7655
  itemContexts,
7627
7656
  addItemContext,
@@ -7754,7 +7783,7 @@ const FixedOverlay = defineComponent({
7754
7783
  const {
7755
7784
  modelValue
7756
7785
  } = toRefs(props);
7757
- const ns2 = useNamespace("fixed-overlay");
7786
+ const ns2 = useNamespace$1("fixed-overlay");
7758
7787
  const {
7759
7788
  onClick
7760
7789
  } = useFixedOverlay(props, ctx2);
@@ -7920,7 +7949,7 @@ const FlexibleOverlay = defineComponent({
7920
7949
  emit,
7921
7950
  expose
7922
7951
  }) {
7923
- const ns2 = useNamespace("flexible-overlay");
7952
+ const ns2 = useNamespace$1("flexible-overlay");
7924
7953
  const {
7925
7954
  clickEventBubble
7926
7955
  } = toRefs(props);
@@ -7968,7 +7997,7 @@ var OverlayInstall = {
7968
7997
  const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
7969
7998
  const isString$1 = (val) => typeof val === "string";
7970
7999
  const isObject$7 = (val) => val !== null && typeof val === "object";
7971
- const ns$j = useNamespace("popper-trigger");
8000
+ const ns$j = useNamespace$1("popper-trigger");
7972
8001
  function wrapContent(content2) {
7973
8002
  return h("span", { class: ns$j.b() }, content2);
7974
8003
  }
@@ -8155,7 +8184,7 @@ function usePopoverEvent(props, visible, origin) {
8155
8184
  });
8156
8185
  return { placement, handlePositionChange, onMouseenter, onMouseleave };
8157
8186
  }
8158
- const ns$i = useNamespace("popover");
8187
+ const ns$i = useNamespace$1("popover");
8159
8188
  function SuccessIcon$3() {
8160
8189
  return createVNode("svg", {
8161
8190
  "class": [ns$i.e("icon"), ns$i.em("icon", "success")],
@@ -8257,7 +8286,7 @@ var PopoverIcon = defineComponent({
8257
8286
  }
8258
8287
  },
8259
8288
  setup(props) {
8260
- const ns2 = useNamespace("popover");
8289
+ const ns2 = useNamespace$1("popover");
8261
8290
  return () => props.type && props.type !== "default" && createVNode("span", {
8262
8291
  "class": ns2.e("icon-wrap")
8263
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)]);
@@ -8294,7 +8323,7 @@ var Popover = defineComponent({
8294
8323
  const {
8295
8324
  overlayStyles
8296
8325
  } = usePopover(props, visible, placement, origin, popoverRef);
8297
- const ns2 = useNamespace("popover");
8326
+ const ns2 = useNamespace$1("popover");
8298
8327
  provide(POPPER_TRIGGER_TOKEN, origin);
8299
8328
  watch(visible, (newVal) => {
8300
8329
  if (newVal) {
@@ -8427,7 +8456,7 @@ function useFormLabel() {
8427
8456
  const formContext = inject(FORM_TOKEN);
8428
8457
  const formItemContext = inject(FORM_ITEM_TOKEN);
8429
8458
  const labelData = inject(LABEL_DATA);
8430
- const ns2 = useNamespace("form");
8459
+ const ns2 = useNamespace$1("form");
8431
8460
  const labelClasses = computed(() => ({
8432
8461
  [`${ns2.e("label")}`]: true,
8433
8462
  [`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
@@ -8446,7 +8475,7 @@ var FormLabel = defineComponent({
8446
8475
  name: "DFormLabel",
8447
8476
  props: formLabelProps,
8448
8477
  setup(props, ctx2) {
8449
- const ns2 = useNamespace("form");
8478
+ const ns2 = useNamespace$1("form");
8450
8479
  const {
8451
8480
  labelClasses,
8452
8481
  labelInnerClasses
@@ -8489,7 +8518,7 @@ var PopoverInstall = {
8489
8518
  };
8490
8519
  function useFormControl(props) {
8491
8520
  const labelData = inject(LABEL_DATA);
8492
- const ns2 = useNamespace("form");
8521
+ const ns2 = useNamespace$1("form");
8493
8522
  const { feedbackStatus } = toRefs(props);
8494
8523
  const controlClasses = computed(() => ({
8495
8524
  [ns2.e("control")]: true,
@@ -8519,7 +8548,7 @@ var FormControl = defineComponent({
8519
8548
  props: formControlProps,
8520
8549
  setup(props, ctx2) {
8521
8550
  const formControl2 = ref();
8522
- const ns2 = useNamespace("form");
8551
+ const ns2 = useNamespace$1("form");
8523
8552
  const {
8524
8553
  controlClasses,
8525
8554
  controlContainerClasses
@@ -9573,7 +9602,7 @@ function getFieldValue(obj, path) {
9573
9602
  }
9574
9603
  function useFormItem(messageType, _rules, validateState) {
9575
9604
  const formContext = inject(FORM_TOKEN);
9576
- const ns2 = useNamespace("form");
9605
+ const ns2 = useNamespace$1("form");
9577
9606
  const itemClasses = computed(() => ({
9578
9607
  [`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
9579
9608
  [`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
@@ -9815,15 +9844,15 @@ var FormInstall = {
9815
9844
  };
9816
9845
  function useAutoCompleteRender(props, ctx2, visible, isFocus, isDisabled, autoCompleteSize) {
9817
9846
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9818
- const ns2 = useNamespace("auto-complete");
9819
- const inputNs = useNamespace("auto-complete-input");
9820
- const slotNs = useNamespace("auto-complete-slot");
9821
- const formNs = useNamespace("form-group");
9822
- const feedbackNs = useNamespace("has-feedback");
9823
- const selectNs = useNamespace("select-open");
9824
- const formControlNs = useNamespace("form-control");
9825
- const dropdownNs = useNamespace("dropdown-origin");
9826
- 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");
9827
9856
  const slots = ctx2.slots;
9828
9857
  const isValidatorError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
9829
9858
  const autoCompleteTopClasses = computed(() => ({
@@ -9927,7 +9956,7 @@ var Loading = defineComponent({
9927
9956
  message: message2,
9928
9957
  $slots
9929
9958
  } = this;
9930
- const ns2 = useNamespace("loading");
9959
+ const ns2 = useNamespace$1("loading");
9931
9960
  return isShow && createVNode("div", {
9932
9961
  "class": [ns2.b(), isFull ? ns2.m("full") : ""]
9933
9962
  }, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
@@ -10095,10 +10124,10 @@ var DAutoCompleteDropdown = defineComponent({
10095
10124
  disabledKey,
10096
10125
  isSearching
10097
10126
  } = propsData.props;
10098
- const ns2 = useNamespace("auto-complete");
10099
- const noDataNs = useNamespace("no-data-tip");
10100
- const dropdownMenuNs = useNamespace("dropdown-menu");
10101
- 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");
10102
10131
  const onSelect = (item) => {
10103
10132
  item = valueParser.value(item);
10104
10133
  if (typeof item === "object" && item[disabledKey]) {
@@ -10267,7 +10296,7 @@ var svgIcon = defineComponent({
10267
10296
  color: color2,
10268
10297
  size
10269
10298
  } = toRefs(props);
10270
- const ns2 = useNamespace("svg-icon");
10299
+ const ns2 = useNamespace$1("svg-icon");
10271
10300
  const iconName = computed(() => `#icon-${name.value}`);
10272
10301
  const iconSize = computed(() => {
10273
10302
  return typeof size.value === "number" ? `${size.value}px` : size.value;
@@ -10287,12 +10316,6 @@ var svgIcon = defineComponent({
10287
10316
  };
10288
10317
  }
10289
10318
  });
10290
- function isUrl(value) {
10291
- return /^((http|https):)?\/\//.test(value);
10292
- }
10293
- function isBase64(value) {
10294
- return /^data:image\/.*;base64,/.test(value);
10295
- }
10296
10319
  function useIconDom(props, ctx2) {
10297
10320
  const {
10298
10321
  component,
@@ -10302,7 +10325,7 @@ function useIconDom(props, ctx2) {
10302
10325
  classPrefix,
10303
10326
  rotate
10304
10327
  } = toRefs(props);
10305
- const ns2 = useNamespace("icon");
10328
+ const ns2 = useNamespace$1("icon");
10306
10329
  const iconSize = computed(() => {
10307
10330
  return typeof size.value === "number" ? `${size.value}px` : size.value;
10308
10331
  });
@@ -10360,7 +10383,7 @@ var DIcon = defineComponent({
10360
10383
  const {
10361
10384
  iconDom
10362
10385
  } = useIconDom(props, ctx2);
10363
- const ns2 = useNamespace("icon");
10386
+ const ns2 = useNamespace$1("icon");
10364
10387
  const wrapClassed = computed(() => ({
10365
10388
  [ns2.e("container")]: true,
10366
10389
  [ns2.m("disabled")]: disabled.value,
@@ -10386,7 +10409,7 @@ var iconGroup = "";
10386
10409
  var IconGroup = defineComponent({
10387
10410
  name: "DIconGroup",
10388
10411
  setup(_, ctx2) {
10389
- const ns2 = useNamespace("icon-group");
10412
+ const ns2 = useNamespace$1("icon-group");
10390
10413
  return () => {
10391
10414
  var _a, _b;
10392
10415
  return createVNode("div", {
@@ -10434,8 +10457,8 @@ var AutoComplete = defineComponent({
10434
10457
  valueParser,
10435
10458
  placeholder
10436
10459
  } = toRefs(props);
10437
- const ns2 = useNamespace("auto-complete");
10438
- const inputNs = useNamespace("auto-complete-input");
10460
+ const ns2 = useNamespace$1("auto-complete");
10461
+ const inputNs = useNamespace$1("auto-complete-input");
10439
10462
  const isDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || disabled.value);
10440
10463
  const autoCompleteSize = computed(() => (formContext == null ? void 0 : formContext.size) || props.size);
10441
10464
  const {
@@ -10834,7 +10857,7 @@ var Avatar = defineComponent({
10834
10857
  const code = ref(1);
10835
10858
  const nameDisplay = ref();
10836
10859
  const ns2 = useNamespace("avatar");
10837
- const styleNS = ns2.e("style");
10860
+ const styleNS = ns2.m("style");
10838
10861
  const bgNS = computed(() => {
10839
10862
  return ns2.m(`${"background-" + code.value}`);
10840
10863
  });
@@ -10845,7 +10868,7 @@ var Avatar = defineComponent({
10845
10868
  } else if (gender.value.toLowerCase() === "female") {
10846
10869
  code.value = 0;
10847
10870
  } else {
10848
- console.warn('gender must be "Male" or "Female"');
10871
+ throw new Error('gender must be "Male" or "Female"');
10849
10872
  }
10850
10873
  return;
10851
10874
  }
@@ -10915,7 +10938,7 @@ var Avatar = defineComponent({
10915
10938
  }, null);
10916
10939
  const hasImgSrc = imgSrc.value && !isErrorImg.value ? imgElement : null;
10917
10940
  const nameElement = createVNode("span", {
10918
- "class": [styleNS, bgNS.value],
10941
+ "class": `${styleNS} ${bgNS.value}`,
10919
10942
  "style": {
10920
10943
  height: `${height.value}px`,
10921
10944
  width: `${width.value}px`,
@@ -11039,7 +11062,7 @@ var BackTop = defineComponent({
11039
11062
  setup(props, ctx2) {
11040
11063
  const slots = ctx2.slots;
11041
11064
  const backTopRef = ref(null);
11042
- const ns2 = useNamespace("back-top");
11065
+ const ns2 = useNamespace$1("back-top");
11043
11066
  const position = usePosition(props);
11044
11067
  const isVisible = useVisibility(props, backTopRef);
11045
11068
  const scrollToTop = (e) => {
@@ -11422,7 +11445,7 @@ var Dropdown$1 = defineComponent({
11422
11445
  const id = `dropdown_${dropdownId++}`;
11423
11446
  const isOpen = ref(false);
11424
11447
  const currentPosition = ref("bottom");
11425
- const ns2 = useNamespace("dropdown");
11448
+ const ns2 = useNamespace$1("dropdown");
11426
11449
  provide(POPPER_TRIGGER_TOKEN, origin);
11427
11450
  useDropdownEvent({
11428
11451
  id,
@@ -11498,7 +11521,7 @@ var BreadcrumbItem = defineComponent({
11498
11521
  }) {
11499
11522
  var _a;
11500
11523
  const separatorIcon = inject("separatorIcon");
11501
- const ns2 = useNamespace("breadcrumb");
11524
+ const ns2 = useNamespace$1("breadcrumb");
11502
11525
  const linkClass = props.to ? "is-link" : "";
11503
11526
  const dropdownTitleClass = props.showMenu && ((_a = props.menuList) == null ? void 0 : _a.length) ? ns2.e("dropdown-title") : "";
11504
11527
  const link = ref(null);
@@ -11583,7 +11606,7 @@ var Breadcrumb = defineComponent({
11583
11606
  var _a;
11584
11607
  const separatorIcon = (_a = getPropsSlot(slots, props, "separatorIcon")) != null ? _a : "/";
11585
11608
  provide("separatorIcon", separatorIcon);
11586
- const ns2 = useNamespace("breadcrumb");
11609
+ const ns2 = useNamespace$1("breadcrumb");
11587
11610
  const renderBreadcrumbItemRouted = (item) => {
11588
11611
  return createVNode(resolveComponent("d-breadcrumb-item"), {
11589
11612
  "to": `path: ${item.link}`,
@@ -11674,7 +11697,7 @@ const buttonGroupProps = {
11674
11697
  };
11675
11698
  const buttonGroupInjectionKey = Symbol("d-button-group");
11676
11699
  function useButton(props, ctx2) {
11677
- const ns2 = useNamespace("button");
11700
+ const ns2 = useNamespace$1("button");
11678
11701
  const hasContent = computed(() => ctx2.slots.default);
11679
11702
  const colorMap = {
11680
11703
  solid: "primary",
@@ -11763,7 +11786,7 @@ var ButtonGroup = defineComponent({
11763
11786
  setup(props, {
11764
11787
  slots
11765
11788
  }) {
11766
- const ns2 = useNamespace("button-group");
11789
+ const ns2 = useNamespace$1("button-group");
11767
11790
  provide(buttonGroupInjectionKey, {
11768
11791
  size: toRef(props, "size")
11769
11792
  });
@@ -11808,7 +11831,7 @@ var Card = defineComponent({
11808
11831
  align,
11809
11832
  src
11810
11833
  } = toRefs(props);
11811
- const ns2 = useNamespace("card");
11834
+ const ns2 = useNamespace$1("card");
11812
11835
  const alignClass = computed(() => {
11813
11836
  return {
11814
11837
  [ns2.e("actions")]: true,
@@ -12098,7 +12121,7 @@ var CarouselInstall = {
12098
12121
  app.component(CarouselItem.name, CarouselItem);
12099
12122
  }
12100
12123
  };
12101
- const ns$h = useNamespace("cascader");
12124
+ const ns$h = useNamespace$1("cascader");
12102
12125
  const useRootClassName = (props, menuShow) => {
12103
12126
  return computed(() => ({
12104
12127
  [`${ns$h.b()} ${ns$h.e("dropdown")} ${ns$h.em("dropdown", "animation")}`]: true,
@@ -12648,7 +12671,7 @@ var Checkbox = defineComponent({
12648
12671
  props: checkboxProps,
12649
12672
  emits: ["change", "update:checked", "update:modelValue"],
12650
12673
  setup(props, ctx2) {
12651
- const ns2 = useNamespace("checkbox");
12674
+ const ns2 = useNamespace$1("checkbox");
12652
12675
  const {
12653
12676
  mergedChecked,
12654
12677
  mergedDisabled,
@@ -12749,7 +12772,7 @@ var DCheckboxGroup = defineComponent({
12749
12772
  props: checkboxGroupProps,
12750
12773
  emits: ["change", "update:modelValue"],
12751
12774
  setup(props, ctx2) {
12752
- const ns2 = useNamespace("checkbox");
12775
+ const ns2 = useNamespace$1("checkbox");
12753
12776
  const {
12754
12777
  defaultOpt
12755
12778
  } = useCheckboxGroup(props, ctx2);
@@ -12795,7 +12818,7 @@ var CheckboxButton = defineComponent({
12795
12818
  props: checkboxProps,
12796
12819
  emits: ["change", "update:checked", "update:modelValue"],
12797
12820
  setup(props, ctx2) {
12798
- const ns2 = useNamespace("checkbox-button");
12821
+ const ns2 = useNamespace$1("checkbox-button");
12799
12822
  const {
12800
12823
  mergedChecked,
12801
12824
  mergedDisabled,
@@ -13371,8 +13394,8 @@ function useInputRender$1(props, ctx2) {
13371
13394
  const formContext = inject(FORM_TOKEN, void 0);
13372
13395
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
13373
13396
  const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
13374
- const ns2 = useNamespace("input");
13375
- const slotNs = useNamespace("input-slot");
13397
+ const ns2 = useNamespace$1("input");
13398
+ const slotNs = useNamespace$1("input-slot");
13376
13399
  const isFocus = ref(false);
13377
13400
  const { error: error2, size, disabled } = toRefs(props);
13378
13401
  const slots = ctx2.slots;
@@ -13458,8 +13481,8 @@ var DInput = defineComponent({
13458
13481
  const {
13459
13482
  modelValue
13460
13483
  } = toRefs(props);
13461
- const ns2 = useNamespace("input");
13462
- const slotNs = useNamespace("input-slot");
13484
+ const ns2 = useNamespace$1("input");
13485
+ const slotNs = useNamespace$1("input-slot");
13463
13486
  const {
13464
13487
  inputDisabled,
13465
13488
  inputSize,
@@ -13561,7 +13584,7 @@ var Cascader = defineComponent({
13561
13584
  props: cascaderProps,
13562
13585
  emits: ["update:modelValue", "change", "focus", "blur"],
13563
13586
  setup(props, ctx2) {
13564
- const ns2 = useNamespace("cascader");
13587
+ const ns2 = useNamespace$1("cascader");
13565
13588
  const {
13566
13589
  origin,
13567
13590
  overlayRef,
@@ -14255,15 +14278,27 @@ const codeReviewProps = {
14255
14278
  type: Boolean,
14256
14279
  default: false
14257
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
+ },
14258
14293
  outputFormat: {
14259
14294
  type: String,
14260
14295
  default: "line-by-line"
14261
14296
  },
14262
- expandAllThreshold: {
14297
+ expandThreshold: {
14263
14298
  type: Number,
14264
14299
  default: 50
14265
14300
  },
14266
- codeLoader: {
14301
+ expandLoader: {
14267
14302
  type: Function
14268
14303
  }
14269
14304
  };
@@ -14281,7 +14316,7 @@ var CodeReviewHeader = defineComponent({
14281
14316
  name: "DCodeReviewHeader",
14282
14317
  emits: ["click"],
14283
14318
  setup(_, ctx2) {
14284
- const ns2 = useNamespace("code-review");
14319
+ const ns2 = useNamespace$1("code-review");
14285
14320
  const {
14286
14321
  diffInfo,
14287
14322
  isFold,
@@ -14336,25 +14371,98 @@ var CodeReviewHeader = defineComponent({
14336
14371
  });
14337
14372
  const ExpandLineReg = /^@@ -(\d+),(\d+) \+(\d+),(\d+) @@/;
14338
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
+ };
14339
14411
  function notEmptyNode(node) {
14340
14412
  const classes = node.classList;
14341
14413
  return !classes.contains("d2h-info") && !classes.contains("d2h-emptyplaceholder") && !classes.contains("comment-cell");
14342
14414
  }
14343
14415
  function insertIncrementLineToPage(referenceDom, trNodes, direction) {
14344
- const trNodesToBeInserted = trNodes.filter((element) => element.children[0].children.length === 2);
14345
14416
  if (direction === "up") {
14346
14417
  const nextSibling = referenceDom.nextElementSibling;
14347
- trNodesToBeInserted.forEach((item) => {
14418
+ trNodes.forEach((item) => {
14348
14419
  var _a;
14349
14420
  (_a = referenceDom.parentNode) == null ? void 0 : _a.insertBefore(item, nextSibling);
14350
14421
  });
14351
14422
  } else {
14352
- trNodesToBeInserted.forEach((item) => {
14423
+ trNodes.forEach((item) => {
14353
14424
  var _a;
14354
14425
  (_a = referenceDom.parentNode) == null ? void 0 : _a.insertBefore(item, referenceDom);
14355
14426
  });
14356
14427
  }
14357
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
+ }
14358
14466
  function ifRemoveExpandLine(expandDom, newExpandDom, direction) {
14359
14467
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
14360
14468
  const matches2 = newExpandDom.children[1].innerText.trim().match(ExpandLineReg);
@@ -14381,11 +14489,13 @@ function ifRemoveExpandLine(expandDom, newExpandDom, direction) {
14381
14489
  }
14382
14490
  } else {
14383
14491
  const nextSibling = expandDom.nextElementSibling;
14384
- 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);
14385
- 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);
14386
- if (leftLineNumber + addedLine === nextLeftLineNumber && rightLineNumber + addedLine === nextRightLineNumber) {
14387
- expandDom.remove();
14388
- return true;
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
+ }
14389
14499
  }
14390
14500
  }
14391
14501
  return false;
@@ -14401,14 +14511,33 @@ function updateExpandLineCount(expandDom, newExpandDom) {
14401
14511
  expandDom.children[1].children[0].innerText = `@@ -${(newMatches == null ? void 0 : newMatches[1]) || 0},${newChangedNumLeft} +${(newMatches == null ? void 0 : newMatches[3]) || 0},${newChangedNumRight} @@`;
14402
14512
  }
14403
14513
  function parseDiffCode(container, code, outputFormat) {
14514
+ var _a;
14404
14515
  const diff2HtmlUi = new Diff2HtmlUI(container, code, {
14405
14516
  drawFileList: false,
14406
14517
  matching: "lines",
14407
14518
  outputFormat,
14408
- highlight: true
14519
+ highlight: true,
14520
+ rawTemplates: TemplateMap[outputFormat]
14409
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
+ }
14410
14540
  diff2HtmlUi.draw();
14411
- diff2HtmlUi.highlightCode();
14412
14541
  }
14413
14542
  function setLineNumberInDataset(trNode, prevL, prevR, nextL, nextR) {
14414
14543
  if (trNode) {
@@ -14425,7 +14554,40 @@ function updateExpandUpDownButton(trNode) {
14425
14554
  trNode.children[0].children[0].classList.add("all-expand");
14426
14555
  trNode.children[0].children[0].innerHTML = AllExpandIcon();
14427
14556
  }
14428
- function updateLineNumberInDataset(trNode, expandAllThreshold, position, updateExpandButton = false) {
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) {
14429
14591
  let nextL;
14430
14592
  let prevL;
14431
14593
  let nextR;
@@ -14433,15 +14595,15 @@ function updateLineNumberInDataset(trNode, expandAllThreshold, position, updateE
14433
14595
  if (position === "top") {
14434
14596
  const nextLineNode = trNode.nextElementSibling;
14435
14597
  nextL = parseInt(nextLineNode.children[0].children[0].innerText) - 1;
14436
- prevL = Math.max(nextL - expandAllThreshold + 1, 1);
14598
+ prevL = Math.max(nextL - expandThreshold + 1, 1);
14437
14599
  nextR = parseInt(nextLineNode.children[0].children[1].innerText) - 1;
14438
- prevR = Math.max(nextR - expandAllThreshold + 1, 1);
14600
+ prevR = Math.max(nextR - expandThreshold + 1, 1);
14439
14601
  } else if (position === "bottom") {
14440
14602
  const prevLineNode = trNode.previousElementSibling;
14441
14603
  prevL = parseInt(prevLineNode.children[0].children[0].innerText) + 1;
14442
- nextL = prevL + expandAllThreshold - 1;
14604
+ nextL = prevL + expandThreshold - 1;
14443
14605
  prevR = parseInt(prevLineNode.children[0].children[1].innerText) + 1;
14444
- nextR = prevR + expandAllThreshold - 1;
14606
+ nextR = prevR + expandThreshold - 1;
14445
14607
  } else {
14446
14608
  const prevLineNode = trNode.previousElementSibling;
14447
14609
  const nextLineNode = trNode.nextElementSibling;
@@ -14451,14 +14613,14 @@ function updateLineNumberInDataset(trNode, expandAllThreshold, position, updateE
14451
14613
  prevR = parseInt(prevLineNode.children[0].children[1].innerText) + 1;
14452
14614
  nextL = nextLineNumber - 1;
14453
14615
  nextR = parseInt(nextLineNode.children[0].children[1].innerText) - 1;
14454
- const isExpandAll = nextLineNumber - prevLineNumber <= expandAllThreshold;
14616
+ const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold;
14455
14617
  if (isExpandAll && updateExpandButton) {
14456
14618
  updateExpandUpDownButton(trNode);
14457
14619
  }
14458
14620
  }
14459
14621
  setLineNumberInDataset(trNode, prevL, prevR, nextL, nextR);
14460
14622
  }
14461
- function getLineNumberFormDataset(expandDom, expandAllThreshold) {
14623
+ function getLineNumberFromDataset(expandDom, expandThreshold) {
14462
14624
  var _a, _b, _c;
14463
14625
  const attrsMap = (_b = (_a = expandDom.parentElement) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.dataset;
14464
14626
  const prevL = Number(attrsMap == null ? void 0 : attrsMap.prevL);
@@ -14471,14 +14633,14 @@ function getLineNumberFormDataset(expandDom, expandAllThreshold) {
14471
14633
  const direction = (_c = buttonClasses.find((item) => item.endsWith("expand"))) == null ? void 0 : _c.split("-")[0];
14472
14634
  if (direction === "up") {
14473
14635
  leftLineEnd = nextL;
14474
- leftLineStart = Math.max(leftLineEnd - expandAllThreshold + 1, prevL);
14636
+ leftLineStart = Math.max(leftLineEnd - expandThreshold + 1, prevL);
14475
14637
  rightLineEnd = nextR;
14476
- rightLineStart = Math.max(rightLineEnd - expandAllThreshold + 1, prevR);
14638
+ rightLineStart = Math.max(rightLineEnd - expandThreshold + 1, prevR);
14477
14639
  } else if (direction === "down") {
14478
14640
  leftLineStart = prevL;
14479
- leftLineEnd = Math.min(leftLineStart + expandAllThreshold - 1, nextL);
14641
+ leftLineEnd = Math.min(leftLineStart + expandThreshold - 1, nextL);
14480
14642
  rightLineStart = prevR;
14481
- rightLineEnd = Math.min(rightLineStart + expandAllThreshold - 1, nextR);
14643
+ rightLineEnd = Math.min(rightLineStart + expandThreshold - 1, nextR);
14482
14644
  } else {
14483
14645
  leftLineStart = prevL;
14484
14646
  leftLineEnd = nextL;
@@ -14522,7 +14684,7 @@ function attachExpandUpDownButton(parentNode, direction) {
14522
14684
  addExpandButton(parentNode, expandDirectionMap[direction], (_a = expandDirectionIconMap[direction]) == null ? void 0 : _a.call(expandDirectionIconMap));
14523
14685
  }
14524
14686
  }
14525
- function addCommentToPage(lineHost, commentDom, lineSide) {
14687
+ function addCommentToPageForSingleColumn(lineHost, commentDom, lineSide) {
14526
14688
  var _a, _b;
14527
14689
  const newLine = document.createElement("tr");
14528
14690
  const newCell = document.createElement("td");
@@ -14539,42 +14701,145 @@ function addCommentToPage(lineHost, commentDom, lineSide) {
14539
14701
  (_b = lineHost.parentElement) == null ? void 0 : _b.appendChild(newLine);
14540
14702
  }
14541
14703
  }
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
+ }
14542
14770
  function useCodeReviewExpand(reviewContentRef, props) {
14543
- const { outputFormat, expandAllThreshold, codeLoader } = toRefs(props);
14771
+ const { outputFormat, expandThreshold, expandLoader } = toRefs(props);
14544
14772
  const processSideBySide = () => {
14545
- const [leftTable, rightTable] = reviewContentRef.value.querySelectorAll("table");
14546
- const trNodes = Array.from(leftTable.querySelectorAll("tr"));
14773
+ var _a;
14774
+ const trNodes = Array.from(reviewContentRef.value.querySelectorAll("tr"));
14547
14775
  const totalLines = trNodes.length;
14548
14776
  for (const index2 in trNodes) {
14549
14777
  const lineIndex = parseInt(index2);
14550
14778
  const lineChildren = Array.from(trNodes[lineIndex].children);
14551
14779
  const lineNumberBox = lineChildren[0];
14552
14780
  const lineContentBox = lineChildren[1];
14553
- const lineClassList = lineContentBox.classList.value;
14554
- const lineContent = lineContentBox.innerText.trim();
14555
- 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")) {
14556
14784
  const nextLineIndex = lineIndex + 1;
14557
14785
  const prevLineIndex = lineIndex - 1;
14558
14786
  if (lineIndex === 0 && nextLineIndex in trNodes) {
14787
+ updateLineNumberInDatasetForDoubleColumn(trNodes[lineIndex], expandThreshold.value, "top");
14559
14788
  attachExpandUpDownButton(lineNumberBox, "up");
14560
14789
  } else if (lineIndex > 0 && lineIndex < totalLines - 1 && nextLineIndex in trNodes && prevLineIndex in trNodes) {
14561
- const preLineChildren = Array.from(trNodes[prevLineIndex].children);
14562
- const nextLineChildren = Array.from(trNodes[nextLineIndex].children);
14563
- const isExpandAll = parseInt(nextLineChildren[0].innerText) - parseInt(preLineChildren[0].innerText) - 1 < expandAllThreshold.value;
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");
14564
14794
  attachExpandUpDownButton(lineNumberBox, isExpandAll ? "all" : "updown");
14565
14795
  }
14566
14796
  }
14567
14797
  }
14568
- const endLine = trNodes[0].cloneNode(true);
14569
- if (Object.prototype.hasOwnProperty.call(endLine.children[0].children, 0)) {
14570
- 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
+ }
14571
14842
  }
14572
- endLine.children[1].innerText = "";
14573
- const leftEndLine = endLine.cloneNode(true);
14574
- const rightEndLint = endLine.cloneNode(true);
14575
- attachExpandUpDownButton(leftEndLine.children[0], "down");
14576
- leftTable.tBodies[0].appendChild(leftEndLine);
14577
- rightTable.tBodies[0].appendChild(rightEndLint);
14578
14843
  };
14579
14844
  const processLineByLine = () => {
14580
14845
  var _a;
@@ -14594,15 +14859,15 @@ function useCodeReviewExpand(reviewContentRef, props) {
14594
14859
  const nextLineIndex = lineIndex + 1;
14595
14860
  const prevLineIndex = lineIndex - 1;
14596
14861
  if (lineIndex === 0 && nextLineIndex in trNodes) {
14597
- updateLineNumberInDataset(trNodes[lineIndex], expandAllThreshold.value, "top");
14862
+ updateLineNumberInDataset(trNodes[lineIndex], expandThreshold.value, "top");
14598
14863
  attachExpandUpDownButton(lineNumberBox, "up");
14599
14864
  } else if (lineIndex > 0 && lineIndex < totalLines - 1 && nextLineIndex in trNodes && prevLineIndex in trNodes) {
14600
14865
  const prevTdNodes = Array.from(trNodes[prevLineIndex].children);
14601
14866
  const prevLineNumber = parseInt(prevTdNodes[0].children[0].innerText);
14602
14867
  const nextTdNodes = Array.from(trNodes[nextLineIndex].children);
14603
14868
  const nextLineNumber = parseInt(nextTdNodes[0].children[0].innerText);
14604
- updateLineNumberInDataset(trNodes[lineIndex], expandAllThreshold.value, "middle");
14605
- const isExpandAll = nextLineNumber - prevLineNumber <= expandAllThreshold.value;
14869
+ updateLineNumberInDataset(trNodes[lineIndex], expandThreshold.value, "middle");
14870
+ const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold.value;
14606
14871
  attachExpandUpDownButton(lineNumberBox, isExpandAll ? "all" : "updown");
14607
14872
  }
14608
14873
  }
@@ -14611,7 +14876,7 @@ function useCodeReviewExpand(reviewContentRef, props) {
14611
14876
  loadMoreLine.children[0].removeChild(loadMoreLine.children[0].children[0]);
14612
14877
  loadMoreLine.children[1].innerText = "";
14613
14878
  (_a = trNodes[0].parentElement) == null ? void 0 : _a.appendChild(loadMoreLine);
14614
- updateLineNumberInDataset(loadMoreLine, expandAllThreshold.value, "bottom");
14879
+ updateLineNumberInDataset(loadMoreLine, expandThreshold.value, "bottom");
14615
14880
  attachExpandUpDownButton(loadMoreLine.children[0], "down");
14616
14881
  };
14617
14882
  const insertIncrementCode = (code, direction, referenceDom) => {
@@ -14632,7 +14897,8 @@ function useCodeReviewExpand(reviewContentRef, props) {
14632
14897
  if (!expandLine) {
14633
14898
  return;
14634
14899
  }
14635
- insertIncrementLineToPage(referenceDom, trNodes, direction);
14900
+ const trNodesToBeInserted = trNodes.filter((element) => element.children[0].children.length === 2);
14901
+ insertIncrementLineToPage(referenceDom, trNodesToBeInserted, direction);
14636
14902
  const removedExpandLine = ifRemoveExpandLine(referenceDom, expandLine, direction);
14637
14903
  if (removedExpandLine) {
14638
14904
  return;
@@ -14640,15 +14906,15 @@ function useCodeReviewExpand(reviewContentRef, props) {
14640
14906
  updateExpandLineCount(referenceDom, expandLine);
14641
14907
  if (direction === "up") {
14642
14908
  if (!referenceDom.previousElementSibling) {
14643
- updateLineNumberInDataset(referenceDom, expandAllThreshold.value, "top");
14909
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "top");
14644
14910
  } else {
14645
- updateLineNumberInDataset(referenceDom, expandAllThreshold.value, "middle", true);
14911
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "middle", true);
14646
14912
  }
14647
14913
  } else {
14648
14914
  if (referenceDom.nextElementSibling) {
14649
- updateLineNumberInDataset(referenceDom, expandAllThreshold.value, "middle", true);
14915
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "middle", true);
14650
14916
  } else {
14651
- updateLineNumberInDataset(referenceDom, expandAllThreshold.value, "bottom");
14917
+ updateLineNumberInDataset(referenceDom, expandThreshold.value, "bottom");
14652
14918
  }
14653
14919
  }
14654
14920
  };
@@ -14662,10 +14928,10 @@ function useCodeReviewExpand(reviewContentRef, props) {
14662
14928
  if (expandIconDom) {
14663
14929
  const expandDirection = (_a = Array.from(expandIconDom.classList).find((item) => item.endsWith("expand"))) == null ? void 0 : _a.split("-")[0];
14664
14930
  const direction = expandDirection === "up" || expandDirection === "all" ? "up" : "down";
14665
- const [leftLineStart, leftLineEnd, rightLineStart, rightLineEnd] = getLineNumberFormDataset(expandIconDom, expandAllThreshold.value);
14666
- (_b = codeLoader == null ? void 0 : codeLoader.value) == null ? void 0 : _b.call(codeLoader, [leftLineStart, leftLineEnd, rightLineStart, rightLineEnd], (code) => {
14667
- var _a2;
14668
- insertIncrementCode(code, direction, (_a2 = expandIconDom.parentElement) == null ? void 0 : _a2.parentElement);
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);
14669
14935
  });
14670
14936
  }
14671
14937
  };
@@ -14675,7 +14941,7 @@ function useCodeReviewExpand(reviewContentRef, props) {
14675
14941
  return { insertExpandButton, onExpandButtonClick };
14676
14942
  }
14677
14943
  function useCodeReview(props, ctx2) {
14678
- const { diff, outputFormat } = toRefs(props);
14944
+ const { diff, outputFormat, allowExpand, showBlob } = toRefs(props);
14679
14945
  const renderHtml = ref("");
14680
14946
  const reviewContentRef = ref();
14681
14947
  const diffFile = ref([]);
@@ -14683,14 +14949,18 @@ function useCodeReview(props, ctx2) {
14683
14949
  const initDiffContent = () => {
14684
14950
  diffFile.value = Diff2Html.parse(diff.value);
14685
14951
  nextTick(() => {
14686
- parseDiffCode(reviewContentRef.value, diff.value, outputFormat.value);
14687
- insertExpandButton();
14688
- ctx2.emit("contentRefresh", JSON.parse(JSON.stringify(diffFile.value)));
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
+ }
14689
14957
  });
14690
14958
  };
14691
14959
  const onContentClick = (e) => {
14692
14960
  onExpandButtonClick(e);
14693
14961
  };
14962
+ watch(showBlob, initDiffContent);
14963
+ watch(outputFormat, initDiffContent);
14694
14964
  watch(diff, initDiffContent, { immediate: true });
14695
14965
  return { renderHtml, reviewContentRef, diffFile, onContentClick };
14696
14966
  }
@@ -14712,35 +14982,81 @@ function useCodeReviewFold(props, ctx2) {
14712
14982
  });
14713
14983
  return { isFold, toggleFold };
14714
14984
  }
14715
- function useCodeReviewComment(reviewContentRef, ctx2) {
14716
- const ns2 = useNamespace("code-review");
14985
+ function useCodeReviewComment(reviewContentRef, props, ctx2) {
14986
+ const { outputFormat, allowComment } = toRefs(props);
14987
+ const ns2 = useNamespace$1("code-review");
14717
14988
  const commentLeft = ref(-100);
14718
14989
  const commentTop = ref(-100);
14719
14990
  let currentLeftLineNumber = -1;
14720
14991
  let currentRightLineNumber = -1;
14992
+ let lastLineNumberContainer;
14721
14993
  const resetLeftTop = () => {
14722
14994
  commentLeft.value = -100;
14723
14995
  commentTop.value = -100;
14724
14996
  currentLeftLineNumber = -1;
14725
14997
  currentRightLineNumber = -1;
14726
- };
14727
- const onMouseEnter = (e) => {
14728
- e.currentTarget.getBoundingClientRect();
14998
+ lastLineNumberContainer == null ? void 0 : lastLineNumberContainer.classList.remove("comment-icon-hover");
14999
+ lastLineNumberContainer = null;
14729
15000
  };
14730
15001
  const onMouseMove = (e) => {
14731
15002
  var _a, _b;
14732
15003
  const composedPath = e.composedPath();
14733
15004
  const trNode = composedPath.find((item) => item.tagName === "TR");
14734
15005
  if (trNode) {
14735
- const lineNumberContainer = Array.from(trNode.children)[0];
14736
- if (notEmptyNode(lineNumberContainer)) {
14737
- const { top, left } = lineNumberContainer.getBoundingClientRect();
14738
- commentLeft.value = left;
14739
- commentTop.value = top;
14740
- currentLeftLineNumber = parseInt((_a = lineNumberContainer.children[0]) == null ? void 0 : _a.innerText) || -1;
14741
- 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
+ }
14742
15022
  } else {
14743
- 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
+ }
14744
15060
  }
14745
15061
  }
14746
15062
  };
@@ -14756,40 +15072,60 @@ function useCodeReviewComment(reviewContentRef, ctx2) {
14756
15072
  resetLeftTop();
14757
15073
  }
14758
15074
  };
14759
- const onCommentIconClick = () => {
14760
- ctx2.emit("addComment", { left: currentLeftLineNumber, right: currentRightLineNumber });
14761
- };
14762
- const findReferenceDom = (lineNumber, lineSide) => {
14763
- var _a, _b, _c, _d;
14764
- const trNodes = Array.from(reviewContentRef.value.querySelectorAll("tr"));
14765
- for (const index2 in trNodes) {
14766
- const lineIndex = parseInt(index2);
14767
- const lineNumberBox = Array.from(trNodes[lineIndex].children)[0];
14768
- if (notEmptyNode(lineNumberBox)) {
14769
- const oldLineNumber = parseInt((_b = (_a = lineNumberBox.children[0]) == null ? void 0 : _a.innerText) != null ? _b : -1);
14770
- const newLineNumber = parseInt((_d = (_c = lineNumberBox.children[1]) == null ? void 0 : _c.innerText) != null ? _d : -1);
14771
- if (lineSide === "left" && oldLineNumber === lineNumber || lineSide === "right" && newLineNumber === lineNumber) {
14772
- return trNodes[lineIndex];
14773
- }
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;
14774
15084
  }
14775
15085
  }
15086
+ if (outputFormat.value === "line-by-line")
15087
+ ;
15088
+ ctx2.emit("addComment", { left: currentLeftLineNumber, right: currentRightLineNumber });
14776
15089
  };
14777
15090
  const insertComment = (lineNumber, lineSide, commentDom) => {
14778
- const lineHost = findReferenceDom(lineNumber, lineSide);
14779
- 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
+ }
14780
15098
  };
14781
15099
  const removeComment = (lineNumber, lineSide) => {
14782
- const lineHost = findReferenceDom(lineNumber, lineSide);
14783
- let nextLineHost = lineHost == null ? void 0 : lineHost.nextElementSibling;
14784
- while (nextLineHost) {
14785
- const classList = nextLineHost == null ? void 0 : nextLineHost.classList;
14786
- if ((classList == null ? void 0 : classList.contains("comment-block")) && classList.contains(lineSide)) {
14787
- nextLineHost.remove();
14788
- 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
+ }
14789
15125
  }
14790
- nextLineHost = nextLineHost.nextElementSibling;
14791
15126
  }
14792
15127
  };
15128
+ const mouseEvent = allowComment.value ? { onMousemove: onMouseMove, onMouseleave } : {};
14793
15129
  window.addEventListener("scroll", resetLeftTop);
14794
15130
  onUnmounted(() => {
14795
15131
  window.removeEventListener("scroll", resetLeftTop);
@@ -14797,9 +15133,7 @@ function useCodeReviewComment(reviewContentRef, ctx2) {
14797
15133
  return {
14798
15134
  commentLeft,
14799
15135
  commentTop,
14800
- onMouseEnter,
14801
- onMouseMove,
14802
- onMouseleave,
15136
+ mouseEvent,
14803
15137
  onCommentMouseLeave,
14804
15138
  onCommentIconClick,
14805
15139
  insertComment,
@@ -14812,7 +15146,7 @@ var CodeReview = defineComponent({
14812
15146
  props: codeReviewProps,
14813
15147
  emits: ["foldChange", "addComment", "afterViewInit", "contentRefresh"],
14814
15148
  setup(props, ctx2) {
14815
- const ns2 = useNamespace("code-review");
15149
+ const ns2 = useNamespace$1("code-review");
14816
15150
  const {
14817
15151
  renderHtml,
14818
15152
  reviewContentRef,
@@ -14826,14 +15160,12 @@ var CodeReview = defineComponent({
14826
15160
  const {
14827
15161
  commentLeft,
14828
15162
  commentTop,
14829
- onMouseEnter,
14830
- onMouseMove,
14831
- onMouseleave,
15163
+ mouseEvent,
14832
15164
  onCommentMouseLeave,
14833
15165
  onCommentIconClick,
14834
15166
  insertComment,
14835
15167
  removeComment
14836
- } = useCodeReviewComment(reviewContentRef, ctx2);
15168
+ } = useCodeReviewComment(reviewContentRef, props, ctx2);
14837
15169
  onMounted(() => {
14838
15170
  ctx2.emit("afterViewInit", {
14839
15171
  toggleFold,
@@ -14847,29 +15179,30 @@ var CodeReview = defineComponent({
14847
15179
  isFold,
14848
15180
  rootCtx: ctx2
14849
15181
  });
14850
- return () => createVNode("div", {
14851
- "class": ns2.b()
14852
- }, [createVNode(CodeReviewHeader, {
14853
- "onClick": () => isFold.value = !isFold.value
14854
- }, null), createVNode("div", {
14855
- "class": [ns2.e("content"), {
14856
- "hide-content": isFold.value
14857
- }],
14858
- "innerHTML": renderHtml.value,
14859
- "ref": reviewContentRef,
14860
- "onClick": onContentClick,
14861
- "onMouseenter": onMouseEnter,
14862
- "onMousemove": onMouseMove,
14863
- "onMouseleave": onMouseleave
14864
- }, null), createVNode("div", {
14865
- "class": "comment-icon",
14866
- "style": {
14867
- left: commentLeft.value + "px",
14868
- top: commentTop.value + "px"
14869
- },
14870
- "onClick": onCommentIconClick,
14871
- "onMouseleave": onCommentMouseLeave
14872
- }, [createVNode(CommentIcon, null, null)])]);
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
+ };
14873
15206
  }
14874
15207
  });
14875
15208
  var CodeReviewInstall = {
@@ -14972,7 +15305,6 @@ var CollapseItem = defineComponent({
14972
15305
  });
14973
15306
  const handlerTitleClick = (e) => {
14974
15307
  e.preventDefault();
14975
- e.stopPropagation();
14976
15308
  if (!props.disabled) {
14977
15309
  collapse2 == null ? void 0 : collapse2.collapseItemClick(props.name);
14978
15310
  }
@@ -15142,7 +15474,7 @@ const tabsProps = {
15142
15474
  default: "top"
15143
15475
  }
15144
15476
  };
15145
- const ns$g = useNamespace("tabs");
15477
+ const ns$g = useNamespace$1("tabs");
15146
15478
  function useTabNavRender(props, data) {
15147
15479
  const { cssClass, tabPosition, customWidth } = toRefs(props);
15148
15480
  const ulClasses = computed(() => ({
@@ -15270,7 +15602,7 @@ var TabNav = defineComponent({
15270
15602
  props: tabsProps,
15271
15603
  emits: ["active-tab-change", "tab-remove", "tab-add", "tab-change"],
15272
15604
  setup(props, ctx2) {
15273
- const ns2 = useNamespace("tabs");
15605
+ const ns2 = useNamespace$1("tabs");
15274
15606
  const tabsEle = shallowRef();
15275
15607
  const data = reactive({
15276
15608
  offsetLeft: 0,
@@ -15392,7 +15724,7 @@ var TabNav = defineComponent({
15392
15724
  };
15393
15725
  }
15394
15726
  });
15395
- const ns$f = useNamespace("tabs");
15727
+ const ns$f = useNamespace$1("tabs");
15396
15728
  function useTabsEvent(ctx2) {
15397
15729
  const onUpdateModelValue = (value) => {
15398
15730
  ctx2.emit("update:modelValue", value);
@@ -15499,7 +15831,7 @@ var Tab = defineComponent({
15499
15831
  slots
15500
15832
  }) {
15501
15833
  const tabs = inject("tabs");
15502
- const ns2 = useNamespace("tab");
15834
+ const ns2 = useNamespace$1("tab");
15503
15835
  const instance = getCurrentInstance();
15504
15836
  const tabContext = reactive({
15505
15837
  uid: instance == null ? void 0 : instance.uid,
@@ -19956,7 +20288,7 @@ var CalendarPanel = defineComponent({
19956
20288
  setup(props, ctx2) {
19957
20289
  const app = getCurrentInstance();
19958
20290
  const t = createI18nTranslate("DDatePickerPro", app);
19959
- const ns2 = useNamespace("date-picker-pro");
20291
+ const ns2 = useNamespace$1("date-picker-pro");
19960
20292
  const {
19961
20293
  yearScrollRef,
19962
20294
  monthScrollRef,
@@ -20405,7 +20737,7 @@ var TimeScroll = defineComponent({
20405
20737
  name: "DTimeScroll",
20406
20738
  props: timePickerProps,
20407
20739
  setup(props, ctx2) {
20408
- const ns2 = useNamespace("scroll-box");
20740
+ const ns2 = useNamespace$1("scroll-box");
20409
20741
  const {
20410
20742
  scrollBoxDom,
20411
20743
  scrollThumbDom,
@@ -20469,7 +20801,7 @@ var PopupLine = defineComponent({
20469
20801
  props: popupLineProps,
20470
20802
  emits: ["change"],
20471
20803
  setup(props, ctx2) {
20472
- const ns2 = useNamespace("time-list");
20804
+ const ns2 = useNamespace$1("time-list");
20473
20805
  const timeListDom = ref();
20474
20806
  const {
20475
20807
  getNewTime,
@@ -20612,7 +20944,7 @@ var TimerPickerPanel = defineComponent({
20612
20944
  setup(props, ctx2) {
20613
20945
  const app = getCurrentInstance();
20614
20946
  const t = createI18nTranslate("DDatePickerPro", app);
20615
- const ns2 = useNamespace("date-picker-pro");
20947
+ const ns2 = useNamespace$1("date-picker-pro");
20616
20948
  const {
20617
20949
  timeListDom,
20618
20950
  hourList,
@@ -20641,7 +20973,7 @@ var TimerPickerPanel = defineComponent({
20641
20973
  }
20642
20974
  });
20643
20975
  function useYearCalendarPanel(props, ctx2) {
20644
- const ns2 = useNamespace("date-picker-pro");
20976
+ const ns2 = useNamespace$1("date-picker-pro");
20645
20977
  const yarListScrollRef = ref();
20646
20978
  const yearList = ref([]);
20647
20979
  const { today, calendarRange, selectDate, rangeSelectDate, minDate, maxDate, fixRangeDate, getToDate, emitSelectedDate } = useCalendarSelected(props, ctx2);
@@ -20768,7 +21100,7 @@ var YearCalendarPanel = defineComponent({
20768
21100
  props: datePickerProPanelProps,
20769
21101
  emits: ["selectedDate", "changeRangeFocusType"],
20770
21102
  setup(props, ctx2) {
20771
- const ns2 = useNamespace("date-picker-pro");
21103
+ const ns2 = useNamespace$1("date-picker-pro");
20772
21104
  const {
20773
21105
  yarListScrollRef,
20774
21106
  yearList,
@@ -20804,7 +21136,7 @@ var YearCalendarPanel = defineComponent({
20804
21136
  }
20805
21137
  });
20806
21138
  function useMonthCalendarPanel(props, ctx2) {
20807
- const ns2 = useNamespace("date-picker-pro");
21139
+ const ns2 = useNamespace$1("date-picker-pro");
20808
21140
  const yearScrollRef = ref();
20809
21141
  const monthScrollRef = ref();
20810
21142
  const yearList = ref([]);
@@ -20993,7 +21325,7 @@ var MonthCalendarPanel = defineComponent({
20993
21325
  setup(props, ctx2) {
20994
21326
  const app = getCurrentInstance();
20995
21327
  const t = createI18nTranslate("DDatePickerPro", app);
20996
- const ns2 = useNamespace("date-picker-pro");
21328
+ const ns2 = useNamespace$1("date-picker-pro");
20997
21329
  const {
20998
21330
  yearScrollRef,
20999
21331
  monthScrollRef,
@@ -21207,7 +21539,7 @@ var DatePickerProPanel = defineComponent({
21207
21539
  setup(props, ctx2) {
21208
21540
  const app = getCurrentInstance();
21209
21541
  const t = createI18nTranslate("DDatePickerPro", app);
21210
- const ns2 = useNamespace("date-picker-pro");
21542
+ const ns2 = useNamespace$1("date-picker-pro");
21211
21543
  const {
21212
21544
  calendarPanelRef,
21213
21545
  timeData,
@@ -21317,7 +21649,7 @@ var DatePickerPro = defineComponent({
21317
21649
  setup(props, ctx2) {
21318
21650
  const app = getCurrentInstance();
21319
21651
  const t = createI18nTranslate("DDatePickerPro", app);
21320
- const ns2 = useNamespace("date-picker-pro");
21652
+ const ns2 = useNamespace$1("date-picker-pro");
21321
21653
  const {
21322
21654
  originRef,
21323
21655
  inputRef,
@@ -21543,7 +21875,7 @@ var DRangeDatePickerPro = defineComponent({
21543
21875
  setup(props, ctx2) {
21544
21876
  const app = getCurrentInstance();
21545
21877
  const t = createI18nTranslate("DDatePickerPro", app);
21546
- const ns2 = useNamespace("range-date-picker-pro");
21878
+ const ns2 = useNamespace$1("range-date-picker-pro");
21547
21879
  const {
21548
21880
  originRef,
21549
21881
  startInputRef,
@@ -21861,7 +22193,7 @@ var DrawerOverlay = defineComponent({
21861
22193
  props: drawerOverlayProps,
21862
22194
  emits: ["click"],
21863
22195
  setup(props, ctx2) {
21864
- const ns2 = useNamespace("drawer");
22196
+ const ns2 = useNamespace$1("drawer");
21865
22197
  const handleClick = (e) => {
21866
22198
  ctx2.emit("click", e);
21867
22199
  };
@@ -21876,8 +22208,8 @@ var DrawerOverlay = defineComponent({
21876
22208
  }
21877
22209
  });
21878
22210
  function useDrawer(props, emit) {
21879
- const ns2 = useNamespace("drawer");
21880
- const modalNs = useNamespace("modal", true);
22211
+ const ns2 = useNamespace$1("drawer");
22212
+ const modalNs = useNamespace$1("modal", true);
21881
22213
  const drawerRef = ref();
21882
22214
  const overlayRef = ref();
21883
22215
  const drawerClasses = computed(() => ({
@@ -22085,7 +22417,7 @@ var DropdownMenu = defineComponent({
22085
22417
  overlayClass
22086
22418
  } = toRefs(props);
22087
22419
  const dropdownMenuRef = ref(null);
22088
- const ns2 = useNamespace("dropdown");
22420
+ const ns2 = useNamespace$1("dropdown");
22089
22421
  onClickOutside(dropdownMenuRef, (value) => {
22090
22422
  var _a, _b;
22091
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))) {
@@ -22599,7 +22931,7 @@ const editableSelectOptionProps = {
22599
22931
  }
22600
22932
  };
22601
22933
  function useOption$1(props) {
22602
- const ns2 = useNamespace("editable-select");
22934
+ const ns2 = useNamespace$1("editable-select");
22603
22935
  const select2 = inject(SELECT_KEY);
22604
22936
  const { disabled, hovering } = toRefs(props);
22605
22937
  const isSelected = computed(() => {
@@ -22646,7 +22978,7 @@ var Dropdown = defineComponent({
22646
22978
  setup(props, {
22647
22979
  slots
22648
22980
  }) {
22649
- const ns2 = useNamespace("editable-select");
22981
+ const ns2 = useNamespace$1("editable-select");
22650
22982
  const {
22651
22983
  width,
22652
22984
  maxHeight
@@ -22898,7 +23230,7 @@ function useKeyboardSelect(props, states, filteredOptions, scrollToItem, handleO
22898
23230
  };
22899
23231
  }
22900
23232
  function useInputRender(props, states) {
22901
- const ns2 = useNamespace("editable-select-input");
23233
+ const ns2 = useNamespace$1("editable-select-input");
22902
23234
  const inputClasses = computed(() => ({
22903
23235
  [ns2.b()]: true,
22904
23236
  [ns2.m("sm")]: props.size === "sm",
@@ -23025,7 +23357,7 @@ var EditableSelect = defineComponent({
23025
23357
  props: editableSelectProps,
23026
23358
  emits: ["update:modelValue", "focus", "blur", "clear", "change", "visibleChange", "loadMore"],
23027
23359
  setup(props, ctx2) {
23028
- const ns2 = useNamespace("editable-select");
23360
+ const ns2 = useNamespace$1("editable-select");
23029
23361
  const inputRef = ref();
23030
23362
  const originRef = ref();
23031
23363
  const dropdownRef = ref();
@@ -23197,7 +23529,7 @@ function useKeydown(props, ctx2) {
23197
23529
  document.removeEventListener("keydown", handleKeydown);
23198
23530
  });
23199
23531
  }
23200
- const ns$e = useNamespace("fullscreen");
23532
+ const ns$e = useNamespace$1("fullscreen");
23201
23533
  const launchNormalFullscreen = (targetElement, props) => {
23202
23534
  targetElement.classList.add(ns$e.b());
23203
23535
  if (props.zIndex) {
@@ -24411,7 +24743,7 @@ var Tooltip = defineComponent({
24411
24743
  onMouseleave,
24412
24744
  onMouseenterOverlay
24413
24745
  } = useTooltip(origin, props);
24414
- const ns2 = useNamespace("tooltip");
24746
+ const ns2 = useNamespace$1("tooltip");
24415
24747
  const className2 = computed(() => {
24416
24748
  return [ns2.b(), ns2.m(placement.value)].join(" ");
24417
24749
  });
@@ -27412,7 +27744,7 @@ var Row = defineComponent({
27412
27744
  slots
27413
27745
  }) {
27414
27746
  const gutterScreenSize = ref({});
27415
- const ns2 = useNamespace("row");
27747
+ const ns2 = useNamespace$1("row");
27416
27748
  const rowClass = computed(() => ({
27417
27749
  [ns2.em("align", props.align)]: true,
27418
27750
  [ns2.em("justify", props.justify)]: true,
@@ -27490,7 +27822,7 @@ var Row = defineComponent({
27490
27822
  };
27491
27823
  }
27492
27824
  });
27493
- const colNs = useNamespace("col");
27825
+ const colNs = useNamespace$1("col");
27494
27826
  function useColClassNames(props) {
27495
27827
  return computed(() => ({
27496
27828
  [colNs.em("span", props.span ? String(props.span) : "")]: true,
@@ -27534,7 +27866,7 @@ var Col = defineComponent({
27534
27866
  setup(props, {
27535
27867
  slots
27536
27868
  }) {
27537
- const ns2 = useNamespace("col");
27869
+ const ns2 = useNamespace$1("col");
27538
27870
  const formatFlex = (flex) => {
27539
27871
  if (typeof flex === "number") {
27540
27872
  return `${flex} ${flex} auto`;
@@ -27713,7 +28045,7 @@ var imagePreview = defineComponent({
27713
28045
  props: imagePreviewProps,
27714
28046
  emits: [],
27715
28047
  setup(props) {
27716
- const ns2 = useNamespace("image-preview");
28048
+ const ns2 = useNamespace$1("image-preview");
27717
28049
  let transform = null;
27718
28050
  const index2 = ref(0);
27719
28051
  const url2 = computed(() => props.previewUrlList[index2.value]);
@@ -28197,7 +28529,7 @@ const inputNumberProps = {
28197
28529
  default: ""
28198
28530
  }
28199
28531
  };
28200
- const ns$d = useNamespace("input-number");
28532
+ const ns$d = useNamespace$1("input-number");
28201
28533
  function IncIcon() {
28202
28534
  return createVNode("svg", {
28203
28535
  "class": ns$d.e("icon-arrow"),
@@ -28240,7 +28572,7 @@ function DecIcon() {
28240
28572
  "fill-rule": "nonzero"
28241
28573
  }, null)])]);
28242
28574
  }
28243
- const ns$c = useNamespace("input-number");
28575
+ const ns$c = useNamespace$1("input-number");
28244
28576
  function useRender$1(props, ctx2) {
28245
28577
  const formContext = inject(FORM_TOKEN, void 0);
28246
28578
  const _a = ctx2.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
@@ -28461,7 +28793,7 @@ var Layout = defineComponent({
28461
28793
  setup(props, {
28462
28794
  slots
28463
28795
  }) {
28464
- const ns2 = useNamespace("layout");
28796
+ const ns2 = useNamespace$1("layout");
28465
28797
  return () => {
28466
28798
  var _a;
28467
28799
  const slotDefault = (_a = slots.default) == null ? void 0 : _a.call(slots);
@@ -28479,7 +28811,7 @@ var Content = defineComponent({
28479
28811
  setup(props, {
28480
28812
  slots
28481
28813
  }) {
28482
- const ns2 = useNamespace("layout");
28814
+ const ns2 = useNamespace$1("layout");
28483
28815
  return () => {
28484
28816
  var _a;
28485
28817
  return createVNode("div", {
@@ -28494,7 +28826,7 @@ var Header = defineComponent({
28494
28826
  setup(props, {
28495
28827
  slots
28496
28828
  }) {
28497
- const ns2 = useNamespace("layout");
28829
+ const ns2 = useNamespace$1("layout");
28498
28830
  return () => {
28499
28831
  var _a;
28500
28832
  return createVNode("div", {
@@ -28509,7 +28841,7 @@ var Footer = defineComponent({
28509
28841
  setup(props, {
28510
28842
  slots
28511
28843
  }) {
28512
- const ns2 = useNamespace("layout");
28844
+ const ns2 = useNamespace$1("layout");
28513
28845
  return () => {
28514
28846
  var _a;
28515
28847
  return createVNode("div", {
@@ -28523,7 +28855,7 @@ var Aside = defineComponent({
28523
28855
  setup(props, {
28524
28856
  slots
28525
28857
  }) {
28526
- const ns2 = useNamespace("layout");
28858
+ const ns2 = useNamespace$1("layout");
28527
28859
  return () => {
28528
28860
  var _a;
28529
28861
  return createVNode("div", {
@@ -28550,7 +28882,7 @@ var List = defineComponent({
28550
28882
  setup(props, {
28551
28883
  slots
28552
28884
  }) {
28553
- const ns2 = useNamespace("list");
28885
+ const ns2 = useNamespace$1("list");
28554
28886
  return () => {
28555
28887
  var _a;
28556
28888
  return createVNode("div", {
@@ -28565,7 +28897,7 @@ var ListItem = defineComponent({
28565
28897
  setup(props, {
28566
28898
  slots
28567
28899
  }) {
28568
- const ns2 = useNamespace("list-item");
28900
+ const ns2 = useNamespace$1("list-item");
28569
28901
  return () => {
28570
28902
  var _a;
28571
28903
  return createVNode("div", {
@@ -28692,7 +29024,7 @@ const textareaProps = {
28692
29024
  function useTextareaRender(props) {
28693
29025
  const formContext = inject(FORM_TOKEN, void 0);
28694
29026
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
28695
- const ns2 = useNamespace("textarea");
29027
+ const ns2 = useNamespace$1("textarea");
28696
29028
  const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
28697
29029
  const isFocus = ref(false);
28698
29030
  const { error: error2, disabled } = toRefs(props);
@@ -28839,7 +29171,7 @@ var Textarea = defineComponent({
28839
29171
  } = toRefs(props);
28840
29172
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
28841
29173
  const textarea2 = shallowRef();
28842
- const ns2 = useNamespace("textarea");
29174
+ const ns2 = useNamespace$1("textarea");
28843
29175
  const {
28844
29176
  isFocus,
28845
29177
  textareaDisabled,
@@ -28902,7 +29234,7 @@ var Mention = defineComponent({
28902
29234
  slots,
28903
29235
  emit
28904
29236
  }) {
28905
- const ns2 = useNamespace("mention");
29237
+ const ns2 = useNamespace$1("mention");
28906
29238
  const textContext = ref("");
28907
29239
  const showSuggestions = ref(false);
28908
29240
  const currentIndex = ref(0);
@@ -29047,8 +29379,8 @@ var MentionInstall = {
29047
29379
  const elements = [];
29048
29380
  let parents = [];
29049
29381
  const defaultIndent = ref(24);
29050
- const ns$b = useNamespace("menu");
29051
- const subNs$2 = useNamespace("submenu");
29382
+ const ns$b = useNamespace$1("menu");
29383
+ const subNs$2 = useNamespace$1("submenu");
29052
29384
  const menuClass = ns$b.b();
29053
29385
  const menuItemHorizontalWrapper = `${ns$b.b()}-item-horizontal-wrapper`;
29054
29386
  const menuItemSelect$1 = `${ns$b.b()}-item-select`;
@@ -29206,7 +29538,7 @@ const menuItemProps = {
29206
29538
  type: [String, Object]
29207
29539
  }
29208
29540
  };
29209
- const ns$a = useNamespace("menu");
29541
+ const ns$a = useNamespace$1("menu");
29210
29542
  function initSelect(defaultSelectKeys, keys2, isMultiple, disabled) {
29211
29543
  const isSelect = ref(false);
29212
29544
  if (!isMultiple) {
@@ -29245,7 +29577,7 @@ function changeRoute(props, router, useRouter, key) {
29245
29577
  }
29246
29578
  return void 0;
29247
29579
  }
29248
- const ns$9 = useNamespace("menu");
29580
+ const ns$9 = useNamespace$1("menu");
29249
29581
  function useClick(e) {
29250
29582
  const paths = e.composedPath();
29251
29583
  for (let i = 0; i < paths.length; i++) {
@@ -29261,7 +29593,7 @@ function useClick(e) {
29261
29593
  }
29262
29594
  }
29263
29595
  }
29264
- const ns$8 = useNamespace("menu");
29596
+ const ns$8 = useNamespace$1("menu");
29265
29597
  const menuItemSelect = `${ns$8.b()}-item-select`;
29266
29598
  const menuItemDisabled = `${ns$8.b()}-item-disabled`;
29267
29599
  var MenuItem = defineComponent({
@@ -29532,8 +29864,8 @@ const subMenuProps = {
29532
29864
  default: false
29533
29865
  }
29534
29866
  };
29535
- const ns$7 = useNamespace("menu");
29536
- const subNs$1 = useNamespace("submenu");
29867
+ const ns$7 = useNamespace$1("menu");
29868
+ const subNs$1 = useNamespace$1("submenu");
29537
29869
  const menuItemHorizontalWrapperHidden = `${ns$7.b()}-item-horizontal-wrapper-hidden`;
29538
29870
  const menuItemHorizontalWrapperShow = `${ns$7.b()}-item-horizontal-wrapper-show`;
29539
29871
  function useShowSubMenu(eventName, e, wrapper) {
@@ -29577,8 +29909,8 @@ function useShowSubMenu(eventName, e, wrapper) {
29577
29909
  wrapper.classList.add(menuItemHorizontalWrapperHidden);
29578
29910
  }
29579
29911
  }
29580
- const ns$6 = useNamespace("menu");
29581
- const subNs = useNamespace("submenu");
29912
+ const ns$6 = useNamespace$1("menu");
29913
+ const subNs = useNamespace$1("submenu");
29582
29914
  const subMenuClass = subNs.b();
29583
29915
  var SubMenu = defineComponent({
29584
29916
  name: "DSubMenu",
@@ -29799,7 +30131,7 @@ var Menu = defineComponent({
29799
30131
  props: menuProps,
29800
30132
  emits: ["select", "deselect", "submenu-change"],
29801
30133
  setup(props, ctx2) {
29802
- const ns2 = useNamespace("menu");
30134
+ const ns2 = useNamespace$1("menu");
29803
30135
  const {
29804
30136
  openKeys,
29805
30137
  mode,
@@ -29945,7 +30277,7 @@ var Close$1 = defineComponent({
29945
30277
  setup(props, {
29946
30278
  emit
29947
30279
  }) {
29948
- const ns2 = useNamespace("message");
30280
+ const ns2 = useNamespace$1("message");
29949
30281
  return () => createVNode("div", {
29950
30282
  "class": ns2.e("icon-close"),
29951
30283
  "onClick": (e) => emit("click", e)
@@ -29992,7 +30324,7 @@ const messageProps = {
29992
30324
  type: Function
29993
30325
  }
29994
30326
  };
29995
- const ns$5 = useNamespace("message");
30327
+ const ns$5 = useNamespace$1("message");
29996
30328
  function SuccessIcon$1() {
29997
30329
  return createVNode("svg", {
29998
30330
  "viewBox": "0 0 1024 1024",
@@ -30050,7 +30382,7 @@ var Message$1 = defineComponent({
30050
30382
  shadow,
30051
30383
  showClose
30052
30384
  } = toRefs(props);
30053
- const ns2 = useNamespace("message");
30385
+ const ns2 = useNamespace$1("message");
30054
30386
  let timer = null;
30055
30387
  let timestamp;
30056
30388
  const handleDestroy = () => {
@@ -30431,7 +30763,7 @@ var ModalHeader = defineComponent({
30431
30763
  setup(props, {
30432
30764
  slots
30433
30765
  }) {
30434
- const ns2 = useNamespace("modal");
30766
+ const ns2 = useNamespace$1("modal");
30435
30767
  return () => {
30436
30768
  var _a;
30437
30769
  return createVNode("div", {
@@ -30445,7 +30777,7 @@ var ModalBody = defineComponent({
30445
30777
  setup(props, {
30446
30778
  slots
30447
30779
  }) {
30448
- const ns2 = useNamespace("modal");
30780
+ const ns2 = useNamespace$1("modal");
30449
30781
  return () => {
30450
30782
  var _a;
30451
30783
  return createVNode("div", {
@@ -30465,7 +30797,7 @@ var Modal = defineComponent({
30465
30797
  attrs,
30466
30798
  emit
30467
30799
  }) {
30468
- const ns2 = useNamespace("modal");
30800
+ const ns2 = useNamespace$1("modal");
30469
30801
  const {
30470
30802
  modelValue,
30471
30803
  title,
@@ -30595,7 +30927,7 @@ var ModalFooter = defineComponent({
30595
30927
  setup(props, {
30596
30928
  slots
30597
30929
  }) {
30598
- const ns2 = useNamespace("modal");
30930
+ const ns2 = useNamespace$1("modal");
30599
30931
  return () => {
30600
30932
  var _a;
30601
30933
  return createVNode("div", {
@@ -30794,7 +31126,7 @@ var Close = defineComponent({
30794
31126
  setup(props, {
30795
31127
  emit
30796
31128
  }) {
30797
- const ns2 = useNamespace("notification");
31129
+ const ns2 = useNamespace$1("notification");
30798
31130
  return () => createVNode("div", {
30799
31131
  "class": ns2.e("icon-close"),
30800
31132
  "onClick": (e) => emit("click", e)
@@ -30804,7 +31136,7 @@ var Close = defineComponent({
30804
31136
  }, null)]);
30805
31137
  }
30806
31138
  });
30807
- const ns$4 = useNamespace("notification");
31139
+ const ns$4 = useNamespace$1("notification");
30808
31140
  const XLINK = {
30809
31141
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
30810
31142
  };
@@ -30918,7 +31250,7 @@ var TypeIcon = defineComponent({
30918
31250
  const {
30919
31251
  type: type4
30920
31252
  } = toRefs(props);
30921
- const ns2 = useNamespace("notification");
31253
+ const ns2 = useNamespace$1("notification");
30922
31254
  const classes = computed(() => ({
30923
31255
  [ns2.e("image")]: true,
30924
31256
  [ns2.em("image", type4.value)]: true
@@ -30993,7 +31325,7 @@ var Notification = defineComponent({
30993
31325
  close: close2,
30994
31326
  handleDestroy
30995
31327
  } = useEvent(props, emit);
30996
- const ns2 = useNamespace("notification");
31328
+ const ns2 = useNamespace$1("notification");
30997
31329
  return () => createVNode(Transition, {
30998
31330
  "name": "notification-fade",
30999
31331
  "onAfterLeave": handleDestroy
@@ -31101,7 +31433,7 @@ function className$1(classStr, classOpt) {
31101
31433
  function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31102
31434
  const formContext = inject(FORM_TOKEN, void 0);
31103
31435
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31104
- const ns2 = useNamespace("select");
31436
+ const ns2 = useNamespace$1("select");
31105
31437
  const dropdownRef = ref();
31106
31438
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
31107
31439
  const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
@@ -31118,7 +31450,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31118
31450
  onClickOutside(dropdownRef, () => {
31119
31451
  toggleChange(false);
31120
31452
  }, { ignore: [selectRef] });
31121
- const dropdownMenuMultipleNs = useNamespace("dropdown-menu-multiple");
31453
+ const dropdownMenuMultipleNs = useNamespace$1("dropdown-menu-multiple");
31122
31454
  const selectCls = computed(() => {
31123
31455
  return className$1(ns2.b(), {
31124
31456
  [ns2.m("open")]: isOpen.value,
@@ -31526,7 +31858,7 @@ const optionGroupProps = {
31526
31858
  const SELECT_TOKEN = Symbol("dSelect");
31527
31859
  const OPTION_GROUP_TOKEN = Symbol("dOptionGroup");
31528
31860
  function useOption(props) {
31529
- const ns2 = useNamespace("select");
31861
+ const ns2 = useNamespace$1("select");
31530
31862
  const select2 = inject(SELECT_TOKEN, null);
31531
31863
  const optionGroup = inject(OPTION_GROUP_TOKEN, null);
31532
31864
  const currentName = computed(() => {
@@ -31648,7 +31980,7 @@ const tagProps = {
31648
31980
  }
31649
31981
  };
31650
31982
  function useClass(props) {
31651
- const ns2 = useNamespace("tag");
31983
+ const ns2 = useNamespace$1("tag");
31652
31984
  return computed(() => {
31653
31985
  const { type: type4, color: color2, deletable } = props;
31654
31986
  return `${ns2.e("item")} ${ns2.m(type4 || (color2 ? "colorful" : "") || "default")} ${deletable ? ns2.m("deletable") : ""} ${ns2.m(props.size)}`;
@@ -31690,7 +32022,7 @@ var Tag = defineComponent({
31690
32022
  slots,
31691
32023
  emit
31692
32024
  }) {
31693
- const ns2 = useNamespace("tag");
32025
+ const ns2 = useNamespace$1("tag");
31694
32026
  const {
31695
32027
  type: type4,
31696
32028
  color: color2,
@@ -31753,7 +32085,7 @@ var TagInstall = {
31753
32085
  }
31754
32086
  };
31755
32087
  function useSelectContent() {
31756
- const ns2 = useNamespace("select");
32088
+ const ns2 = useNamespace$1("select");
31757
32089
  const select2 = inject(SELECT_TOKEN);
31758
32090
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31759
32091
  const app = getCurrentInstance();
@@ -31850,7 +32182,7 @@ var SelectContent = defineComponent({
31850
32182
  name: "SelectContent",
31851
32183
  setup() {
31852
32184
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31853
- const ns2 = useNamespace("select");
32185
+ const ns2 = useNamespace$1("select");
31854
32186
  const clearCls = computed(() => ({
31855
32187
  [ns2.e("clear")]: true,
31856
32188
  [ns2.em("clear", "feedback")]: Boolean(formItemContext == null ? void 0 : formItemContext.validateState) && (formItemContext == null ? void 0 : formItemContext.showFeedback)
@@ -32009,8 +32341,8 @@ var Select = defineComponent({
32009
32341
  toggleChange,
32010
32342
  isShowCreateOption
32011
32343
  } = useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t);
32012
- const scrollbarNs = useNamespace("scrollbar");
32013
- const ns2 = useNamespace("select");
32344
+ const scrollbarNs = useNamespace$1("scrollbar");
32345
+ const ns2 = useNamespace$1("select");
32014
32346
  const dropdownCls = ns2.e("dropdown");
32015
32347
  const listCls = {
32016
32348
  [ns2.e("dropdown-list")]: true,
@@ -32128,7 +32460,7 @@ var OptionGroup = defineComponent({
32128
32460
  name: "DOptionGroup",
32129
32461
  props: optionGroupProps,
32130
32462
  setup(props, ctx2) {
32131
- const ns2 = useNamespace("select");
32463
+ const ns2 = useNamespace$1("select");
32132
32464
  provide(OPTION_GROUP_TOKEN, reactive(__spreadValues({}, toRefs(props))));
32133
32465
  return () => {
32134
32466
  var _a;
@@ -32313,7 +32645,7 @@ var ConfigMenu = defineComponent({
32313
32645
  isShowConfig,
32314
32646
  $slots
32315
32647
  } = this;
32316
- const ns2 = useNamespace("pagination");
32648
+ const ns2 = useNamespace$1("pagination");
32317
32649
  return withDirectives(createVNode("div", {
32318
32650
  "class": ns2.e("config"),
32319
32651
  "ref": "paginationConfig"
@@ -32403,7 +32735,7 @@ var JumpPage = defineComponent({
32403
32735
  jump,
32404
32736
  showJumpButton
32405
32737
  } = this;
32406
- const ns2 = useNamespace("pagination");
32738
+ const ns2 = useNamespace$1("pagination");
32407
32739
  const inputProps2 = {
32408
32740
  class: [ns2.e("input"), size ? ns2.em("input", size) : ""],
32409
32741
  size,
@@ -32525,7 +32857,7 @@ var PageNumBtn = defineComponent({
32525
32857
  nextChange,
32526
32858
  showTruePageIndex
32527
32859
  } = this;
32528
- const ns2 = useNamespace("pagination");
32860
+ const ns2 = useNamespace$1("pagination");
32529
32861
  return createVNode("ul", {
32530
32862
  "class": [ns2.e("list"), size ? ns2.m(size) : ""]
32531
32863
  }, [createVNode("li", {
@@ -32611,7 +32943,7 @@ var PageNumBtn = defineComponent({
32611
32943
  });
32612
32944
  var PageSize = defineComponent({
32613
32945
  setup() {
32614
- const ns2 = useNamespace("pagination");
32946
+ const ns2 = useNamespace$1("pagination");
32615
32947
  const paginationContext = inject(paginationInjectionKey);
32616
32948
  const iconRotate = ref(0);
32617
32949
  const {
@@ -32689,7 +33021,7 @@ var Pagination = defineComponent({
32689
33021
  showJumpButton,
32690
33022
  haveConfigMenu
32691
33023
  } = toRefs(props);
32692
- const ns2 = useNamespace("pagination");
33024
+ const ns2 = useNamespace$1("pagination");
32693
33025
  const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
32694
33026
  const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
32695
33027
  const cursor = computed({
@@ -33126,7 +33458,7 @@ var Progress = defineComponent({
33126
33458
  data,
33127
33459
  $slots
33128
33460
  } = this;
33129
- const ns2 = useNamespace("progress");
33461
+ const ns2 = useNamespace$1("progress");
33130
33462
  const isOutside = percentageTextPlacement === "outside";
33131
33463
  const isInsideBg = percentageTextPlacement === "insideBg";
33132
33464
  const createPercentageText = () => {
@@ -33668,7 +34000,7 @@ var Radio = defineComponent({
33668
34000
  props: radioProps,
33669
34001
  emits: ["change", "update:modelValue"],
33670
34002
  setup(props, ctx2) {
33671
- const ns2 = useNamespace("radio");
34003
+ const ns2 = useNamespace$1("radio");
33672
34004
  const {
33673
34005
  isChecked,
33674
34006
  radioName,
@@ -33741,7 +34073,7 @@ var RadioGroup = defineComponent({
33741
34073
  props: radioGroupProps,
33742
34074
  emits: ["change", "update:modelValue"],
33743
34075
  setup(props, ctx2) {
33744
- const ns2 = useNamespace("radio-group");
34076
+ const ns2 = useNamespace$1("radio-group");
33745
34077
  useRadioGroup(props, ctx2);
33746
34078
  return () => {
33747
34079
  const getContent = () => {
@@ -33776,7 +34108,7 @@ var RadioButton = defineComponent({
33776
34108
  props: radioProps,
33777
34109
  emits: ["change", "update:modelValue"],
33778
34110
  setup(props, ctx2) {
33779
- const ns2 = useNamespace("radio-button");
34111
+ const ns2 = useNamespace$1("radio-button");
33780
34112
  const {
33781
34113
  isChecked,
33782
34114
  radioName,
@@ -33960,7 +34292,7 @@ var Rate = defineComponent({
33960
34292
  selectValue,
33961
34293
  onMouseleave
33962
34294
  } = this;
33963
- const ns2 = useNamespace("rate");
34295
+ const ns2 = useNamespace$1("rate");
33964
34296
  return createVNode("div", {
33965
34297
  "class": ns2.b(),
33966
34298
  "onMouseleave": onMouseleave,
@@ -34560,7 +34892,7 @@ const useSearchClass = (props, isFocus) => {
34560
34892
  right: "right",
34561
34893
  left: "left"
34562
34894
  };
34563
- const ns2 = useNamespace("search");
34895
+ const ns2 = useNamespace$1("search");
34564
34896
  const searchSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
34565
34897
  const rootClass = computed(() => ({
34566
34898
  [ns2.b()]: true,
@@ -34648,7 +34980,7 @@ var DSearch = defineComponent({
34648
34980
  setup(props, ctx2) {
34649
34981
  const app = getCurrentInstance();
34650
34982
  const t = createI18nTranslate("DSearch", app);
34651
- const ns2 = useNamespace("search");
34983
+ const ns2 = useNamespace$1("search");
34652
34984
  const isFocus = ref(false);
34653
34985
  const {
34654
34986
  rootClass,
@@ -34744,7 +35076,7 @@ const skeletonProps = {
34744
35076
  const roundInjectionKey = Symbol("round");
34745
35077
  const animationInjectionKey = Symbol("showAnimation");
34746
35078
  function useSkeletonItem(props) {
34747
- const ns2 = useNamespace("skeleton-item");
35079
+ const ns2 = useNamespace$1("skeleton-item");
34748
35080
  const { variant, size } = toRefs(props);
34749
35081
  const round = inject(roundInjectionKey, void 0);
34750
35082
  const showAnimation = inject(animationInjectionKey, void 0);
@@ -34818,7 +35150,7 @@ var Skeleton = defineComponent({
34818
35150
  name: "DSkeleton",
34819
35151
  props: skeletonProps,
34820
35152
  setup(props, ctx2) {
34821
- const ns2 = useNamespace("skeleton");
35153
+ const ns2 = useNamespace$1("skeleton");
34822
35154
  const {
34823
35155
  loading: loading2,
34824
35156
  rows,
@@ -34973,7 +35305,7 @@ var Slider = defineComponent({
34973
35305
  props: sliderProps,
34974
35306
  emits: ["update:modelValue"],
34975
35307
  setup(props, ctx2) {
34976
- const ns2 = useNamespace("slider");
35308
+ const ns2 = useNamespace$1("slider");
34977
35309
  const {
34978
35310
  sliderRunway,
34979
35311
  popoverShow,
@@ -35108,7 +35440,7 @@ var DSplitterBar = defineComponent({
35108
35440
  setup(props) {
35109
35441
  const app = getCurrentInstance();
35110
35442
  const t = createI18nTranslate("DSplitterBar", app);
35111
- const ns2 = useNamespace("splitter");
35443
+ const ns2 = useNamespace$1("splitter");
35112
35444
  const store = inject("splitterStore");
35113
35445
  const state = reactive({
35114
35446
  wrapperClass: `${ns2.e("bar")} ${ns2.em("bar", props.orientation)} `
@@ -35463,7 +35795,7 @@ var Splitter = defineComponent({
35463
35795
  const state = reactive({
35464
35796
  panes: []
35465
35797
  });
35466
- const ns2 = useNamespace("splitter");
35798
+ const ns2 = useNamespace$1("splitter");
35467
35799
  state.panes = ((_b = (_a = ctx2.slots).DSplitterPane) == null ? void 0 : _b.call(_a)) || [];
35468
35800
  store.setPanes({
35469
35801
  panes: state.panes
@@ -35558,7 +35890,7 @@ var SplitterPane = defineComponent({
35558
35890
  const domRef = ref();
35559
35891
  const orderRef = ref();
35560
35892
  const currentVnode = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode;
35561
- const ns2 = useNamespace("splitter");
35893
+ const ns2 = useNamespace$1("splitter");
35562
35894
  watch([orderRef, domRef], ([order, ele]) => {
35563
35895
  if (!ele) {
35564
35896
  return;
@@ -35862,7 +36194,7 @@ var Statistic = defineComponent({
35862
36194
  var _a;
35863
36195
  const innerValue = ref((_a = props.valueFrom) != null ? _a : props.value);
35864
36196
  const tween = ref(null);
35865
- const ns2 = useNamespace("statistic");
36197
+ const ns2 = useNamespace$1("statistic");
35866
36198
  const animation = (from = ((_b) => (_b = props.valueFrom) != null ? _b : 0)(), to = typeof props.value === "number" ? props.value : Number(props.value)) => {
35867
36199
  if (from !== to) {
35868
36200
  tween.value = new Tween({
@@ -35936,7 +36268,7 @@ var Status = defineComponent({
35936
36268
  }
35937
36269
  },
35938
36270
  setup(props, ctx2) {
35939
- const ns2 = useNamespace("status");
36271
+ const ns2 = useNamespace$1("status");
35940
36272
  const typeClass = computed(() => {
35941
36273
  const {
35942
36274
  type: type4
@@ -36005,7 +36337,7 @@ var Steps = defineComponent({
36005
36337
  direction,
36006
36338
  simple
36007
36339
  } = toRefs(props);
36008
- const ns2 = useNamespace("steps");
36340
+ const ns2 = useNamespace$1("steps");
36009
36341
  const activeStep = ref(modelValue.value);
36010
36342
  provide(ACTIVE_STEP, activeStep);
36011
36343
  provide(STEPS_PROPS, props);
@@ -36055,7 +36387,7 @@ var Step = defineComponent({
36055
36387
  icon: icon2,
36056
36388
  status: status2
36057
36389
  } = toRefs(props);
36058
- const ns2 = useNamespace("step");
36390
+ const ns2 = useNamespace$1("step");
36059
36391
  const instance = getCurrentInstance();
36060
36392
  const activeStep = inject(ACTIVE_STEP);
36061
36393
  const steps2 = inject(STEPS);
@@ -36175,7 +36507,7 @@ const stepsGuideProps = {
36175
36507
  }
36176
36508
  };
36177
36509
  function useStepsGuidePosition(props, currentStep) {
36178
- const guideClassList = reactive([useNamespace("steps-guide").b()]);
36510
+ const guideClassList = reactive([useNamespace$1("steps-guide").b()]);
36179
36511
  const stepsRef = ref(null);
36180
36512
  const guidePosition = reactive({
36181
36513
  left: "",
@@ -36287,7 +36619,7 @@ var StepsGuide = defineComponent({
36287
36619
  var _a;
36288
36620
  const app = getCurrentInstance();
36289
36621
  const t = createI18nTranslate("DStepsGuide", app);
36290
- const ns2 = useNamespace("steps-guide");
36622
+ const ns2 = useNamespace$1("steps-guide");
36291
36623
  const stepIndexData = ref((_a = props.stepIndex) != null ? _a : 0);
36292
36624
  const stepIndex = computed({
36293
36625
  set: (val) => {
@@ -36650,7 +36982,7 @@ var Switch = defineComponent({
36650
36982
  props: switchProps,
36651
36983
  emits: ["change", "update:modelValue"],
36652
36984
  setup(props, ctx2) {
36653
- const ns2 = useNamespace("switch");
36985
+ const ns2 = useNamespace$1("switch");
36654
36986
  const {
36655
36987
  toggle,
36656
36988
  checked,
@@ -36788,7 +37120,7 @@ const tableProps = {
36788
37120
  };
36789
37121
  const TABLE_TOKEN = Symbol();
36790
37122
  function useTable(props, tableWidth) {
36791
- const ns2 = useNamespace("table");
37123
+ const ns2 = useNamespace$1("table");
36792
37124
  const classes = computed(() => ({
36793
37125
  [ns2.e("view")]: true,
36794
37126
  [ns2.m("striped")]: props.striped,
@@ -36806,7 +37138,7 @@ function useTable(props, tableWidth) {
36806
37138
  return { classes, styles };
36807
37139
  }
36808
37140
  const useFixedColumn = (column2) => {
36809
- const ns2 = useNamespace("table");
37141
+ const ns2 = useNamespace$1("table");
36810
37142
  const stickyClass = computed(() => ({
36811
37143
  [ns2.e("checkable-cell")]: column2.value.type === "checkable",
36812
37144
  [ns2.m("sticky-cell")]: Boolean(column2.value.fixedLeft) || Boolean(column2.value.fixedRight),
@@ -36899,7 +37231,7 @@ function useTableWatcher(props, store) {
36899
37231
  }, { deep: true });
36900
37232
  }
36901
37233
  function useHorizontalScroll(table2) {
36902
- const ns2 = useNamespace("table");
37234
+ const ns2 = useNamespace$1("table");
36903
37235
  const setScrollViewClass = (position) => {
36904
37236
  const element = table2.vnode.el;
36905
37237
  const className2 = ns2.m(`scroll-${position}`);
@@ -37389,7 +37721,7 @@ var Sort = defineComponent({
37389
37721
  const changeDirection = () => {
37390
37722
  ctx2.emit("sort", directionMap[props.sortDirection || "default"]);
37391
37723
  };
37392
- const ns2 = useNamespace("table");
37724
+ const ns2 = useNamespace$1("table");
37393
37725
  return () => createVNode("span", {
37394
37726
  "onClick": changeDirection,
37395
37727
  "class": ns2.e("sort-clickable")
@@ -37939,7 +38271,7 @@ var body = "";
37939
38271
  var TableHeader = defineComponent({
37940
38272
  name: "DTableHeader",
37941
38273
  setup() {
37942
- const ns2 = useNamespace("table");
38274
+ const ns2 = useNamespace$1("table");
37943
38275
  const {
37944
38276
  headerRows
37945
38277
  } = useHeader();
@@ -38082,7 +38414,7 @@ var TD = defineComponent({
38082
38414
  };
38083
38415
  }
38084
38416
  });
38085
- const ns$3 = useNamespace("table");
38417
+ const ns$3 = useNamespace$1("table");
38086
38418
  function useMergeCell() {
38087
38419
  const table2 = inject(TABLE_TOKEN);
38088
38420
  const { _data: data, _columns: columns } = table2.store.states;
@@ -38189,7 +38521,7 @@ var TableBody = defineComponent({
38189
38521
  flatColumns,
38190
38522
  flatRows
38191
38523
  } = table2.store.states;
38192
- const ns2 = useNamespace("table");
38524
+ const ns2 = useNamespace$1("table");
38193
38525
  const {
38194
38526
  tableSpans,
38195
38527
  removeCells
@@ -38263,7 +38595,7 @@ var FixHeader = defineComponent({
38263
38595
  }
38264
38596
  },
38265
38597
  setup(props) {
38266
- const ns2 = useNamespace("table");
38598
+ const ns2 = useNamespace$1("table");
38267
38599
  const table2 = inject(TABLE_TOKEN, void 0);
38268
38600
  const showHeader = computed(() => Boolean(table2 == null ? void 0 : table2.props.showHeader));
38269
38601
  const {
@@ -38341,7 +38673,7 @@ var Table = defineComponent({
38341
38673
  } = useHorizontalScroll(table2);
38342
38674
  useTableWatcher(props, store);
38343
38675
  const isEmpty2 = computed(() => props.data.length === 0);
38344
- const ns2 = useNamespace("table");
38676
+ const ns2 = useNamespace$1("table");
38345
38677
  const hiddenColumns = ref(null);
38346
38678
  table2.hiddenColumns = hiddenColumns;
38347
38679
  table2.tableRef = tableRef;
@@ -38514,7 +38846,7 @@ const IconClose$1 = () => createVNode("svg", {
38514
38846
  "fill": "#252b3a",
38515
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"
38516
38848
  }, null)])]);
38517
- const ns$2 = useNamespace("table");
38849
+ const ns$2 = useNamespace$1("table");
38518
38850
  const cellMap = {
38519
38851
  checkable: {
38520
38852
  renderHeader(column2, store) {
@@ -38932,7 +39264,7 @@ var TagInput = defineComponent({
38932
39264
  setup(props, ctx2) {
38933
39265
  const app = getCurrentInstance();
38934
39266
  const t = createI18nTranslate("DTagInput", app);
38935
- const ns2 = useNamespace("tag-input");
39267
+ const ns2 = useNamespace$1("tag-input");
38936
39268
  const selectedTags = ref([]);
38937
39269
  watch(() => props.modelValue, () => {
38938
39270
  selectedTags.value = props.modelValue;
@@ -39346,7 +39678,7 @@ var TimePopup = defineComponent({
39346
39678
  setup(props, ctx2) {
39347
39679
  const app = getCurrentInstance();
39348
39680
  const t = createI18nTranslate("DTimePopup", app);
39349
- const ns2 = useNamespace("time-popup");
39681
+ const ns2 = useNamespace$1("time-popup");
39350
39682
  const popupDome = ref();
39351
39683
  const timeListDom = ref();
39352
39684
  const hourList = initializeTimeData("hour");
@@ -39419,7 +39751,7 @@ var TimePicker = defineComponent({
39419
39751
  props: timePickerProps,
39420
39752
  emits: ["change", "update:modelValue"],
39421
39753
  setup(props, ctx2) {
39422
- const ns2 = useNamespace("time-picker");
39754
+ const ns2 = useNamespace$1("time-picker");
39423
39755
  const activeHour = ref("00");
39424
39756
  const activeMinute = ref("00");
39425
39757
  const activeSecond = ref("00");
@@ -40149,7 +40481,7 @@ var transferHeader = defineComponent({
40149
40481
  setup(props, ctx2) {
40150
40482
  const app = getCurrentInstance();
40151
40483
  const t = createI18nTranslate("DTransfer", app);
40152
- const ns2 = useNamespace("transfer");
40484
+ const ns2 = useNamespace$1("transfer");
40153
40485
  const {
40154
40486
  allCheckedChangeHandle
40155
40487
  } = transferHeaderState$1(props, ctx2);
@@ -40365,7 +40697,7 @@ var transferBody = defineComponent({
40365
40697
  setup(props, ctx2) {
40366
40698
  const app = getCurrentInstance();
40367
40699
  const t = createI18nTranslate("DTransferBody", app);
40368
- const ns2 = useNamespace("transfer");
40700
+ const ns2 = useNamespace$1("transfer");
40369
40701
  const {
40370
40702
  bodyHeight,
40371
40703
  query,
@@ -40509,7 +40841,7 @@ var transferPanel = defineComponent({
40509
40841
  setup(props, ctx2) {
40510
40842
  const app = getCurrentInstance();
40511
40843
  const t = createI18nTranslate("DTransfer", app);
40512
- const ns2 = useNamespace("transfer");
40844
+ const ns2 = useNamespace$1("transfer");
40513
40845
  const {
40514
40846
  allChecked,
40515
40847
  allHalfchecked,
@@ -40600,7 +40932,7 @@ var transferOperate = defineComponent({
40600
40932
  },
40601
40933
  props: transferOperateProps,
40602
40934
  setup(props, ctx2) {
40603
- const ns2 = useNamespace("transfer");
40935
+ const ns2 = useNamespace$1("transfer");
40604
40936
  const {
40605
40937
  toTargetHandle,
40606
40938
  toSourceHandle
@@ -40875,7 +41207,7 @@ var Transfer = defineComponent({
40875
41207
  setup(props, ctx2) {
40876
41208
  const app = getCurrentInstance();
40877
41209
  const t = createI18nTranslate("DTransfer", app);
40878
- const ns2 = useNamespace("transfer");
41210
+ const ns2 = useNamespace$1("transfer");
40879
41211
  const {
40880
41212
  sourceTitle,
40881
41213
  targetTitle,
@@ -41286,7 +41618,7 @@ const formatBasicTree = (trees, keyName = "id", childrenName = "children", paren
41286
41618
  return curItem;
41287
41619
  });
41288
41620
  };
41289
- const ns$1 = useNamespace("tree");
41621
+ const ns$1 = useNamespace$1("tree");
41290
41622
  const dropTypeMap = {
41291
41623
  dropPrev: ns$1.em("node", "drop-prev"),
41292
41624
  dropNext: ns$1.em("node", "drop-next"),
@@ -41822,7 +42154,7 @@ function useTree(tree2, plugins = [], context) {
41822
42154
  treeData
41823
42155
  }, pluginMethods), core);
41824
42156
  }
41825
- const ns = useNamespace("tree");
42157
+ const ns = useNamespace$1("tree");
41826
42158
  function useTreeNode(data) {
41827
42159
  const nodeClass = computed(() => {
41828
42160
  var _a;
@@ -41897,7 +42229,7 @@ var DTreeNodeToggle = defineComponent({
41897
42229
  const {
41898
42230
  toggleNode
41899
42231
  } = inject(USE_TREE_TOKEN);
41900
- const ns2 = useNamespace("tree");
42232
+ const ns2 = useNamespace$1("tree");
41901
42233
  return () => {
41902
42234
  var _a;
41903
42235
  return createVNode("span", {
@@ -41923,7 +42255,7 @@ var DTreeNodeLoading = defineComponent({
41923
42255
  setup() {
41924
42256
  const app = getCurrentInstance();
41925
42257
  const t = createI18nTranslate("DTree", app);
41926
- const ns2 = useNamespace("loading-children ");
42258
+ const ns2 = useNamespace$1("loading-children ");
41927
42259
  return () => {
41928
42260
  return createVNode("span", {
41929
42261
  "class": ns2.b()
@@ -41987,7 +42319,7 @@ var DTreeNode = defineComponent({
41987
42319
  onDragend
41988
42320
  } = inject(USE_TREE_TOKEN);
41989
42321
  const treeInstance = inject(TREE_INSTANCE);
41990
- const ns2 = useNamespace("tree");
42322
+ const ns2 = useNamespace$1("tree");
41991
42323
  const {
41992
42324
  nodeClass,
41993
42325
  nodeStyle,
@@ -42119,7 +42451,7 @@ var Tree = defineComponent({
42119
42451
  dragdrop,
42120
42452
  operate
42121
42453
  } = toRefs(props);
42122
- const ns2 = useNamespace("tree");
42454
+ const ns2 = useNamespace$1("tree");
42123
42455
  const normalRef = ref();
42124
42456
  const data = ref(formatBasicTree(props.data));
42125
42457
  const userPlugins = [useSelect$1(), useOperate(), useMergeNodes(), useSearchFilter()];
@@ -43000,10 +43332,10 @@ var Upload = defineComponent({
43000
43332
  limit,
43001
43333
  httpRequest
43002
43334
  } = toRefs(props);
43003
- const ns2 = useNamespace("upload");
43004
- const inputGroupNs = useNamespace("input-group");
43005
- const formControlNs = useNamespace("form-control");
43006
- 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");
43007
43339
  const {
43008
43340
  triggerSelectFiles,
43009
43341
  _validateFiles,
@@ -43389,7 +43721,7 @@ const installs = [
43389
43721
  VirtualListInstall
43390
43722
  ];
43391
43723
  var vueDevui = {
43392
- version: "1.5.9",
43724
+ version: "1.5.10",
43393
43725
  install(app) {
43394
43726
  installs.forEach((p) => app.use(p));
43395
43727
  }