hys-ui 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +68 -73
  3. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
  4. package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +467 -2
  5. package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.js +7 -0
  6. package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas2.vue.js +166 -0
  7. package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.js +7 -0
  8. package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits2.vue.js +105 -0
  9. package/dist/components/HysAnimatedNumber/animation/digital.js +186 -0
  10. package/dist/components/HysAnimatedNumber/animation/morph.js +110 -0
  11. package/dist/components/HysAnimatedNumber/animation/paint.js +34 -0
  12. package/dist/components/HysAnimatedNumber/animation/particles.js +51 -0
  13. package/dist/components/HysAnimatedNumber/animation/paths.js +165 -0
  14. package/dist/components/HysAnimatedNumber/animation/physics.js +66 -0
  15. package/dist/components/HysAnimatedNumber/animation/render.js +89 -0
  16. package/dist/components/HysAnimatedNumber/animation/reveal.js +125 -0
  17. package/dist/components/HysAnimatedNumber/animation/rolling.js +66 -0
  18. package/dist/components/HysAnimatedNumber/animation/scenarios.js +217 -0
  19. package/dist/components/HysAnimatedNumber/animation/spatial.js +112 -0
  20. package/dist/components/HysAnimatedNumber/useNumberCountdown.js +58 -0
  21. package/dist/components/HysAnimatedNumber/useNumberVisuals.js +60 -0
  22. package/dist/components/HysButton/HysButton.vue.js +2 -2
  23. package/dist/components/HysButton/HysButton2.vue.js +227 -60
  24. package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
  25. package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
  26. package/dist/components/HysFormItem/HysFormItem.vue.js +1 -1
  27. package/dist/components/HysFormItem/HysFormItem2.vue.js +231 -229
  28. package/dist/components/HysInput/HysInput.vue.js +2 -2
  29. package/dist/components/HysInput/HysInput2.vue.js +327 -274
  30. package/dist/components/HysMention/HysMention.vue.js +1 -1
  31. package/dist/components/HysMention/HysMention2.vue.js +1092 -154
  32. package/dist/components/HysModal/HysModal.vue.js +3 -3
  33. package/dist/components/HysModal/HysModal2.vue.js +81 -80
  34. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  35. package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
  36. package/dist/components/HysSearch/HysSearch.vue.js +5 -82
  37. package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
  38. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  39. package/dist/components/HysSelect/HysSelect2.vue.js +472 -443
  40. package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
  41. package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
  42. package/dist/components/HysTable/HysTable.vue.js +2 -2
  43. package/dist/components/HysTable/HysTable2.vue.js +1418 -1150
  44. package/dist/components/HysTextarea/HysTextarea.vue.js +56 -32
  45. package/dist/components/HysTour/HysTour.vue.js +291 -67
  46. package/dist/components/HysTour/HysTour3.vue.js +5 -0
  47. package/dist/composables/animatedNumberDigits.js +106 -0
  48. package/dist/composables/animatedNumberFormat.js +222 -0
  49. package/dist/composables/animatedNumberTiming.js +66 -0
  50. package/dist/composables/buttonGroup.js +12 -0
  51. package/dist/composables/floatingPosition.js +18 -0
  52. package/dist/composables/mentionDocument.js +79 -0
  53. package/dist/composables/mentionEditor.js +58 -0
  54. package/dist/composables/numberAnimation.js +72 -0
  55. package/dist/composables/numberAnimationCatalog.js +301 -0
  56. package/dist/composables/numberAnimationSequence.js +45 -0
  57. package/dist/composables/selectOptions.js +44 -38
  58. package/dist/composables/splitPaneSizes.js +58 -0
  59. package/dist/composables/table.js +128 -105
  60. package/dist/composables/textInput.js +23 -14
  61. package/dist/composables/useDialog.js +50 -50
  62. package/dist/composables/useFloating.js +107 -103
  63. package/dist/composables/useHysAnimatedNumber.js +264 -0
  64. package/dist/composables/useHysNumberAnimationGroup.js +23 -0
  65. package/dist/composables/useMentionCaret.js +81 -0
  66. package/dist/composables/useMentionList.js +81 -0
  67. package/dist/composables/useMentionModel.js +90 -0
  68. package/dist/composables/useMentionOptions.js +421 -0
  69. package/dist/composables/useSplitPaneDrag.js +52 -0
  70. package/dist/composables/useSplitPaneStorage.js +38 -0
  71. package/dist/composables/useTable.js +344 -312
  72. package/dist/composables/useTableSticky.js +79 -0
  73. package/dist/composables/useTextareaSize.js +62 -46
  74. package/dist/composables/useTourLayout.js +129 -0
  75. package/dist/config.js +11 -11
  76. package/dist/index.js +183 -152
  77. package/dist/internal/MultiSplitPane.vue.js +305 -0
  78. package/dist/internal/MultiSplitPane2.vue.js +4 -0
  79. package/dist/style.css +1 -1
  80. package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +99 -6
  81. package/dist/types/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.d.ts +19 -0
  82. package/dist/types/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.d.ts +31 -0
  83. package/dist/types/components/HysAnimatedNumber/animation/digital.d.ts +3 -0
  84. package/dist/types/components/HysAnimatedNumber/animation/morph.d.ts +2 -0
  85. package/dist/types/components/HysAnimatedNumber/animation/paint.d.ts +44 -0
  86. package/dist/types/components/HysAnimatedNumber/animation/particles.d.ts +5 -0
  87. package/dist/types/components/HysAnimatedNumber/animation/paths.d.ts +12 -0
  88. package/dist/types/components/HysAnimatedNumber/animation/physics.d.ts +2 -0
  89. package/dist/types/components/HysAnimatedNumber/animation/render.d.ts +2 -0
  90. package/dist/types/components/HysAnimatedNumber/animation/reveal.d.ts +2 -0
  91. package/dist/types/components/HysAnimatedNumber/animation/rolling.d.ts +2 -0
  92. package/dist/types/components/HysAnimatedNumber/animation/scenarios.d.ts +4 -0
  93. package/dist/types/components/HysAnimatedNumber/animation/spatial.d.ts +2 -0
  94. package/dist/types/components/HysAnimatedNumber/useNumberCountdown.d.ts +8 -0
  95. package/dist/types/components/HysAnimatedNumber/useNumberVisuals.d.ts +12 -0
  96. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +12 -3
  97. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +2 -2
  98. package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
  99. package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
  100. package/dist/types/components/HysCard/HysCard.vue.d.ts +1 -1
  101. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +3 -3
  102. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +3 -3
  103. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +3 -3
  104. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +2 -2
  105. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +3 -3
  106. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +6 -6
  107. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +3 -3
  108. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +2 -2
  109. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
  110. package/dist/types/components/HysInput/HysInput.vue.d.ts +13 -1
  111. package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -40
  112. package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
  113. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
  114. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
  115. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +1 -1
  116. package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
  117. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +46 -8
  118. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +6 -1
  119. package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +2 -2
  120. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
  121. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
  122. package/dist/types/components/HysTable/HysTable.vue.d.ts +1740 -3
  123. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +1 -1
  124. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +1 -1
  125. package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +13 -2
  126. package/dist/types/components/HysToast/HysToast.vue.d.ts +1 -1
  127. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +1 -1
  128. package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -9
  129. package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +3 -3
  130. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +2 -2
  131. package/dist/types/composables/animatedNumber.d.ts +220 -0
  132. package/dist/types/composables/animatedNumberDigits.d.ts +32 -0
  133. package/dist/types/composables/animatedNumberFormat.d.ts +16 -0
  134. package/dist/types/composables/animatedNumberTiming.d.ts +21 -0
  135. package/dist/types/composables/buttonGroup.d.ts +9 -0
  136. package/dist/types/composables/drawer.d.ts +1 -1
  137. package/dist/types/composables/floatingPosition.d.ts +14 -0
  138. package/dist/types/composables/mention.d.ts +284 -0
  139. package/dist/types/composables/mentionDocument.d.ts +15 -0
  140. package/dist/types/composables/mentionEditor.d.ts +7 -0
  141. package/dist/types/composables/modal.d.ts +2 -0
  142. package/dist/types/composables/numberAnimation.d.ts +29 -0
  143. package/dist/types/composables/numberAnimationCatalog.d.ts +58 -0
  144. package/dist/types/composables/numberAnimationSequence.d.ts +13 -0
  145. package/dist/types/composables/selectOptions.d.ts +5 -0
  146. package/dist/types/composables/splitPaneSizes.d.ts +11 -0
  147. package/dist/types/composables/table.d.ts +116 -6
  148. package/dist/types/composables/textInput.d.ts +39 -4
  149. package/dist/types/composables/tour.d.ts +68 -0
  150. package/dist/types/composables/useFloating.d.ts +1 -1
  151. package/dist/types/composables/useHysAnimatedNumber.d.ts +37 -0
  152. package/dist/types/composables/useHysNumberAnimationGroup.d.ts +4 -0
  153. package/dist/types/composables/useMentionCaret.d.ts +6 -0
  154. package/dist/types/composables/useMentionList.d.ts +23 -0
  155. package/dist/types/composables/useMentionModel.d.ts +14 -0
  156. package/dist/types/composables/useMentionOptions.d.ts +26 -0
  157. package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
  158. package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
  159. package/dist/types/composables/useTable.d.ts +7 -3
  160. package/dist/types/composables/useTableSticky.d.ts +22 -0
  161. package/dist/types/composables/useTextareaSize.d.ts +5 -2
  162. package/dist/types/composables/useTourLayout.d.ts +33 -0
  163. package/dist/types/config.d.ts +1 -0
  164. package/dist/types/index.d.ts +46 -1
  165. package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
  166. package/package.json +3 -2
  167. package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
  168. package/dist/components/HysTour/HysTour2.vue.js +0 -4
@@ -1,178 +1,1116 @@
1
- import { defineComponent as ae, useModel as oe, ref as b, useId as le, computed as C, watch as D, onBeforeUnmount as ne, onDeactivated as ie, openBlock as M, createElementBlock as S, mergeProps as O, unref as l, withDirectives as re, createElementVNode as A, vModelText as se, createBlock as de, Teleport as ue, createVNode as pe, withCtx as ce, Fragment as ve, renderList as fe, withModifiers as he, normalizeClass as me, renderSlot as ge, toDisplayString as U, createCommentVNode as be, mergeModels as K, nextTick as j } from "vue";
2
- import ye from "../../motion/PopupMotion.js";
3
- import { useHysControlState as xe } from "../../composables/formContext.js";
4
- import { useHysRootAttrs as we } from "../../config.js";
5
- import { useFloating as ke } from "../../composables/useFloating.js";
6
- const Ce = ["placeholder", "disabled", "readonly", "maxlength", "aria-label", "aria-controls", "aria-expanded", "aria-activedescendant"], Me = ["id"], Le = ["id", "disabled", "aria-selected", "data-active", "onPointerenter", "onClick"], Te = {
1
+ import { defineComponent as ga, useAttrs as ba, useSlots as xa, useId as ka, computed as y, ref as E, shallowRef as Mt, watch as A, onDeactivated as Ma, onMounted as wt, openBlock as d, createElementBlock as h, mergeProps as Me, unref as r, createElementVNode as X, renderSlot as F, createCommentVNode as T, normalizeClass as we, Fragment as Z, renderList as Ct, toDisplayString as B, createTextVNode as V, toHandlers as Dt, createBlock as Ce, resolveDynamicComponent as wa, withModifiers as De, Teleport as Ca, createVNode as Da, withCtx as Ta, normalizeStyle as re, nextTick as Ie, h as Tt } from "vue";
2
+ import Sa from "../../motion/PopupMotion.js";
3
+ import { useHysControlState as Ba, useHysFormItemContext as za } from "../../composables/formContext.js";
4
+ import { useHysRootAttrs as Ea } from "../../config.js";
5
+ import { useFloating as Aa } from "../../composables/useFloating.js";
6
+ import { useMentionCaret as Fa } from "../../composables/useMentionCaret.js";
7
+ import { useMentionOptions as Ra } from "../../composables/useMentionOptions.js";
8
+ import { useMentionList as Wa } from "../../composables/useMentionList.js";
9
+ import { useMentionModel as La, diffMentionEntities as qa } from "../../composables/useMentionModel.js";
10
+ import { mentionTriggers as Oa, mentionSegments as Ha, rebaseMentionEntities as $e, serializeMentionDocument as St, matchMention as Ia, normalizeMentionEntities as Bt, deserializeMentionDocument as zt } from "../../composables/mentionDocument.js";
11
+ import { readMentionSelection as Et, isNativeMentionInput as At, writeMentionSelection as $a } from "../../composables/mentionEditor.js";
12
+ const Na = ["data-size", "data-status"], Pa = { class: "hys-ui-mention-input-row" }, Ka = {
13
+ key: 0,
14
+ class: "hys-ui-mention-affix"
15
+ }, ja = ["data-invalid"], Va = ["textContent", "contenteditable", "tabindex", "data-placeholder"], Ua = ["name", "value", "disabled"], Qa = {
16
+ key: 1,
17
+ class: "hys-ui-mention-affix"
18
+ }, Ya = ["aria-label"], Ga = {
19
+ key: 0,
20
+ class: "hys-ui-mention-count"
21
+ }, Ja = ["data-placement"], Xa = {
22
+ key: 1,
23
+ class: "hys-ui-mention-message",
24
+ role: "status"
25
+ }, Za = {
26
+ key: 2,
27
+ class: "hys-ui-mention-message",
28
+ role: "status"
29
+ }, _a = ["id", "aria-label", "aria-busy"], en = ["id", "aria-label", "aria-posinset", "aria-setsize", "disabled", "aria-selected", "data-active", "data-create", "onPointerenter", "onClick"], tn = ["src"], an = {
30
+ key: 1,
7
31
  class: "hys-ui-mention-avatar",
8
32
  "aria-hidden": "true"
9
- }, Re = /* @__PURE__ */ ae({
33
+ }, nn = { class: "hys-ui-mention-label" }, ln = { key: 2 }, on = {
34
+ key: 3,
35
+ class: "hys-ui-mention-message",
36
+ role: "status"
37
+ }, rn = ["disabled"], Ft = "application/x-hys-mention+json", xn = /* @__PURE__ */ ga({
38
+ inheritAttrs: !1,
10
39
  __name: "HysMention",
11
- props: /* @__PURE__ */ K({
12
- popupTransition: {},
13
- popupTransitionDuration: {},
40
+ props: {
41
+ modelValue: {},
14
42
  users: {},
43
+ options: {},
44
+ fieldNames: {},
45
+ loadOptions: {},
46
+ sources: {},
47
+ debounce: { default: 180 },
48
+ throttle: {},
49
+ pageSize: {},
50
+ cache: { type: [Boolean, Object] },
51
+ historyKey: {},
52
+ recentLimit: {},
53
+ recommendations: {},
54
+ recommendOnFocus: { type: Boolean },
55
+ minQueryLength: { default: 0 },
56
+ defaultValue: { default: "" },
57
+ prefix: {},
58
+ triggers: {},
59
+ boundary: {},
60
+ allowSpaces: { type: Boolean },
61
+ matchTrigger: {},
62
+ split: { default: " " },
63
+ filterOption: { type: [Boolean, Function], default: void 0 },
64
+ searchMode: {},
65
+ searchFields: {},
66
+ sortOptions: { type: [Boolean, Function] },
67
+ groupBy: {},
68
+ validateSearch: {},
69
+ whole: { type: Boolean },
70
+ checkIsWhole: {},
71
+ validateEntity: {},
72
+ invalidEntity: { default: "mark" },
73
+ canSelect: {},
74
+ beforeRemove: {},
75
+ parseEntities: {},
76
+ highlightMentions: { type: Boolean },
77
+ entityClass: {},
78
+ allowCreate: { type: Boolean },
79
+ createOption: {},
80
+ formatMention: {},
81
+ replaceRest: { type: Boolean },
82
+ selectOnTab: { type: Boolean },
83
+ highlightMatch: { type: Boolean },
84
+ loading: { type: Boolean },
85
+ notFoundText: {},
86
+ errorText: {},
87
+ maxOptions: { default: 8 },
88
+ placement: { default: "bottom-start" },
89
+ showArrow: { type: Boolean },
90
+ offset: { default: 6 },
91
+ autoAdjustOverflow: { type: Boolean, default: !0 },
92
+ popupWidth: {},
93
+ popupMaxHeight: {},
94
+ zIndex: {},
95
+ virtual: { type: Boolean },
96
+ itemHeight: {},
97
+ overscan: {},
98
+ appendTo: { type: [String, Boolean], default: "body" },
99
+ popupClass: {},
100
+ popupStyle: { type: [Boolean, null, String, Object, Array] },
101
+ type: { default: "textarea" },
102
+ rows: {},
103
+ name: {},
104
+ autofocus: { type: Boolean },
15
105
  placeholder: {},
16
106
  disabled: { type: Boolean },
17
107
  readonly: { type: Boolean },
18
108
  maxlength: {},
19
- ariaLabel: {}
20
- }, {
21
- modelValue: { default: "" },
22
- modelModifiers: {}
23
- }),
24
- emits: /* @__PURE__ */ K(["select", "change"], ["update:modelValue"]),
25
- setup(h, { expose: q, emit: J }) {
26
- const m = h, { disabled: F, label: G } = xe(m), r = oe(h, "modelValue"), V = J, z = we(), n = b(0), p = b(!1), R = b(!1), s = b(), $ = b(), L = b(r.value.length), T = le(), Q = C(() => s.value ? { getBoundingClientRect: _, contains: (e) => {
109
+ minlength: {},
110
+ required: { type: Boolean },
111
+ clearable: { type: Boolean },
112
+ showCount: { type: Boolean },
113
+ autosize: { type: [Boolean, Object] },
114
+ restoreFocus: { type: Boolean, default: !0 },
115
+ shortcuts: {},
116
+ locale: {},
117
+ defaultEntities: {},
118
+ entities: {},
119
+ ariaLabel: {},
120
+ status: {},
121
+ size: {},
122
+ popupTransition: {},
123
+ popupTransitionDuration: {}
124
+ },
125
+ emits: ["update:modelValue", "update:entities", "select", "search", "create", "loadError", "openChange", "change", "documentChange", "entityAdd", "entityRemove", "wholeRemove", "clear", "focus", "blur"],
126
+ setup(f, { expose: Rt, emit: Wt }) {
127
+ const n = f, g = Wt, U = ba(), Te = xa(), Ne = Ea(), { disabled: _, size: Lt, label: qt } = Ba(n), se = za(), Se = ka(), R = y(() => ({
128
+ input: "提及输入",
129
+ list: "提及候选成员",
130
+ placeholder: "输入 @ 提及成员",
131
+ loading: "正在加载候选…",
132
+ empty: "没有匹配的候选",
133
+ error: n.errorText ?? "候选加载失败",
134
+ retry: "重试",
135
+ more: "加载更多",
136
+ recent: "最近使用",
137
+ recommended: "常用推荐",
138
+ clear: "清空输入",
139
+ create: "创建 {value}",
140
+ ...n.locale
141
+ })), P = La(
142
+ n,
143
+ (e, t, a) => {
144
+ a && g("update:modelValue", e.text), g("update:entities", e.entities), a && g("change", e.text);
145
+ },
146
+ (e, t) => {
147
+ const { added: a, removed: l } = qa(
148
+ t.entities,
149
+ e.entities
150
+ );
151
+ for (const i of l) g("entityRemove", i);
152
+ for (const i of a) g("entityAdd", i);
153
+ g("documentChange", e);
154
+ }
155
+ ), { value: s, entities: q } = P, u = E(), ue = E(), Pe = E(), ce = E(), Ke = Mt({}), W = E(s.value.length), H = E(!1), je = E(!1), Ve = E(!1), M = E(!1), de = E(""), w = E(!1), I = E(0), C = Mt(), b = y(() => !_.value && !n.readonly), x = y(() => n.type === "rich"), z = y(
156
+ () => Number.isFinite(n.maxlength) ? Math.max(0, Math.floor(n.maxlength)) : void 0
157
+ ), Be = y(
158
+ () => Number.isFinite(n.minlength) ? Math.max(0, Math.floor(n.minlength)) : void 0
159
+ ), ze = y(() => n.required || se.required.value), Ue = y(
160
+ () => n.status === "error" || se.invalid.value || z.value !== void 0 && s.value.length > z.value || je.value && (ze.value && !s.value || !!s.value && Be.value !== void 0 && s.value.length < Be.value)
161
+ ), $ = y(() => Oa(n)), ve = (e) => $.value.find((t) => t.prefix === e), Q = (e) => {
27
162
  var t;
28
- return !!((t = s.value) != null && t.contains(e));
29
- }, focus: () => {
30
- var e;
31
- return (e = s.value) == null ? void 0 : e.focus();
32
- }, get isConnected() {
33
- var e;
34
- return !!((e = s.value) != null && e.isConnected);
35
- } } : void 0), { placement: X, open: c, style: Y, show: H, close: y, update: Z } = ke(Q, $, { gap: 6 }), E = C(() => r.value.slice(0, L.value)), P = C(() => {
36
- var e;
37
- return ((e = E.value.match(/@([^\s@]*)$/)) == null ? void 0 : e[1]) ?? null;
163
+ return ((t = ve(e)) == null ? void 0 : t.split) ?? n.split;
164
+ }, Ee = (e, t) => Ia(e, t, $.value, n), Ae = y(() => Ee(s.value, W.value)), m = y(() => {
165
+ var i;
166
+ if (!H.value || !b.value || M.value) return;
167
+ const e = n.recommendOnFocus && $.value.length ? {
168
+ prefix: $.value[0].prefix,
169
+ query: "",
170
+ start: W.value,
171
+ end: W.value,
172
+ manual: !0
173
+ } : void 0, t = C.value ?? Ae.value ?? e;
174
+ if (!t) return;
175
+ const a = ve(t.prefix), l = (a == null ? void 0 : a.minQueryLength) ?? n.minQueryLength;
176
+ if (!(!t.manual && Number.isFinite(l) && Array.from(t.query).length < Math.max(0, l) || ((i = n.validateSearch) == null ? void 0 : i.call(n, t.query, t)) === !1))
177
+ return t;
178
+ }), Ot = y(
179
+ () => m.value && ve(m.value.prefix)
180
+ ), {
181
+ entries: Ht,
182
+ choices: ee,
183
+ busy: Y,
184
+ loadingMore: fe,
185
+ hasMore: Fe,
186
+ loadError: G,
187
+ retry: te,
188
+ loadMore: J,
189
+ cancelLoad: Qe,
190
+ remember: It
191
+ } = Ra(
192
+ n,
193
+ m,
194
+ Ot,
195
+ w,
196
+ s,
197
+ (e, t) => g("loadError", e, t)
198
+ ), {
199
+ rows: sn,
200
+ enabled: ae,
201
+ visibleRows: Ye,
202
+ topSpacer: Ge,
203
+ bottomSpacer: Je,
204
+ rowHeight: Xe,
205
+ onScroll: Ze,
206
+ reset: $t,
207
+ ensureVisible: Nt
208
+ } = Wa(n, ee, Pe, J), S = y(() => ae.value[I.value]);
209
+ A(
210
+ [
211
+ () => {
212
+ var e;
213
+ return (e = m.value) == null ? void 0 : e.query;
214
+ },
215
+ () => {
216
+ var e;
217
+ return (e = m.value) == null ? void 0 : e.prefix;
218
+ },
219
+ () => {
220
+ var e;
221
+ return (e = m.value) == null ? void 0 : e.start;
222
+ }
223
+ ],
224
+ () => {
225
+ I.value = 0, w.value = !1, $t();
226
+ const e = m.value;
227
+ e && g("search", e.query, e.prefix, e);
228
+ }
229
+ ), A(ae, (e, t) => {
230
+ var i;
231
+ const a = (i = t[I.value]) == null ? void 0 : i.key, l = a === void 0 ? -1 : e.findIndex((o) => o.key === a);
232
+ I.value = l >= 0 ? l : Math.min(I.value, Math.max(0, e.length - 1));
38
233
  });
39
- let i;
40
- function W() {
41
- i == null || i.remove(), i = void 0;
42
- }
43
- function _() {
44
- const e = s.value, t = e.getBoundingClientRect();
45
- if (!t.width && !t.height) return t;
46
- const o = getComputedStyle(e);
47
- i || (i = document.createElement("div"), i.setAttribute("aria-hidden", "true"), document.body.append(i));
48
- for (const N of ["direction", "font", "font-family", "font-size", "font-weight", "font-style", "font-variant", "letter-spacing", "word-spacing", "text-transform", "text-indent", "text-align", "line-height", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "box-sizing", "tab-size"]) i.style.setProperty(N, o.getPropertyValue(N));
49
- Object.assign(i.style, { position: "fixed", top: "0px", left: "-10000px", visibility: "hidden", pointerEvents: "none", height: "auto", overflow: "hidden", whiteSpace: e.wrap === "off" ? "pre" : "pre-wrap", overflowWrap: "break-word", wordBreak: o.wordBreak });
50
- const a = parseFloat(o.borderLeftWidth) || 0, v = parseFloat(o.borderTopWidth) || 0;
51
- i.style.width = (e.clientWidth || t.width - a - (parseFloat(o.borderRightWidth) || 0)) + a + (parseFloat(o.borderRightWidth) || 0) + "px";
52
- const u = Math.max(0, E.value.lastIndexOf("@"));
53
- i.textContent = r.value.slice(0, u);
54
- const f = document.createElement("span");
55
- f.textContent = r.value.slice(u) || "@", i.append(f);
56
- const k = parseFloat(o.lineHeight) || (parseFloat(o.fontSize) || 14) * 1.6, g = t.left + f.offsetLeft + a - e.scrollLeft, B = t.top + f.offsetTop + v - e.scrollTop;
57
- return { x: g, y: B, left: g, top: B, right: g + 1, bottom: B + k, width: 1, height: k, toJSON: () => ({ left: g, top: B, width: 1, height: k }) };
58
- }
59
- D(c, (e) => {
60
- e || W();
61
- }), ne(W), ie(W);
62
- const x = C(() => P.value === null || F.value || m.readonly || p.value || !R.value ? [] : m.users.filter((e) => e.name.toLocaleLowerCase().includes(P.value.toLocaleLowerCase())).slice(0, 8)), d = C(() => x.value.filter((e) => !e.disabled));
63
- D(P, () => {
64
- n.value = 0, p.value = !1;
65
- }), D(x, (e) => {
66
- n.value = Math.min(n.value, Math.max(0, d.value.length - 1)), e.length ? H() : y();
67
- }, { flush: "post" });
68
- async function w() {
234
+ const he = y(
235
+ () => !!m.value && !w.value && (ee.value.length > 0 || Y.value || !!G.value || !!C.value || !!m.value.manual || n.notFoundText !== void 0 || !!Te.empty)
236
+ ), { anchor: Pt, removeMirror: Kt } = Fa(
237
+ u,
238
+ s,
239
+ () => {
240
+ var e, t;
241
+ return ((e = m.value) == null ? void 0 : e.start) ?? ((t = Ae.value) == null ? void 0 : t.start) ?? W.value;
242
+ }
243
+ );
244
+ function jt(e) {
245
+ return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) + "px" : typeof e == "string" ? e : void 0;
246
+ }
247
+ const { placement: _e, open: D, style: Vt, show: Re, close: We, update: et, schedule: ne } = Aa(
248
+ Pt,
249
+ ue,
250
+ {
251
+ placement: () => n.placement,
252
+ get strategy() {
253
+ return n.appendTo === "body" ? "fixed" : "absolute";
254
+ },
255
+ get gap() {
256
+ return n.offset;
257
+ },
258
+ get autoAdjustOverflow() {
259
+ return n.autoAdjustOverflow;
260
+ },
261
+ width: () => n.popupWidth,
262
+ zIndex: () => n.zIndex,
263
+ closeOnEscape: !1,
264
+ closeOnTab: !1,
265
+ onPosition({ anchor: e, placement: t, x: a, y: l, width: i, height: o }) {
266
+ if (!n.showArrow) return;
267
+ const v = (c, L) => Math.max(8, Math.min(L - 8, c)) + "px";
268
+ Ke.value = t.startsWith("top") || t.startsWith("bottom") ? { left: v(e.left + e.width / 2 - a, i) } : { top: v(e.top + e.height / 2 - l, o) };
269
+ }
270
+ }
271
+ ), tt = y(() => {
272
+ const e = jt(n.popupMaxHeight);
273
+ return e ? "min(" + e + ", calc(100dvh - 20px))" : void 0;
274
+ });
275
+ A(
276
+ [he, ee],
277
+ ([e]) => {
278
+ e ? Re() : We();
279
+ },
280
+ { flush: "post" }
281
+ ), A(D, (e) => {
282
+ e || Kt(), g("openChange", e);
283
+ }), A(
284
+ [D, u, ue],
285
+ ([e, t, a], l, i) => {
286
+ if (!e || !t || !a || typeof ResizeObserver > "u")
287
+ return;
288
+ const o = new ResizeObserver(ne);
289
+ o.observe(t), o.observe(a), i(() => o.disconnect());
290
+ },
291
+ { flush: "post" }
292
+ ), A(
293
+ [
294
+ () => n.placement,
295
+ () => n.offset,
296
+ () => n.showArrow,
297
+ () => n.popupWidth,
298
+ tt
299
+ ],
300
+ ne,
301
+ { flush: "post" }
302
+ ), Ma(() => {
303
+ H.value = !1, M.value = !1, C.value = void 0;
304
+ });
305
+ function k() {
306
+ return u.value ? Et(u.value, W.value) : { start: W.value, end: W.value };
307
+ }
308
+ function le() {
309
+ W.value = k().start, D.value && ne();
310
+ }
311
+ function K(e) {
312
+ u.value && (!x.value || H.value || u.value.ownerDocument.activeElement === u.value) && $a(u.value, e), W.value = e.start, D.value && ne();
313
+ }
314
+ function O() {
315
+ w.value = !0, Qe(), We();
316
+ }
317
+ function at(e) {
318
+ var l;
319
+ if (!b.value || !u.value || M.value) return !1;
320
+ if (u.value.focus(), H.value = !0, !(e != null && e.prefix) && !(e != null && e.query) && (e == null ? void 0 : e.position) === void 0 && Ae.value)
321
+ return w.value = !1, Ie(() => {
322
+ he.value && Re();
323
+ }), !0;
324
+ const t = Math.max(
325
+ 0,
326
+ Math.min(s.value.length, (e == null ? void 0 : e.position) ?? k().start)
327
+ ), a = (e == null ? void 0 : e.prefix) ?? ((l = $.value[0]) == null ? void 0 : l.prefix) ?? "@";
328
+ return K({ start: t, end: t }), C.value = {
329
+ prefix: a,
330
+ query: (e == null ? void 0 : e.query) ?? "",
331
+ start: t,
332
+ end: t,
333
+ manual: !0
334
+ }, w.value = !1, Ie(() => {
335
+ he.value && Re();
336
+ }), !0;
337
+ }
338
+ function nt(e) {
339
+ return At(e) ? e.value : e.textContent ?? "";
340
+ }
341
+ const ye = y(() => Ha(s.value, q.value));
342
+ function lt(e) {
343
+ return typeof n.entityClass == "function" ? n.entityClass(e) : n.entityClass;
344
+ }
345
+ function it(e) {
346
+ var t;
347
+ return ((t = n.validateEntity) == null ? void 0 : t.call(n, e)) === !1;
348
+ }
349
+ function pe(e) {
350
+ const t = u.value;
351
+ if (!x.value || !t || M.value) return;
352
+ const a = t.ownerDocument, l = a.createDocumentFragment();
353
+ for (const i of ye.value)
354
+ if (!i.entity) l.append(a.createTextNode(i.text));
355
+ else {
356
+ const o = a.createElement("span");
357
+ o.setAttribute("data-mention-entity", String(i.entity.id)), o.setAttribute("data-mention-start", String(i.entity.start)), o.setAttribute("contenteditable", "false"), it(i.entity) && o.setAttribute("aria-invalid", "true"), o.className = ["hys-ui-mention-entity", lt(i.entity)].filter(Boolean).join(" "), o.textContent = i.text, l.append(o);
358
+ }
359
+ t.replaceChildren(l), e && H.value && K(e);
360
+ }
361
+ A(
362
+ [
363
+ ye,
364
+ x,
365
+ () => n.entityClass,
366
+ () => n.validateEntity,
367
+ u
368
+ ],
369
+ () => {
370
+ const e = H.value ? k() : void 0;
371
+ pe(e);
372
+ },
373
+ { flush: "post" }
374
+ ), wt(() => {
69
375
  var e;
70
- await j(), L.value = ((e = s.value) == null ? void 0 : e.selectionStart) ?? r.value.length, c.value && Z();
71
- }
72
- D(r, () => void w(), { flush: "post" });
73
- async function I(e) {
74
- var v, u;
75
- if (!e || e.disabled || F.value || m.readonly) return;
76
- const t = E.value.replace(/@[^\s@]*$/, "@" + e.name + " "), o = r.value.slice(L.value), a = o.startsWith(" ") ? o.slice(1) : o;
77
- r.value = t + a, p.value = !0, n.value = 0, y(), V("select", e), V("change", r.value), await j(), (v = s.value) == null || v.focus(), (u = s.value) == null || u.setSelectionRange(t.length, t.length), L.value = t.length;
78
- }
79
- function ee(e) {
80
- var t, o;
81
- if (e.key === "Tab") {
82
- p.value = !0, y();
376
+ Ve.value = !0, pe(), n.autofocus && ((e = u.value) == null || e.focus());
377
+ });
378
+ function Le() {
379
+ u.value && ce.value && (ce.value.scrollTop = u.value.scrollTop, ce.value.scrollLeft = u.value.scrollLeft);
380
+ }
381
+ function Ut() {
382
+ Le(), D.value && et();
383
+ }
384
+ function qe() {
385
+ const e = u.value;
386
+ if (!e || !n.autosize || !(e instanceof HTMLTextAreaElement)) {
387
+ e instanceof HTMLTextAreaElement && (e.style.removeProperty("height"), e.style.removeProperty("overflow-y"));
83
388
  return;
84
389
  }
85
- x.value.length && (e.key === "Escape" ? (e.preventDefault(), p.value = !0, y()) : e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), c.value ? n.value = (n.value + (e.key === "ArrowDown" ? 1 : -1) + Math.max(1, d.value.length)) % Math.max(1, d.value.length) : H(), (o = (t = $.value) == null ? void 0 : t.querySelector('[data-active="true"]')) == null || o.scrollIntoView({ block: "nearest" })) : e.key === "Enter" && !e.isComposing && d.value[n.value] && (e.preventDefault(), I(d.value[n.value])));
390
+ const t = typeof n.autosize == "object" ? n.autosize : {}, a = getComputedStyle(e), l = parseFloat(a.lineHeight) || (parseFloat(a.fontSize) || 14) * 1.6, i = (parseFloat(a.borderTopWidth) || 0) + (parseFloat(a.borderBottomWidth) || 0), o = (parseFloat(a.paddingTop) || 0) + (parseFloat(a.paddingBottom) || 0), v = Math.max(1, t.minRows ?? n.rows ?? 2) * l + o + i, c = t.maxRows === void 0 ? 1 / 0 : Math.max(v, t.maxRows * l + o + i), L = e.scrollTop;
391
+ e.style.height = "auto";
392
+ const j = e.scrollHeight + i;
393
+ e.style.height = Math.max(v, Math.min(c, j)) + "px", e.style.overflowY = j > c ? "auto" : "hidden", e.scrollTop = L, Le(), D.value && ne();
86
394
  }
87
- function te() {
88
- p.value = !1, w(), V("change", r.value);
395
+ A([s, de, () => n.autosize, u], qe, {
396
+ flush: "post"
397
+ }), A(
398
+ [u, () => n.autosize],
399
+ ([e, t], a, l) => {
400
+ if (!e || !t || typeof ResizeObserver > "u") return;
401
+ let i = e.clientWidth;
402
+ const o = new ResizeObserver(() => {
403
+ i !== e.clientWidth && (i = e.clientWidth, qe());
404
+ });
405
+ o.observe(e), l(() => o.disconnect());
406
+ },
407
+ { flush: "post" }
408
+ ), wt(qe), A(ye, Le, { flush: "post" });
409
+ const Qt = y(() => {
410
+ if (!n.autosize) return {};
411
+ const e = typeof n.autosize == "object" ? n.autosize : {};
412
+ return {
413
+ minHeight: "calc(" + (e.minRows ?? n.rows ?? 2) + "lh + 24px)",
414
+ maxHeight: e.maxRows ? "calc(" + e.maxRows + "lh + 24px)" : void 0
415
+ };
416
+ }), ot = y(
417
+ () => !!n.highlightMentions && !x.value && !M.value && !!q.value.length
418
+ ), Yt = y(
419
+ () => x.value ? "div" : n.type === "text" ? "input" : "textarea"
420
+ );
421
+ let rt = 0;
422
+ async function N(e, t, a = k(), l, i = !1) {
423
+ const o = ++rt, c = b.value && (z.value === void 0 || e.text.length <= z.value || e.text.length < s.value.length) && await P.commit(e, a, l, !0, i);
424
+ return o !== rt || !u.value || M.value || (x.value ? pe() : At(u.value) && u.value.value !== s.value && (u.value.value = s.value), K(c ? t : a)), c;
89
425
  }
90
- return q({ focus: () => {
91
- var e;
92
- return (e = s.value) == null ? void 0 : e.focus();
93
- }, blur: () => {
426
+ function me(e, t, a, l = []) {
427
+ const i = s.value.slice(0, t) + e + s.value.slice(a), o = [
428
+ ...$e(P.document.value, i, { start: t, end: a }),
429
+ ...l
430
+ ];
431
+ return { text: i, entities: Bt(i, o) };
432
+ }
433
+ let ie;
434
+ function Gt(e, t, a) {
435
+ if (!t) return;
436
+ let { start: l, end: i } = t;
437
+ if (l === i && e.length < s.value.length) {
438
+ const o = s.value.length - e.length;
439
+ a != null && a.endsWith("Backward") && (l = Math.max(0, l - o)), a != null && a.endsWith("Forward") && (i = Math.min(s.value.length, i + o));
440
+ }
441
+ if (e.startsWith(s.value.slice(0, l)) && e.endsWith(s.value.slice(i)) && e.length >= l + s.value.length - i)
442
+ return { start: l, end: i };
443
+ }
444
+ function st(e) {
445
+ const t = e.target, a = nt(t);
446
+ if (M.value) {
447
+ de.value = a;
448
+ return;
449
+ }
450
+ const l = Et(t, a.length), i = ie ?? { start: W.value, end: W.value }, o = Gt(a, ie, e.inputType);
451
+ if (ie = void 0, a === s.value) return;
452
+ w.value = !1, C.value && l.start >= C.value.start && a.startsWith(s.value.slice(0, C.value.start)) && !Ee(a, l.start) ? C.value = {
453
+ ...C.value,
454
+ query: a.slice(C.value.start, l.start),
455
+ end: l.start
456
+ } : C.value = void 0;
457
+ const v = $e(P.document.value, a, o);
458
+ N({ text: a, entities: v }, l, i);
459
+ }
460
+ function Jt() {
461
+ ie = k(), de.value = u.value ? nt(u.value) : s.value, M.value = !0;
462
+ }
463
+ function Xt(e) {
464
+ M.value && (M.value = !1, st(e));
465
+ }
466
+ async function ge(e) {
467
+ if (!b.value || M.value) return !1;
468
+ O();
469
+ const t = await P.history(e, k());
470
+ return t ? (x.value && pe(), K(t), !0) : !1;
471
+ }
472
+ function Zt(e) {
473
+ if (!(M.value || e.isComposing || !b.value))
474
+ if (ie = k(), e.inputType === "historyUndo" || e.inputType === "historyRedo") {
475
+ if (!e.cancelable) return;
476
+ e.preventDefault(), ge(e.inputType === "historyUndo" ? "undo" : "redo");
477
+ } else x.value && (e.inputType === "insertParagraph" || e.inputType === "insertLineBreak") && (e.preventDefault(), oe(`
478
+ `));
479
+ }
480
+ function oe(e, t = []) {
481
+ const { start: a, end: l } = k();
482
+ if (z.value !== void 0) {
483
+ const c = Math.max(
484
+ 0,
485
+ z.value - (s.value.length - (l - a))
486
+ );
487
+ e = e.slice(0, c).replace(/[\uD800-\uDBFF]$/, "");
488
+ }
489
+ const i = Bt(e, t).map((c) => ({
490
+ ...c,
491
+ start: a + c.start,
492
+ end: a + c.end
493
+ })), o = me(e, a, l, i);
494
+ w.value = !1, C.value = void 0;
495
+ const v = a + e.length;
496
+ N(o, { start: v, end: v }, { start: a, end: l });
497
+ }
498
+ function ut(e, t = !1) {
499
+ if (!e.clipboardData || t && !b.value) return;
500
+ const { start: a, end: l } = k();
501
+ if (a === l) return;
502
+ const i = s.value.slice(a, l), o = q.value.filter(
503
+ (v) => v.start >= a && v.end <= l
504
+ );
505
+ if (!(!x.value && !o.length)) {
506
+ e.preventDefault(), e.clipboardData.setData("text/plain", i);
507
+ try {
508
+ e.clipboardData.setData(
509
+ Ft,
510
+ St({
511
+ text: i,
512
+ entities: o.map((v) => ({
513
+ ...v,
514
+ start: v.start - a,
515
+ end: v.end - a
516
+ }))
517
+ })
518
+ );
519
+ } catch {
520
+ }
521
+ t && oe("");
522
+ }
523
+ }
524
+ function _t(e) {
525
+ if (!b.value || !e.clipboardData) return;
526
+ const t = e.clipboardData.getData(Ft);
527
+ if (!(!t && !x.value)) {
528
+ e.preventDefault();
529
+ try {
530
+ const a = zt(t);
531
+ oe(a.text, a.entities);
532
+ } catch {
533
+ oe(e.clipboardData.getData("text/plain"));
534
+ }
535
+ }
536
+ }
537
+ function ea(e) {
538
+ !x.value || !b.value || (e.preventDefault(), e.dataTransfer && oe(e.dataTransfer.getData("text/plain")));
539
+ }
540
+ function ta(e) {
541
+ const t = q.value.find(
542
+ (i) => i.start === e.start && i.prefix === e.prefix && e.end <= i.end
543
+ );
544
+ if (t) return t.end;
545
+ if (!n.replaceRest || e.manual) return e.end;
546
+ let a = e.end;
547
+ const l = Q(e.prefix);
548
+ for (; a < s.value.length && !/\s/.test(s.value[a]) && !(l && s.value.startsWith(l, a)) && !$.value.some(({ prefix: i }) => s.value.startsWith(i, a)); )
549
+ a++;
550
+ return a;
551
+ }
552
+ async function ct(e, t, a, l, i) {
553
+ var xt, kt;
554
+ if (!b.value || M.value || e.disabled || ((xt = n.canSelect) == null ? void 0 : xt.call(n, e, t)) === !1)
555
+ return !1;
556
+ const o = ve(t.prefix), v = (o == null ? void 0 : o.formatMention) ?? n.formatMention, c = (v == null ? void 0 : v(e, t)) ?? t.prefix + String(e.value);
557
+ if (!c) return !1;
558
+ const L = Q(t.prefix), j = s.value.slice(a), be = L && j.startsWith(L) ? L.length : 0, p = {
559
+ id: e.id ?? e.value,
560
+ value: e.value,
561
+ label: typeof e.label == "string" ? e.label : String(e.value),
562
+ type: e.type ?? (o == null ? void 0 : o.type) ?? t.prefix,
563
+ prefix: t.prefix,
564
+ text: c,
565
+ start: t.start,
566
+ end: t.start + c.length,
567
+ payload: e.payload
568
+ }, xe = me(c + L, t.start, a + be, [p]);
569
+ if (z.value !== void 0 && xe.text.length > z.value) return !1;
570
+ O();
571
+ const ke = p.end + L.length, bt = await N(
572
+ xe,
573
+ { start: ke, end: ke },
574
+ k(),
575
+ i
576
+ );
577
+ return bt && (It(e, t.prefix), l && n.restoreFocus && ((kt = u.value) != null && kt.isConnected) && u.value.ownerDocument.activeElement !== u.value && (u.value.focus(), K({ start: ke, end: ke }))), O(), bt;
578
+ }
579
+ function Oe(e, t = !0) {
580
+ const a = m.value;
581
+ !e || !a || e.user.disabled || Y.value || w.value || ct(e.option, a, ta(a), t, () => {
582
+ g("select", e.user, a.prefix, e.option), e.created && g("create", e.option, a);
583
+ });
584
+ }
585
+ function aa(e, t) {
586
+ var v;
587
+ const a = k(), l = (t == null ? void 0 : t.prefix) ?? e.prefix ?? ((v = $.value[0]) == null ? void 0 : v.prefix) ?? "@", i = Math.max(
588
+ 0,
589
+ Math.min(s.value.length, Math.trunc((t == null ? void 0 : t.start) ?? a.start))
590
+ ), o = Math.max(
591
+ i,
592
+ Math.min(s.value.length, Math.trunc((t == null ? void 0 : t.end) ?? a.end))
593
+ );
594
+ return ct(
595
+ e,
596
+ { prefix: l, query: "", start: i, end: o, manual: !0 },
597
+ o,
598
+ (t == null ? void 0 : t.focus) !== !1
599
+ );
600
+ }
601
+ function dt(e, t = !0, a = !1) {
602
+ const l = Q(e.prefix), i = t && l && s.value.startsWith(l, e.end) ? e.end + l.length : e.end;
603
+ return O(), N(
604
+ me("", e.start, i),
605
+ { start: e.start, end: e.start },
606
+ k(),
607
+ a ? () => g("wholeRemove", String(e.value), e.prefix) : void 0
608
+ );
609
+ }
610
+ function na(e) {
611
+ const t = q.value.find(
612
+ (a) => typeof e == "object" ? a.id === e.id && a.start === e.start && a.end === e.end : a.id === e
613
+ );
614
+ return t ? dt(t) : Promise.resolve(!1);
615
+ }
616
+ function la(e) {
617
+ var j, be;
618
+ if (!b.value || !n.whole && !n.checkIsWhole && !x.value)
619
+ return;
620
+ const { start: t, end: a } = k();
621
+ if (t !== a) return;
622
+ const l = e.key === "Backspace", i = q.value.find(
623
+ (p) => l ? p.end === t || p.end + Q(p.prefix).length === t && s.value.startsWith(Q(p.prefix), p.end) : p.start === t
624
+ );
625
+ if (i && (((j = n.checkIsWhole) == null ? void 0 : j.call(n, String(i.value), i.prefix)) ?? (n.whole || x.value))) {
626
+ e.preventDefault(), dt(i, !0, !0);
627
+ return;
628
+ }
629
+ if (!l) return;
630
+ const o = s.value.slice(0, t), v = $.value.map(({ prefix: p }) => Q(p)).filter((p) => p && o.endsWith(p)).sort((p, xe) => xe.length - p.length)[0] ?? "", c = Ee(s.value, t - v.length);
631
+ if (!(c != null && c.query)) return;
632
+ const L = Ht.value.some(
633
+ ({ option: p }) => String(p.value) === c.query && (!p.prefix || p.prefix === c.prefix)
634
+ );
635
+ (((be = n.checkIsWhole) == null ? void 0 : be.call(n, c.query, c.prefix)) ?? (n.whole && L)) && (e.preventDefault(), O(), N(
636
+ me("", c.start, t),
637
+ { start: c.start, end: c.start },
638
+ k(),
639
+ () => g("wholeRemove", c.query, c.prefix)
640
+ ));
641
+ }
642
+ const ia = y(
643
+ () => Ve.value && n.invalidEntity === "remove" && b.value && n.validateEntity ? q.value.filter((e) => !n.validateEntity(e)) : []
644
+ );
645
+ A(
646
+ ia,
647
+ async (e) => {
648
+ if (!e.length) return;
649
+ let t = P.document.value;
650
+ for (const i of [...e].reverse()) {
651
+ const o = t.text.slice(0, i.start) + t.text.slice(i.end);
652
+ t = {
653
+ text: o,
654
+ entities: $e(t, o, i)
655
+ };
656
+ }
657
+ const a = k(), l = Math.min(t.text.length, a.start);
658
+ await N(
659
+ t,
660
+ { start: l, end: l },
661
+ a,
662
+ void 0,
663
+ !0
664
+ );
665
+ },
666
+ { immediate: !0, flush: "post" }
667
+ );
668
+ function oa(e) {
669
+ const t = ae.value.length;
670
+ t && (I.value = e === "first" ? 0 : e === "last" ? t - 1 : (I.value + (e === "next" ? 1 : -1) + t) % t, Ie(() => {
671
+ S.value && Nt(S.value.key);
672
+ }));
673
+ }
674
+ function vt(e, t) {
675
+ t === "open" ? (e.preventDefault(), at()) : D.value ? t === "close" ? (e.preventDefault(), e.stopPropagation(), O()) : t === "retry" || t === "select" && G.value && !S.value ? G.value && !Y.value && (e.preventDefault(), te()) : t === "select" ? S.value && (e.preventDefault(), Oe(S.value)) : ae.value.length && (e.preventDefault(), oa(t)) : t === "next" && w.value && m.value && (e.preventDefault(), w.value = !1);
676
+ }
677
+ const ft = {
678
+ ArrowDown: "next",
679
+ ArrowUp: "previous",
680
+ Enter: "select",
681
+ Escape: "close"
682
+ };
683
+ function ra(e) {
684
+ var l;
685
+ if (e.isComposing || M.value || e.keyCode === 229) return;
686
+ const t = [
687
+ e.ctrlKey && "Ctrl",
688
+ e.metaKey && "Meta",
689
+ e.altKey && "Alt",
690
+ e.shiftKey && "Shift",
691
+ e.key
692
+ ].filter(Boolean).join("+"), a = (l = n.shortcuts) == null ? void 0 : l[t];
693
+ a ? vt(e, a) : (e.ctrlKey || e.metaKey) && !e.altKey && ["z", "y"].includes(e.key.toLowerCase()) ? (e.preventDefault(), ge(
694
+ e.shiftKey || e.key.toLowerCase() === "y" ? "redo" : "undo"
695
+ )) : e.key === "Backspace" || e.key === "Delete" ? la(e) : e.key === "Tab" ? n.selectOnTab && D.value && S.value ? Oe(S.value, !1) : O() : e.key === "PageDown" && D.value && Fe.value ? (e.preventDefault(), J()) : !e.ctrlKey && !e.altKey && !e.metaKey && ft[e.key] && vt(e, ft[e.key]);
696
+ }
697
+ function sa(e) {
698
+ H.value = !0, w.value = !1, le(), g("focus", e);
699
+ }
700
+ function ua(e) {
701
+ var t;
702
+ e.relatedTarget instanceof Node && ((t = ue.value) != null && t.contains(e.relatedTarget)) || (H.value = !1, je.value = !0, C.value = void 0, Qe(), We(), g("blur", e));
703
+ }
704
+ function He() {
94
705
  var e;
95
- return (e = s.value) == null ? void 0 : e.blur();
96
- } }), (e, t) => {
97
- var o;
98
- return M(), S("div", O(l(z), { class: "hys-ui-ent-mention" }), [
99
- re(A("textarea", {
100
- ref_key: "input",
101
- ref: s,
102
- "onUpdate:modelValue": t[0] || (t[0] = (a) => r.value = a),
103
- placeholder: h.placeholder || "输入 @ 提及成员",
104
- disabled: l(F),
105
- readonly: h.readonly,
106
- maxlength: h.maxlength,
107
- "aria-label": h.ariaLabel || l(G) || "提及输入",
108
- "aria-controls": l(c) ? l(T) : void 0,
109
- "aria-expanded": l(c),
110
- "aria-activedescendant": l(c) ? l(T) + "-" + ((o = d.value[n.value]) == null ? void 0 : o.id) : void 0,
111
- role: "combobox",
112
- onKeydown: ee,
113
- onKeyup: w,
114
- onClick: t[1] || (t[1] = (a) => {
115
- p.value = !1, w();
116
- }),
117
- onFocus: t[2] || (t[2] = (a) => {
118
- R.value = !0, w();
119
- }),
120
- onBlur: t[3] || (t[3] = (a) => {
121
- R.value = !1, l(y)();
122
- }),
123
- onInput: te
124
- }, null, 40, Ce), [
125
- [se, r.value]
126
- ]),
127
- (M(), de(ue, { to: "body" }, [
128
- pe(l(ye), {
129
- "popup-transition": m.popupTransition,
130
- "popup-transition-duration": m.popupTransitionDuration,
131
- placement: l(X)
132
- }, {
133
- default: ce(() => [
134
- l(c) && x.value.length ? (M(), S("div", O({
706
+ (e = u.value) == null || e.focus();
707
+ }
708
+ function ca(e) {
709
+ if (!x.value || !b.value || !(e.target instanceof Element))
710
+ return;
711
+ const t = e.target.closest("[data-mention-start]");
712
+ if (!t) return;
713
+ const a = q.value.find(
714
+ ({ start: l }) => l === Number(t.dataset.mentionStart)
715
+ );
716
+ a && (e.preventDefault(), He(), K({ start: a.start, end: a.end }), C.value = {
717
+ prefix: a.prefix,
718
+ query: "",
719
+ start: a.start,
720
+ end: a.end,
721
+ manual: !0
722
+ }, w.value = !1);
723
+ }
724
+ async function ht() {
725
+ if (!b.value) return !1;
726
+ O();
727
+ const e = await N(
728
+ { text: "", entities: [] },
729
+ { start: 0, end: 0 },
730
+ k(),
731
+ () => g("clear")
732
+ );
733
+ return e && n.restoreFocus && He(), e;
734
+ }
735
+ async function da(e) {
736
+ let t;
737
+ try {
738
+ t = typeof e == "string" ? zt(e) : e;
739
+ } catch {
740
+ return !1;
741
+ }
742
+ return !t || typeof t.text != "string" || !Array.isArray(t.entities) ? !1 : (O(), N(t, { start: t.text.length, end: t.text.length }));
743
+ }
744
+ function yt() {
745
+ const { class: e, style: t, ...a } = U;
746
+ return a;
747
+ }
748
+ const pt = y(() => ({
749
+ id: String(U.id ?? se.id.value ?? "") || void 0,
750
+ role: "combobox",
751
+ "aria-label": n.ariaLabel ?? U["aria-label"] ?? qt.value ?? R.value.input,
752
+ "aria-invalid": Ue.value || void 0,
753
+ "aria-required": ze.value || void 0,
754
+ "aria-disabled": _.value || void 0,
755
+ "aria-readonly": n.readonly || void 0,
756
+ "aria-describedby": se.describedBy.value ?? U["aria-describedby"],
757
+ "aria-controls": D.value ? Se : void 0,
758
+ "aria-expanded": D.value,
759
+ "aria-activedescendant": va.value,
760
+ "aria-autocomplete": "list"
761
+ })), mt = (e) => Se + "-option-" + encodeURIComponent(e), va = y(
762
+ () => D.value && S.value && Ye.value.some((e) => {
763
+ var t;
764
+ return e.key === ((t = S.value) == null ? void 0 : t.key);
765
+ }) ? mt(S.value.key) : void 0
766
+ );
767
+ function fa(e) {
768
+ return e.option.group ? e.option.group + "," + e.user.name : e.user.name;
769
+ }
770
+ function ha(e) {
771
+ const t = ae.value.findIndex(({ key: a }) => a === e.key);
772
+ t >= 0 && (I.value = t);
773
+ }
774
+ function ya(e) {
775
+ e.pointerType === "touch" && e.cancelable && e.preventDefault();
776
+ }
777
+ const gt = {
778
+ keydown: ra,
779
+ keyup: le,
780
+ click: () => {
781
+ w.value = !1, le();
782
+ },
783
+ focus: sa,
784
+ blur: ua,
785
+ input: st,
786
+ beforeinput: Zt,
787
+ compositionstart: Jt,
788
+ compositionend: Xt,
789
+ scroll: Ut,
790
+ paste: _t,
791
+ copy: ut,
792
+ cut: (e) => ut(e, !0),
793
+ drop: ea,
794
+ dblclick: ca
795
+ };
796
+ A(s, le, { flush: "post" });
797
+ const pa = ({ name: e }) => {
798
+ var l;
799
+ const t = ((l = m.value) == null ? void 0 : l.query.trim()) ?? "", a = n.highlightMatch && t ? e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()) : -1;
800
+ return Tt(
801
+ "span",
802
+ a < 0 ? e : [
803
+ e.slice(0, a),
804
+ Tt(
805
+ "mark",
806
+ { class: "hys-ui-mention-match" },
807
+ e.slice(a, a + t.length)
808
+ ),
809
+ e.slice(a + t.length)
810
+ ]
811
+ );
812
+ }, ma = ({ value: e }) => e;
813
+ return Rt({
814
+ input: u,
815
+ dropdownVisible: D,
816
+ focus: He,
817
+ blur: () => {
818
+ var e;
819
+ return (e = u.value) == null ? void 0 : e.blur();
820
+ },
821
+ open: at,
822
+ close: O,
823
+ update: et,
824
+ retry: te,
825
+ loadMore: J,
826
+ insertMention: aa,
827
+ removeMention: na,
828
+ getEntities: () => q.value.map((e) => ({ ...e })),
829
+ getDocument: () => ({
830
+ text: s.value,
831
+ entities: q.value.map((e) => ({ ...e }))
832
+ }),
833
+ setDocument: da,
834
+ serialize: () => St(P.document.value),
835
+ clear: ht,
836
+ undo: () => ge("undo"),
837
+ redo: () => ge("redo")
838
+ }), (e, t) => (d(), h("div", Me(r(Ne), {
839
+ class: ["hys-ui-ent-mention", r(U).class],
840
+ style: r(U).style,
841
+ "data-size": r(Lt),
842
+ "data-status": Ue.value ? "error" : f.status
843
+ }), [
844
+ X("div", Pa, [
845
+ Te.prefix ? (d(), h("div", Ka, [
846
+ F(e.$slots, "prefix", {}, void 0, !0)
847
+ ])) : T("", !0),
848
+ X("div", {
849
+ class: we(["hys-ui-mention-editor", {
850
+ "hys-ui-mention-highlighted": ot.value,
851
+ "hys-ui-mention-autosize": f.autosize
852
+ }])
853
+ }, [
854
+ ot.value ? (d(), h("div", {
855
+ key: 0,
856
+ ref_key: "highlightLayer",
857
+ ref: ce,
858
+ class: we(["hys-ui-mention-highlight-layer", { "hys-ui-mention-single": f.type === "text" }]),
859
+ "aria-hidden": "true"
860
+ }, [
861
+ (d(!0), h(Z, null, Ct(ye.value, (a) => (d(), h(Z, {
862
+ key: a.start
863
+ }, [
864
+ a.entity ? (d(), h("span", {
135
865
  key: 0,
136
- id: l(T),
137
- ref_key: "panel",
138
- ref: $
139
- }, l(z), {
140
- class: "hys-ui-mention-list hys-ui-floating-surface",
141
- style: { ...l(Y), maxHeight: "min(240px,calc(100vh - 20px))" },
866
+ class: we(["hys-ui-mention-entity", lt(a.entity)]),
867
+ "data-invalid": it(a.entity) || void 0
868
+ }, B(a.text), 11, ja)) : (d(), h(Z, { key: 1 }, [
869
+ V(B(a.text), 1)
870
+ ], 64))
871
+ ], 64))), 128))
872
+ ], 2)) : T("", !0),
873
+ x.value ? (d(), h("div", Me({
874
+ key: 1,
875
+ ref_key: "input",
876
+ ref: u
877
+ }, { ...yt(), ...pt.value }, Dt(gt, !0), {
878
+ textContent: B(r(s)),
879
+ class: "hys-ui-mention-rich",
880
+ style: Qt.value,
881
+ contenteditable: b.value ? "true" : "false",
882
+ tabindex: r(_) ? -1 : 0,
883
+ "data-placeholder": f.placeholder ?? R.value.placeholder
884
+ }), null, 16, Va)) : (d(), Ce(wa(Yt.value), Me({
885
+ key: 2,
886
+ ref_key: "input",
887
+ ref: u
888
+ }, { ...yt(), ...pt.value }, Dt(gt), {
889
+ value: M.value ? de.value : r(s),
890
+ type: f.type === "text" ? "text" : void 0,
891
+ rows: f.type === "textarea" ? f.rows : void 0,
892
+ name: f.name,
893
+ autofocus: f.autofocus,
894
+ placeholder: f.placeholder ?? R.value.placeholder,
895
+ disabled: r(_),
896
+ readonly: f.readonly,
897
+ required: ze.value,
898
+ maxlength: z.value,
899
+ minlength: Be.value,
900
+ onSelect: le
901
+ }), null, 16, ["value", "type", "rows", "name", "autofocus", "placeholder", "disabled", "readonly", "required", "maxlength", "minlength"])),
902
+ x.value && f.name ? (d(), h("input", {
903
+ key: 3,
904
+ type: "hidden",
905
+ name: f.name,
906
+ value: r(s),
907
+ disabled: r(_)
908
+ }, null, 8, Ua)) : T("", !0)
909
+ ], 2),
910
+ Te.suffix || f.clearable && b.value && r(s) ? (d(), h("div", Qa, [
911
+ F(e.$slots, "suffix", {}, void 0, !0),
912
+ f.clearable && b.value && r(s) ? (d(), h("button", {
913
+ key: 0,
914
+ class: "hys-ui-mention-clear",
915
+ type: "button",
916
+ "aria-label": R.value.clear,
917
+ onMousedown: t[0] || (t[0] = De(() => {
918
+ }, ["prevent"])),
919
+ onClick: ht
920
+ }, [
921
+ F(e.$slots, "clear-icon", {}, () => [
922
+ t[7] || (t[7] = X("span", { "aria-hidden": "true" }, "×", -1))
923
+ ], !0)
924
+ ], 40, Ya)) : T("", !0)
925
+ ])) : T("", !0)
926
+ ]),
927
+ f.showCount ? (d(), h("div", Ga, [
928
+ F(e.$slots, "count", {
929
+ count: r(s).length,
930
+ max: z.value
931
+ }, () => [
932
+ V(B(r(s).length), 1),
933
+ z.value !== void 0 ? (d(), h(Z, { key: 0 }, [
934
+ V(" / " + B(z.value), 1)
935
+ ], 64)) : T("", !0)
936
+ ], !0)
937
+ ])) : T("", !0),
938
+ (d(), Ce(Ca, {
939
+ to: f.appendTo || "body",
940
+ disabled: f.appendTo === !1
941
+ }, [
942
+ Da(r(Sa), {
943
+ "popup-transition": f.popupTransition,
944
+ "popup-transition-duration": f.popupTransitionDuration,
945
+ placement: r(_e)
946
+ }, {
947
+ default: Ta(() => [
948
+ r(D) && he.value ? (d(), h("div", Me({
949
+ key: 0,
950
+ ref_key: "panel",
951
+ ref: ue
952
+ }, r(Ne), {
953
+ class: ["hys-ui-mention-list hys-ui-floating-surface", [f.popupClass, { "hys-ui-mention-virtual": f.virtual }]],
954
+ style: [
955
+ r(Vt),
956
+ { maxHeight: tt.value, overflowY: "visible" },
957
+ f.popupStyle
958
+ ],
959
+ "data-placement": r(_e)
960
+ }), [
961
+ f.showArrow ? (d(), h("span", {
962
+ key: 0,
963
+ class: "hys-ui-mention-arrow",
964
+ style: re(Ke.value),
965
+ "aria-hidden": "true"
966
+ }, null, 4)) : T("", !0),
967
+ F(e.$slots, "header", { context: m.value }, void 0, !0),
968
+ r(Y) ? (d(), h("div", Xa, [
969
+ F(e.$slots, "loading", {}, () => [
970
+ V(B(R.value.loading), 1)
971
+ ], !0)
972
+ ])) : !r(ee).length && !r(G) ? (d(), h("div", Za, [
973
+ F(e.$slots, "empty", {}, () => [
974
+ V(B(f.notFoundText ?? R.value.empty), 1)
975
+ ], !0)
976
+ ])) : T("", !0),
977
+ X("div", {
978
+ id: r(Se),
979
+ ref_key: "listbox",
980
+ ref: Pe,
981
+ class: "hys-ui-mention-options",
142
982
  role: "listbox",
143
- "aria-label": "提及候选成员"
144
- }), [
145
- (M(!0), S(ve, null, fe(x.value, (a) => {
146
- var v, u, f;
147
- return M(), S("button", {
148
- id: l(T) + "-" + a.id,
149
- key: a.id,
983
+ "aria-label": R.value.list,
984
+ "aria-busy": r(Y) || r(fe) || void 0,
985
+ onScroll: t[2] || (t[2] = //@ts-ignore
986
+ (...a) => r(Ze) && r(Ze)(...a))
987
+ }, [
988
+ r(Ge) ? (d(), h("div", {
989
+ key: 0,
990
+ style: re({ height: r(Ge) + "px" }),
991
+ role: "presentation"
992
+ }, null, 4)) : T("", !0),
993
+ (d(!0), h(Z, null, Ct(r(Ye), (a) => {
994
+ var l, i, o;
995
+ return d(), h(Z, {
996
+ key: a.key
997
+ }, [
998
+ "group" in a ? (d(), h("div", {
999
+ key: 0,
1000
+ class: "hys-ui-mention-group",
1001
+ role: "presentation",
1002
+ style: re(f.virtual ? { height: r(Xe) + "px" } : void 0)
1003
+ }, [
1004
+ F(e.$slots, "group", {
1005
+ label: a.group,
1006
+ context: m.value
1007
+ }, () => [
1008
+ V(B(a.group), 1)
1009
+ ], !0)
1010
+ ], 4)) : (d(), h("button", {
1011
+ key: 1,
1012
+ id: mt(a.key),
1013
+ type: "button",
1014
+ role: "option",
1015
+ tabindex: "-1",
1016
+ "aria-label": fa(a.entry),
1017
+ "aria-posinset": a.index + 1,
1018
+ "aria-setsize": r(ee).length,
1019
+ disabled: a.entry.user.disabled,
1020
+ "aria-selected": ((l = S.value) == null ? void 0 : l.key) === a.key,
1021
+ "data-active": ((i = S.value) == null ? void 0 : i.key) === a.key,
1022
+ class: we([
1023
+ a.entry.option.class,
1024
+ { "hys-ui-mention-active": ((o = S.value) == null ? void 0 : o.key) === a.key }
1025
+ ]),
1026
+ style: re([
1027
+ a.entry.option.style,
1028
+ f.virtual ? { height: r(Xe) + "px" } : void 0
1029
+ ]),
1030
+ "data-create": a.entry.created || void 0,
1031
+ onMousedown: t[1] || (t[1] = De(() => {
1032
+ }, ["prevent"])),
1033
+ onPointerdown: ya,
1034
+ onPointerenter: (v) => ha(a.entry),
1035
+ onClick: (v) => Oe(a.entry)
1036
+ }, [
1037
+ F(e.$slots, "option", {
1038
+ user: a.entry.user,
1039
+ option: a.entry.option,
1040
+ context: m.value,
1041
+ created: !!a.entry.created
1042
+ }, () => [
1043
+ F(e.$slots, "avatar", {
1044
+ option: a.entry.option
1045
+ }, () => [
1046
+ a.entry.option.avatar ? (d(), h("img", {
1047
+ key: 0,
1048
+ class: "hys-ui-mention-avatar",
1049
+ src: a.entry.option.avatar,
1050
+ alt: ""
1051
+ }, null, 8, tn)) : (d(), h("span", an, B(Array.from(a.entry.user.name)[0]), 1))
1052
+ ], !0),
1053
+ X("span", nn, [
1054
+ typeof a.entry.option.label == "function" ? (d(), Ce(ma, {
1055
+ key: 0,
1056
+ value: a.entry.option.label(a.entry.option)
1057
+ }, null, 8, ["value"])) : (d(), Ce(pa, {
1058
+ key: 1,
1059
+ name: a.entry.user.name
1060
+ }, null, 8, ["name"])),
1061
+ a.entry.option.description ? (d(), h("small", ln, B(a.entry.option.description), 1)) : T("", !0)
1062
+ ])
1063
+ ], !0)
1064
+ ], 46, en))
1065
+ ], 64);
1066
+ }), 128)),
1067
+ r(Je) ? (d(), h("div", {
1068
+ key: 1,
1069
+ style: re({ height: r(Je) + "px" }),
1070
+ role: "presentation"
1071
+ }, null, 4)) : T("", !0)
1072
+ ], 40, _a),
1073
+ !r(Y) && r(G) ? (d(), h("div", on, [
1074
+ F(e.$slots, "error", {
1075
+ error: r(G).reason,
1076
+ retry: r(te),
1077
+ context: m.value
1078
+ }, () => [
1079
+ V(B(R.value.error) + " ", 1),
1080
+ X("button", {
150
1081
  type: "button",
151
- role: "option",
152
- disabled: a.disabled,
153
- "aria-selected": ((v = d.value[n.value]) == null ? void 0 : v.id) === a.id,
154
- "data-active": ((u = d.value[n.value]) == null ? void 0 : u.id) === a.id,
155
- class: me({ "hys-ui-mention-active": ((f = d.value[n.value]) == null ? void 0 : f.id) === a.id }),
156
- onMousedown: t[4] || (t[4] = he(() => {
1082
+ class: "hys-ui-mention-retry",
1083
+ tabindex: "-1",
1084
+ onMousedown: t[3] || (t[3] = De(() => {
157
1085
  }, ["prevent"])),
158
- onPointerenter: (k) => !a.disabled && (n.value = d.value.findIndex((g) => g.id === a.id)),
159
- onClick: (k) => I(a)
160
- }, [
161
- ge(e.$slots, "option", { user: a }, () => [
162
- A("span", Te, U(a.name.slice(0, 1)), 1),
163
- A("span", null, U(a.name), 1)
164
- ], !0)
165
- ], 42, Le);
166
- }), 128))
167
- ], 16, Me)) : be("", !0)
168
- ]),
169
- _: 3
170
- }, 8, ["popup-transition", "popup-transition-duration", "placement"])
171
- ]))
172
- ], 16);
173
- };
1086
+ onClick: t[4] || (t[4] = //@ts-ignore
1087
+ (...a) => r(te) && r(te)(...a))
1088
+ }, B(R.value.retry), 33)
1089
+ ], !0)
1090
+ ])) : r(Fe) || r(fe) ? (d(), h("button", {
1091
+ key: 4,
1092
+ class: "hys-ui-mention-more",
1093
+ type: "button",
1094
+ tabindex: "-1",
1095
+ disabled: r(fe),
1096
+ onMousedown: t[5] || (t[5] = De(() => {
1097
+ }, ["prevent"])),
1098
+ onClick: t[6] || (t[6] = //@ts-ignore
1099
+ (...a) => r(J) && r(J)(...a))
1100
+ }, B(r(fe) ? R.value.loading : R.value.more), 41, rn)) : T("", !0),
1101
+ F(e.$slots, "footer", {
1102
+ context: m.value,
1103
+ hasMore: r(Fe),
1104
+ loadMore: r(J)
1105
+ }, void 0, !0)
1106
+ ], 16, Ja)) : T("", !0)
1107
+ ]),
1108
+ _: 3
1109
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
1110
+ ], 8, ["to", "disabled"]))
1111
+ ], 16, Na));
174
1112
  }
175
1113
  });
176
1114
  export {
177
- Re as default
1115
+ xn as default
178
1116
  };