aiflowy-ui-admin/node_modules/.vite/deps/chunk-G7ZFAANB.js

829 lines
28 KiB
JavaScript

import {
isFirefox,
useComposition,
useFocusController
} from "./chunk-6KKRONM6.js";
import {
mutable
} from "./chunk-VJPYMOVT.js";
import {
ValidateComponentsMap,
iconPropType
} from "./chunk-R665FMDM.js";
import {
ElIcon
} from "./chunk-3DJYPQW6.js";
import {
CHANGE_EVENT,
INPUT_EVENT,
UPDATE_MODEL_EVENT,
useAriaProps
} from "./chunk-6VHTGKN7.js";
import {
useFormItem,
useFormItemInputId
} from "./chunk-DIGHH22S.js";
import {
isClient,
useFormDisabled,
useFormSize,
useResizeObserver,
useSizeProp
} from "./chunk-FYPMSKES.js";
import {
debugWarn,
isNumber
} from "./chunk-UFIWN4M6.js";
import {
_export_sfc
} from "./chunk-MUJDDH7P.js";
import {
buildProps,
definePropType,
fromPairs_default,
isNil_default,
useNamespace,
withInstall
} from "./chunk-R2OGZABH.js";
import {
circle_close_default,
hide_default,
view_default
} from "./chunk-3C23FNYW.js";
import {
Fragment,
computed,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
defineComponent,
getCurrentInstance,
mergeProps,
nextTick,
onMounted,
openBlock,
ref,
renderSlot,
resolveDynamicComponent,
shallowRef,
toRef,
unref,
useAttrs,
useSlots,
watch,
withCtx,
withModifiers
} from "./chunk-AAHVYXXY.js";
import {
NOOP,
init_shared_esm_bundler,
isObject,
isString,
normalizeClass,
normalizeStyle,
toDisplayString
} from "./chunk-OWZYVOTZ.js";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input/src/utils.mjs
var hiddenTextarea = void 0;
var HIDDEN_STYLE = {
height: "0",
visibility: "hidden",
overflow: isFirefox() ? "" : "hidden",
position: "absolute",
"z-index": "-1000",
top: "0",
right: "0"
};
var CONTEXT_STYLE = [
"letter-spacing",
"line-height",
"padding-top",
"padding-bottom",
"font-family",
"font-weight",
"font-size",
"text-rendering",
"text-transform",
"width",
"text-indent",
"padding-left",
"padding-right",
"border-width",
"box-sizing",
"word-break"
];
var looseToNumber = (val) => {
const n = Number.parseFloat(val);
return Number.isNaN(n) ? val : n;
};
function calculateNodeStyling(targetElement) {
const style = window.getComputedStyle(targetElement);
const boxSizing = style.getPropertyValue("box-sizing");
const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
const contextStyle = CONTEXT_STYLE.map((name) => [
name,
style.getPropertyValue(name)
]);
return { contextStyle, paddingSize, borderSize, boxSizing };
}
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
var _a, _b;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement("textarea");
((_a = targetElement.parentNode) != null ? _a : document.body).appendChild(hiddenTextarea);
}
const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
contextStyle.forEach(([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value));
Object.entries(HIDDEN_STYLE).forEach(([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value, "important"));
hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
let height = hiddenTextarea.scrollHeight;
const result = {};
if (boxSizing === "border-box") {
height = height + borderSize;
} else if (boxSizing === "content-box") {
height = height - paddingSize;
}
hiddenTextarea.value = "";
const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (isNumber(minRows)) {
let minHeight = singleRowHeight * minRows;
if (boxSizing === "border-box") {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
result.minHeight = `${minHeight}px`;
}
if (isNumber(maxRows)) {
let maxHeight = singleRowHeight * maxRows;
if (boxSizing === "border-box") {
maxHeight = maxHeight + paddingSize + borderSize;
}
height = Math.min(maxHeight, height);
}
result.height = `${height}px`;
(_b = hiddenTextarea.parentNode) == null ? void 0 : _b.removeChild(hiddenTextarea);
hiddenTextarea = void 0;
return result;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input/src/input.mjs
init_shared_esm_bundler();
var inputProps = buildProps({
id: {
type: String,
default: void 0
},
size: useSizeProp,
disabled: Boolean,
modelValue: {
type: definePropType([
String,
Number,
Object
]),
default: ""
},
modelModifiers: {
type: definePropType(Object),
default: () => ({})
},
maxlength: {
type: [String, Number]
},
minlength: {
type: [String, Number]
},
type: {
type: String,
default: "text"
},
resize: {
type: String,
values: ["none", "both", "horizontal", "vertical"]
},
autosize: {
type: definePropType([Boolean, Object]),
default: false
},
autocomplete: {
type: definePropType(String),
default: "off"
},
formatter: {
type: Function
},
parser: {
type: Function
},
placeholder: {
type: String
},
form: {
type: String
},
readonly: Boolean,
clearable: Boolean,
clearIcon: {
type: iconPropType,
default: circle_close_default
},
showPassword: Boolean,
showWordLimit: Boolean,
wordLimitPosition: {
type: String,
values: ["inside", "outside"],
default: "inside"
},
suffixIcon: {
type: iconPropType
},
prefixIcon: {
type: iconPropType
},
containerRole: {
type: String,
default: void 0
},
tabindex: {
type: [String, Number],
default: 0
},
validateEvent: {
type: Boolean,
default: true
},
inputStyle: {
type: definePropType([Object, Array, String]),
default: () => mutable({})
},
autofocus: Boolean,
rows: {
type: Number,
default: 2
},
...useAriaProps(["ariaLabel"]),
inputmode: {
type: definePropType(String),
default: void 0
},
name: String
});
var inputEmits = {
[UPDATE_MODEL_EVENT]: (value) => isString(value),
input: (value) => isString(value),
change: (value) => isString(value),
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent,
clear: () => true,
mouseleave: (evt) => evt instanceof MouseEvent,
mouseenter: (evt) => evt instanceof MouseEvent,
keydown: (evt) => evt instanceof Event,
compositionstart: (evt) => evt instanceof CompositionEvent,
compositionupdate: (evt) => evt instanceof CompositionEvent,
compositionend: (evt) => evt instanceof CompositionEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-attrs/index.mjs
var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
var LISTENER_PREFIX = /^on[A-Z]/;
var useAttrs2 = (params = {}) => {
const { excludeListeners = false, excludeKeys } = params;
const allExcludeKeys = computed(() => {
return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
});
const instance = getCurrentInstance();
if (!instance) {
debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
return computed(() => ({}));
}
return computed(() => {
var _a;
return fromPairs_default(Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
});
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-cursor/index.mjs
function useCursor(input) {
let selectionInfo;
function recordCursor() {
if (input.value == void 0)
return;
const { selectionStart, selectionEnd, value } = input.value;
if (selectionStart == null || selectionEnd == null)
return;
const beforeTxt = value.slice(0, Math.max(0, selectionStart));
const afterTxt = value.slice(Math.max(0, selectionEnd));
selectionInfo = {
selectionStart,
selectionEnd,
value,
beforeTxt,
afterTxt
};
}
function setCursor() {
if (input.value == void 0 || selectionInfo == void 0)
return;
const { value } = input.value;
const { beforeTxt, afterTxt, selectionStart } = selectionInfo;
if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
return;
let startPos = value.length;
if (value.endsWith(afterTxt)) {
startPos = value.length - afterTxt.length;
} else if (value.startsWith(beforeTxt)) {
startPos = beforeTxt.length;
} else {
const beforeLastChar = beforeTxt[selectionStart - 1];
const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
if (newIndex !== -1) {
startPos = newIndex + 1;
}
}
input.value.setSelectionRange(startPos, startPos);
}
return [recordCursor, setCursor];
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input/src/input2.mjs
init_shared_esm_bundler();
var COMPONENT_NAME = "ElInput";
var __default__ = defineComponent({
name: COMPONENT_NAME,
inheritAttrs: false
});
var _sfc_main = defineComponent({
...__default__,
props: inputProps,
emits: inputEmits,
setup(__props, { expose, emit }) {
const props = __props;
const rawAttrs = useAttrs();
const attrs = useAttrs2();
const slots = useSlots();
const containerKls = computed(() => [
props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
nsInput.m(inputSize.value),
nsInput.is("disabled", inputDisabled.value),
nsInput.is("exceed", inputExceed.value),
{
[nsInput.b("group")]: slots.prepend || slots.append,
[nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
[nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
[nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
[nsInput.b("hidden")]: props.type === "hidden"
},
rawAttrs.class
]);
const wrapperKls = computed(() => [
nsInput.e("wrapper"),
nsInput.is("focus", isFocused.value)
]);
const { form: elForm, formItem: elFormItem } = useFormItem();
const { inputId } = useFormItemInputId(props, {
formItemContext: elFormItem
});
const inputSize = useFormSize();
const inputDisabled = useFormDisabled();
const nsInput = useNamespace("input");
const nsTextarea = useNamespace("textarea");
const input = shallowRef();
const textarea = shallowRef();
const hovering = ref(false);
const passwordVisible = ref(false);
const countStyle = ref();
const textareaCalcStyle = shallowRef(props.inputStyle);
const _ref = computed(() => input.value || textarea.value);
const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
disabled: inputDisabled,
afterBlur() {
var _a;
if (props.validateEvent) {
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur").catch((err) => debugWarn(err));
}
}
});
const needStatusIcon = computed(() => {
var _a;
return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
});
const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
const containerStyle = computed(() => [
rawAttrs.style
]);
const textareaStyle = computed(() => [
props.inputStyle,
textareaCalcStyle.value,
{ resize: props.resize }
]);
const nativeInputValue = computed(() => isNil_default(props.modelValue) ? "" : String(props.modelValue));
const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !!nativeInputValue.value);
const isWordLimitVisible = computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
const textLength = computed(() => nativeInputValue.value.length);
const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
const hasModelModifiers = computed(() => !!Object.keys(props.modelModifiers).length);
const [recordCursor, setCursor] = useCursor(input);
useResizeObserver(textarea, (entries) => {
onceInitSizeTextarea();
if (!isWordLimitVisible.value || props.resize !== "both")
return;
const entry = entries[0];
const { width } = entry.contentRect;
countStyle.value = {
right: `calc(100% - ${width + 15 + 6}px)`
};
});
const resizeTextarea = () => {
const { type, autosize } = props;
if (!isClient || type !== "textarea" || !textarea.value)
return;
if (autosize) {
const minRows = isObject(autosize) ? autosize.minRows : void 0;
const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
textareaCalcStyle.value = {
overflowY: "hidden",
...textareaStyle2
};
nextTick(() => {
textarea.value.offsetHeight;
textareaCalcStyle.value = textareaStyle2;
});
} else {
textareaCalcStyle.value = {
minHeight: calcTextareaHeight(textarea.value).minHeight
};
}
};
const createOnceInitResize = (resizeTextarea2) => {
let isInit = false;
return () => {
var _a;
if (isInit || !props.autosize)
return;
const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null;
if (!isElHidden) {
setTimeout(resizeTextarea2);
isInit = true;
}
};
};
const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
const setNativeInputValue = () => {
const input2 = _ref.value;
const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
if (!input2 || input2.value === formatterValue)
return;
input2.value = formatterValue;
};
const formatValue = (value) => {
const { trim, number } = props.modelModifiers;
if (trim) {
value = value.trim();
}
if (number) {
value = `${looseToNumber(value)}`;
}
if (props.formatter && props.parser) {
value = props.parser(value);
}
return value;
};
const handleInput = async (event) => {
if (isComposing.value)
return;
const { lazy } = props.modelModifiers;
let { value } = event.target;
if (lazy) {
emit(INPUT_EVENT, value);
return;
}
value = formatValue(value);
if (String(value) === nativeInputValue.value) {
if (props.formatter) {
setNativeInputValue();
}
return;
}
recordCursor();
emit(UPDATE_MODEL_EVENT, value);
emit(INPUT_EVENT, value);
await nextTick();
if (props.formatter && props.parser || !hasModelModifiers.value) {
setNativeInputValue();
}
setCursor();
};
const handleChange = async (event) => {
let { value } = event.target;
value = formatValue(value);
if (props.modelModifiers.lazy) {
emit(UPDATE_MODEL_EVENT, value);
}
emit(CHANGE_EVENT, value);
await nextTick();
setNativeInputValue();
};
const {
isComposing,
handleCompositionStart,
handleCompositionUpdate,
handleCompositionEnd
} = useComposition({ emit, afterComposition: handleInput });
const handlePasswordVisible = () => {
passwordVisible.value = !passwordVisible.value;
};
const focus = () => {
var _a;
return (_a = _ref.value) == null ? void 0 : _a.focus();
};
const blur = () => {
var _a;
return (_a = _ref.value) == null ? void 0 : _a.blur();
};
const handleMouseLeave = (evt) => {
hovering.value = false;
emit("mouseleave", evt);
};
const handleMouseEnter = (evt) => {
hovering.value = true;
emit("mouseenter", evt);
};
const handleKeydown = (evt) => {
emit("keydown", evt);
};
const select = () => {
var _a;
(_a = _ref.value) == null ? void 0 : _a.select();
};
const clear = () => {
emit(UPDATE_MODEL_EVENT, "");
emit(CHANGE_EVENT, "");
emit("clear");
emit(INPUT_EVENT, "");
};
watch(() => props.modelValue, () => {
var _a;
nextTick(() => resizeTextarea());
if (props.validateEvent) {
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn(err));
}
});
watch(nativeInputValue, (newValue) => {
if (!_ref.value) {
return;
}
const { trim, number } = props.modelModifiers;
const elValue = _ref.value.value;
const displayValue = (number || props.type === "number") && !/^0\d/.test(elValue) ? `${looseToNumber(elValue)}` : elValue;
if (displayValue === newValue) {
return;
}
if (document.activeElement === _ref.value && _ref.value.type !== "range") {
if (trim && displayValue.trim() === newValue) {
return;
}
}
setNativeInputValue();
});
watch(() => props.type, async () => {
await nextTick();
setNativeInputValue();
resizeTextarea();
});
onMounted(() => {
if (!props.formatter && props.parser) {
debugWarn(COMPONENT_NAME, "If you set the parser, you also need to set the formatter.");
}
setNativeInputValue();
nextTick(resizeTextarea);
});
expose({
input,
textarea,
ref: _ref,
textareaStyle,
autosize: toRef(props, "autosize"),
isComposing,
focus,
blur,
select,
clear,
resizeTextarea
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([
unref(containerKls),
{
[unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
[unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend
}
]),
style: normalizeStyle(unref(containerStyle)),
onMouseenter: handleMouseEnter,
onMouseleave: handleMouseLeave
}, [
createCommentVNode(" input "),
_ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createCommentVNode(" prepend slot "),
_ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(nsInput).be("group", "prepend"))
}, [
renderSlot(_ctx.$slots, "prepend")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref_key: "wrapperRef",
ref: wrapperRef,
class: normalizeClass(unref(wrapperKls))
}, [
createCommentVNode(" prefix slot "),
_ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(nsInput).e("prefix"))
}, [
createBaseVNode("span", {
class: normalizeClass(unref(nsInput).e("prefix-inner"))
}, [
renderSlot(_ctx.$slots, "prefix"),
_ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(nsInput).e("icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("input", mergeProps({
id: unref(inputId),
ref_key: "input",
ref: input,
class: unref(nsInput).e("inner")
}, unref(attrs), {
name: _ctx.name,
minlength: _ctx.minlength,
maxlength: _ctx.maxlength,
type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
disabled: unref(inputDisabled),
readonly: _ctx.readonly,
autocomplete: _ctx.autocomplete,
tabindex: _ctx.tabindex,
"aria-label": _ctx.ariaLabel,
placeholder: _ctx.placeholder,
style: _ctx.inputStyle,
form: _ctx.form,
autofocus: _ctx.autofocus,
role: _ctx.containerRole,
inputmode: _ctx.inputmode,
onCompositionstart: unref(handleCompositionStart),
onCompositionupdate: unref(handleCompositionUpdate),
onCompositionend: unref(handleCompositionEnd),
onInput: handleInput,
onChange: handleChange,
onKeydown: handleKeydown
}), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
createCommentVNode(" suffix slot "),
unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(unref(nsInput).e("suffix"))
}, [
createBaseVNode("span", {
class: normalizeClass(unref(nsInput).e("suffix-inner"))
}, [
!unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
renderSlot(_ctx.$slots, "suffix"),
_ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(nsInput).e("icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 64)) : createCommentVNode("v-if", true),
unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
onMousedown: withModifiers(unref(NOOP), ["prevent"]),
onClick: clear
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
]),
_: 1
}, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
unref(showPwdVisible) ? (openBlock(), createBlock(unref(ElIcon), {
key: 2,
class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
onClick: handlePasswordVisible,
onMousedown: withModifiers(unref(NOOP), ["prevent"]),
onMouseup: withModifiers(unref(NOOP), ["prevent"])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(passwordIcon))))
]),
_: 1
}, 8, ["class", "onMousedown", "onMouseup"])) : createCommentVNode("v-if", true),
unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
key: 3,
class: normalizeClass([
unref(nsInput).e("count"),
unref(nsInput).is("outside", _ctx.wordLimitPosition === "outside")
])
}, [
createBaseVNode("span", {
class: normalizeClass(unref(nsInput).e("count-inner"))
}, toDisplayString(unref(textLength)) + " / " + toDisplayString(_ctx.maxlength), 3)
], 2)) : createCommentVNode("v-if", true),
unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
key: 4,
class: normalizeClass([
unref(nsInput).e("icon"),
unref(nsInput).e("validateIcon"),
unref(nsInput).is("loading", unref(validateState) === "validating")
])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 2)) : createCommentVNode("v-if", true)
], 2),
createCommentVNode(" append slot "),
_ctx.$slots.append ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(nsInput).be("group", "append"))
}, [
renderSlot(_ctx.$slots, "append")
], 2)) : createCommentVNode("v-if", true)
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
createCommentVNode(" textarea "),
createBaseVNode("textarea", mergeProps({
id: unref(inputId),
ref_key: "textarea",
ref: textarea,
class: [unref(nsTextarea).e("inner"), unref(nsInput).is("focus", unref(isFocused))]
}, unref(attrs), {
minlength: _ctx.minlength,
maxlength: _ctx.maxlength,
tabindex: _ctx.tabindex,
disabled: unref(inputDisabled),
readonly: _ctx.readonly,
autocomplete: _ctx.autocomplete,
style: unref(textareaStyle),
"aria-label": _ctx.ariaLabel,
placeholder: _ctx.placeholder,
form: _ctx.form,
autofocus: _ctx.autofocus,
rows: _ctx.rows,
role: _ctx.containerRole,
onCompositionstart: unref(handleCompositionStart),
onCompositionupdate: unref(handleCompositionUpdate),
onCompositionend: unref(handleCompositionEnd),
onInput: handleInput,
onFocus: unref(handleFocus),
onBlur: unref(handleBlur),
onChange: handleChange,
onKeydown: handleKeydown
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
key: 0,
style: normalizeStyle(countStyle.value),
class: normalizeClass([
unref(nsInput).e("count"),
unref(nsInput).is("outside", _ctx.wordLimitPosition === "outside")
])
}, toDisplayString(unref(textLength)) + " / " + toDisplayString(_ctx.maxlength), 7)) : createCommentVNode("v-if", true)
], 64))
], 38);
};
}
});
var Input = _export_sfc(_sfc_main, [["__file", "input.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input/index.mjs
var ElInput = withInstall(Input);
export {
inputProps,
inputEmits,
useAttrs2 as useAttrs,
useCursor,
ElInput
};
//# sourceMappingURL=chunk-G7ZFAANB.js.map