import "./rolldown-runtime-CdpVaAjv.js";
import { n as e } from "./utils-DJ3DjJ60.js";
import { C as t, Ft as n, It as r, O as i, Pt as a, Qt as o, Rt as s, S as c, St as l, Vt as u, X as d, Yt as f, Zt as p, ct as m, dt as h, ft as g, it as _, kt as ee, lt as v, ot as y, qt as b, st as x, ut as S, w as C, zt as w } from "./BaseItem-C8gi9njV.js";
import { L as T, M as E, P as D, b as O, g as k, m as te, w as A } from "./CascaderLoadMore-DdrSXL2Z.js";
import { f as ne, r as j } from "./Button-CG0BbgfC.js";
import { Transition as M, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createSlots as re, createTextVNode as R, createVNode as z, defineComponent as B, getCurrentInstance as ie, h as ae, inject as V, isRef as oe, mergeModels as se, mergeProps as H, nextTick as ce, normalizeClass as U, normalizeStyle as le, onBeforeUnmount as ue, onMounted as W, onScopeDispose as de, openBlock as G, provide as fe, ref as K, renderSlot as q, resolveDynamicComponent as pe, toDisplayString as J, unref as Y, useModel as me, useSlots as he, vShow as ge, watch as X, watchEffect as _e, withCtx as Z, withDirectives as ve } from "vue";
//#region ../../node_modules/.pnpm/element-plus@2.13.6_typescript@6.0.2_vue@3.5.32_typescript@6.0.2_/node_modules/element-plus/es/hooks/use-draggable/index.mjs
var ye = (e, t, n, r) => {
	let i = {
		offsetX: 0,
		offsetY: 0
	}, a = K(!1), o = (t, n) => {
		if (e.value) {
			let { offsetX: a, offsetY: o } = i, s = e.value.getBoundingClientRect(), c = s.left, l = s.top, u = s.width, d = s.height, f = document.documentElement.clientWidth, p = document.documentElement.clientHeight, m = -c + a, h = -l + o, g = f - c - u + a, _ = p - l - (d < p ? d : 0) + o;
			r?.value || (t = Math.min(Math.max(t, m), g), n = Math.min(Math.max(n, h), _)), i.offsetX = t, i.offsetY = n, e.value.style.transform = `translate(${v(t)}, ${v(n)})`;
		}
	}, s = (e) => {
		let t = e.clientX, n = e.clientY, { offsetX: r, offsetY: s } = i, c = (e) => {
			a.value ||= !0, o(r + e.clientX - t, s + e.clientY - n);
		}, l = () => {
			a.value = !1, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", l);
		};
		document.addEventListener("mousemove", c), document.addEventListener("mouseup", l);
	}, c = () => {
		t.value && e.value && (t.value.addEventListener("mousedown", s), window.addEventListener("resize", d));
	}, l = () => {
		t.value && e.value && (t.value.removeEventListener("mousedown", s), window.removeEventListener("resize", d));
	}, u = () => {
		i.offsetX = 0, i.offsetY = 0, e.value && (e.value.style.transform = "");
	}, d = () => {
		let { offsetX: e, offsetY: t } = i;
		o(e, t);
	};
	return W(() => {
		_e(() => {
			n.value ? c() : l();
		});
	}), ue(() => {
		l();
	}), {
		isDragging: a,
		resetPosition: u,
		updatePosition: d
	};
}, be = (e, t = {}) => {
	oe(e) || r("[useLockscreen]", "You need to pass a ref param to this function");
	let n = t.ns || y("popup"), i = N(() => n.bm("parent", "hidden")), a = 0, o = !1, s = "0", c = !1, l = () => {
		c || (c = !0, setTimeout(() => {
			typeof document > "u" || o && document && (document.body.style.width = s, g(document.body, i.value));
		}, 200));
	};
	X(e, (e) => {
		if (!e) {
			l();
			return;
		}
		c = !1, o = !h(document.body, i.value), o && (s = document.body.style.width, m(document.body, i.value)), a = E(n.namespace.value);
		let t = document.documentElement.clientHeight < document.body.scrollHeight, r = S(document.body, "overflowY");
		a > 0 && (t || r === "scroll") && o && (document.body.style.width = `calc(100% - ${a}px)`);
	}), de(() => l());
}, Q = (e) => {
	if (!e) return {
		onClick: b,
		onMousedown: b,
		onMouseup: b
	};
	let t = !1, n = !1;
	return {
		onClick: (r) => {
			t && n && e(r), t = n = !1;
		},
		onMousedown: (e) => {
			t = e.target === e.currentTarget;
		},
		onMouseup: (e) => {
			n = e.target === e.currentTarget;
		}
	};
}, xe = s({
	center: Boolean,
	alignCenter: {
		type: Boolean,
		default: void 0
	},
	closeIcon: { type: i },
	draggable: {
		type: Boolean,
		default: void 0
	},
	overflow: {
		type: Boolean,
		default: void 0
	},
	fullscreen: Boolean,
	headerClass: String,
	bodyClass: String,
	footerClass: String,
	showClose: {
		type: Boolean,
		default: !0
	},
	title: {
		type: String,
		default: ""
	},
	ariaLevel: {
		type: String,
		default: "2"
	}
}), Se = { close: () => !0 }, Ce = {
	alignCenter: void 0,
	draggable: void 0,
	overflow: void 0,
	showClose: !0,
	title: "",
	ariaLevel: "2"
}, we = s({
	...xe,
	appendToBody: Boolean,
	appendTo: {
		type: D.to.type,
		default: "body"
	},
	beforeClose: { type: w(Function) },
	destroyOnClose: Boolean,
	closeOnClickModal: {
		type: Boolean,
		default: !0
	},
	closeOnPressEscape: {
		type: Boolean,
		default: !0
	},
	lockScroll: {
		type: Boolean,
		default: !0
	},
	modal: {
		type: Boolean,
		default: !0
	},
	modalPenetrable: Boolean,
	openDelay: {
		type: Number,
		default: 0
	},
	closeDelay: {
		type: Number,
		default: 0
	},
	top: { type: String },
	modelValue: Boolean,
	modalClass: String,
	headerClass: String,
	bodyClass: String,
	footerClass: String,
	width: { type: [String, Number] },
	zIndex: { type: Number },
	trapFocus: Boolean,
	headerAriaLevel: {
		type: String,
		default: "2"
	},
	transition: {
		type: w([String, Object]),
		default: void 0
	}
}), Te = {
	open: () => !0,
	opened: () => !0,
	close: () => !0,
	closed: () => !0,
	[T]: (e) => u(e),
	openAutoFocus: () => !0,
	closeAutoFocus: () => !0
};
({ ...Ce });
//#endregion
//#region ../../node_modules/.pnpm/element-plus@2.13.6_typescript@6.0.2_vue@3.5.32_typescript@6.0.2_/node_modules/element-plus/es/components/overlay/src/overlay.mjs
var Ee = s({
	mask: {
		type: Boolean,
		default: !0
	},
	customMaskEvent: Boolean,
	overlayClass: { type: w([
		String,
		Array,
		Object
	]) },
	zIndex: { type: w([String, Number]) }
}), De = { click: (e) => e instanceof MouseEvent }, Oe = "overlay", ke = B({
	name: "ElOverlay",
	props: Ee,
	emits: De,
	setup(e, { slots: t, emit: n }) {
		let r = y(Oe), { onClick: i, onMousedown: a, onMouseup: o } = Q(e.customMaskEvent ? void 0 : (e) => {
			n("click", e);
		});
		return () => e.mask ? z("div", {
			class: [r.b(), e.overlayClass],
			style: { zIndex: e.zIndex },
			onClick: i,
			onMousedown: a,
			onMouseup: o
		}, [q(t, "default")], A.STYLE | A.CLASS | A.PROPS, [
			"onClick",
			"onMouseup",
			"onMousedown"
		]) : ae("div", {
			class: e.overlayClass,
			style: {
				zIndex: e.zIndex,
				position: "fixed",
				top: "0px",
				right: "0px",
				bottom: "0px",
				left: "0px"
			}
		}, [q(t, "default")]);
	}
}), Ae = Symbol("dialogInjectionKey"), je = "dialog-fade", Me = "ElDialog", Ne = (e, t) => {
	let r = ie().emit, { nextZIndex: i } = _(), s = "", l = ne(), u = ne(), d = K(!1), m = K(!1), h = K(!1), g = K(e.zIndex ?? i()), y = K(!1), b, x, S = c(), C = N(() => S.value?.namespace ?? "el"), w = N(() => S.value?.dialog), E = N(() => {
		let t = {}, n = `--${C.value}-dialog`;
		if (!e.fullscreen) {
			e.top && (t[`${n}-margin-top`] = e.top);
			let r = v(e.width);
			r && (t[`${n}-width`] = r);
		}
		return t;
	}), D = N(() => (e.draggable ?? w.value?.draggable ?? !1) && !e.fullscreen), O = N(() => e.alignCenter ?? w.value?.alignCenter ?? !1), k = N(() => e.overflow ?? w.value?.overflow ?? !1), te = N(() => O.value ? { display: "flex" } : {}), A = N(() => {
		let t = e.transition ?? w.value?.transition ?? "dialog-fade", r = {
			name: t,
			onAfterEnter: j,
			onBeforeLeave: P,
			onAfterLeave: M
		};
		if (o(t)) {
			let e = { ...t }, r = (e, t) => (n) => {
				f(e) ? e.forEach((e) => {
					p(e) && e(n);
				}) : p(e) && e(n), t();
			};
			return e.onAfterEnter = r(e.onAfterEnter, j), e.onBeforeLeave = r(e.onBeforeLeave, P), e.onAfterLeave = r(e.onAfterLeave, M), e.name || (e.name = je, n(Me, `transition.name is missing when using object syntax, fallback to '${je}'`)), e;
		}
		return r;
	});
	function j() {
		r("opened");
	}
	function M() {
		r("closed"), r(T, !1), e.destroyOnClose && (h.value = !1), y.value = !1;
	}
	function P() {
		y.value = !0, r("close");
	}
	function F() {
		x?.(), b?.(), e.openDelay && e.openDelay > 0 ? {stop: b} = a(() => R(), e.openDelay) : R();
	}
	function I() {
		b?.(), x?.(), e.closeDelay && e.closeDelay > 0 ? {stop: x} = a(() => z(), e.closeDelay) : z();
	}
	function L() {
		function t(e) {
			e || (m.value = !0, d.value = !1);
		}
		e.beforeClose ? e.beforeClose(t) : I();
	}
	function re() {
		e.closeOnClickModal && L();
	}
	function R() {
		ee && (d.value = !0);
	}
	function z() {
		d.value = !1;
	}
	function B() {
		r("openAutoFocus");
	}
	function ae() {
		r("closeAutoFocus");
	}
	function V(e) {
		e.detail?.focusReason === "pointer" && e.preventDefault();
	}
	e.lockScroll && be(d);
	function oe() {
		e.closeOnPressEscape && L();
	}
	return X(() => e.zIndex, () => {
		g.value = e.zIndex ?? i();
	}), X(() => e.modelValue, (n) => {
		n ? (m.value = !1, y.value = !1, F(), h.value = !0, g.value = e.zIndex ?? i(), ce(() => {
			r("open"), t.value && (t.value.parentElement.scrollTop = 0, t.value.parentElement.scrollLeft = 0, t.value.scrollTop = 0);
		})) : d.value && I();
	}), X(() => e.fullscreen, (e) => {
		t.value && (e ? (s = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = s);
	}), W(() => {
		e.modelValue && (d.value = !0, h.value = !0, F());
	}), {
		afterEnter: j,
		afterLeave: M,
		beforeLeave: P,
		handleClose: L,
		onModalClick: re,
		close: I,
		doClose: z,
		onOpenAutoFocus: B,
		onCloseAutoFocus: ae,
		onCloseRequested: oe,
		onFocusoutPrevented: V,
		titleId: l,
		bodyId: u,
		closed: m,
		style: E,
		overlayDialogStyle: te,
		rendered: h,
		visible: d,
		zIndex: g,
		transitionConfig: A,
		_draggable: D,
		_alignCenter: O,
		_overflow: k,
		closing: y
	};
}, Pe = (...e) => (t) => {
	e.forEach((e) => {
		e.value = t;
	});
}, Fe = ["aria-level"], Ie = ["aria-label"], Le = ["id"], Re = /* @__PURE__ */ B({
	name: "ElDialogContent",
	__name: "dialog-content",
	props: xe,
	emits: Se,
	setup(e, { expose: n }) {
		let { t: r } = x(), { Close: i } = C, a = e, { dialogRef: o, headerRef: s, bodyId: c, ns: l, style: u } = V(Ae), { focusTrapRef: d } = V(k), f = Pe(d, o), p = N(() => !!a.draggable), { resetPosition: m, updatePosition: h, isDragging: g } = ye(o, s, p, N(() => !!a.overflow)), _ = N(() => [
			l.b(),
			l.is("fullscreen", a.fullscreen),
			l.is("draggable", p.value),
			l.is("dragging", g.value),
			l.is("align-center", !!a.alignCenter),
			{ [l.m("center")]: a.center }
		]);
		return n({
			resetPosition: m,
			updatePosition: h
		}), (n, a) => (G(), I("div", {
			ref: Y(f),
			class: U(_.value),
			style: le(Y(u)),
			tabindex: "-1"
		}, [
			L("header", {
				ref_key: "headerRef",
				ref: s,
				class: U([
					Y(l).e("header"),
					e.headerClass,
					{ "show-close": e.showClose }
				])
			}, [q(n.$slots, "header", {}, () => [L("span", {
				role: "heading",
				"aria-level": e.ariaLevel,
				class: U(Y(l).e("title"))
			}, J(e.title), 11, Fe)]), e.showClose ? (G(), I("button", {
				key: 0,
				"aria-label": Y(r)("el.dialog.close"),
				class: U(Y(l).e("headerbtn")),
				type: "button",
				onClick: a[0] ||= (e) => n.$emit("close")
			}, [z(Y(t), { class: U(Y(l).e("close")) }, {
				default: Z(() => [(G(), P(pe(e.closeIcon || Y(i))))]),
				_: 1
			}, 8, ["class"])], 10, Ie)) : F("v-if", !0)], 2),
			L("div", {
				id: Y(c),
				class: U([Y(l).e("body"), e.bodyClass])
			}, [q(n.$slots, "default")], 10, Le),
			n.$slots.footer ? (G(), I("footer", {
				key: 0,
				class: U([Y(l).e("footer"), e.footerClass])
			}, [q(n.$slots, "footer")], 2)) : F("v-if", !0)
		], 6));
	}
}), ze = [
	"aria-label",
	"aria-labelledby",
	"aria-describedby"
], Be = d(/* @__PURE__ */ B({
	name: "ElDialog",
	inheritAttrs: !1,
	__name: "dialog",
	props: we,
	emits: Te,
	setup(e, { expose: t }) {
		let n = e, r = he();
		l({
			scope: "el-dialog",
			from: "the title slot",
			replacement: "the header slot",
			version: "3.0.0",
			ref: "https://element-plus.org/en-US/component/dialog.html#slots"
		}, N(() => !!r.title));
		let i = y("dialog"), a = K(), o = K(), s = K(), { visible: c, titleId: u, bodyId: d, style: f, overlayDialogStyle: p, rendered: m, transitionConfig: h, zIndex: g, _draggable: _, _alignCenter: ee, _overflow: v, handleClose: b, onModalClick: x, onOpenAutoFocus: S, onCloseAutoFocus: C, onCloseRequested: w, onFocusoutPrevented: T, closing: E } = Ne(n, a);
		fe(Ae, {
			dialogRef: a,
			headerRef: o,
			bodyId: d,
			ns: i,
			rendered: m,
			style: f
		});
		let D = Q(x), k = N(() => n.modalPenetrable && !n.modal && !n.fullscreen);
		return t({
			visible: c,
			dialogContentRef: s,
			resetPosition: () => {
				s.value?.resetPosition();
			},
			handleClose: b
		}), (t, n) => (G(), P(Y(O), {
			to: e.appendTo,
			disabled: e.appendTo === "body" ? !e.appendToBody : !1
		}, {
			default: Z(() => [z(M, H(Y(h), { persisted: "" }), {
				default: Z(() => [ve(z(Y(ke), {
					"custom-mask-event": "",
					mask: e.modal,
					"overlay-class": [
						e.modalClass ?? "",
						`${Y(i).namespace.value}-modal-dialog`,
						Y(i).is("penetrable", k.value)
					],
					"z-index": Y(g)
				}, {
					default: Z(() => [L("div", {
						role: "dialog",
						"aria-modal": "true",
						"aria-label": e.title || void 0,
						"aria-labelledby": e.title ? void 0 : Y(u),
						"aria-describedby": Y(d),
						class: U([`${Y(i).namespace.value}-overlay-dialog`, Y(i).is("closing", Y(E))]),
						style: le(Y(p)),
						onClick: n[0] ||= (...e) => Y(D).onClick && Y(D).onClick(...e),
						onMousedown: n[1] ||= (...e) => Y(D).onMousedown && Y(D).onMousedown(...e),
						onMouseup: n[2] ||= (...e) => Y(D).onMouseup && Y(D).onMouseup(...e)
					}, [z(Y(te), {
						loop: "",
						trapped: Y(c),
						"focus-start-el": "container",
						onFocusAfterTrapped: Y(S),
						onFocusAfterReleased: Y(C),
						onFocusoutPrevented: Y(T),
						onReleaseRequested: Y(w)
					}, {
						default: Z(() => [Y(m) ? (G(), P(Re, H({
							key: 0,
							ref_key: "dialogContentRef",
							ref: s
						}, t.$attrs, {
							center: e.center,
							"align-center": Y(ee),
							"close-icon": e.closeIcon,
							draggable: Y(_),
							overflow: Y(v),
							fullscreen: e.fullscreen,
							"header-class": e.headerClass,
							"body-class": e.bodyClass,
							"footer-class": e.footerClass,
							"show-close": e.showClose,
							title: e.title,
							"aria-level": e.headerAriaLevel,
							onClose: Y(b)
						}), re({
							header: Z(() => [t.$slots.title ? q(t.$slots, "title", { key: 1 }) : q(t.$slots, "header", {
								key: 0,
								close: Y(b),
								titleId: Y(u),
								titleClass: Y(i).e("title")
							})]),
							default: Z(() => [q(t.$slots, "default")]),
							_: 2
						}, [t.$slots.footer ? {
							name: "footer",
							fn: Z(() => [q(t.$slots, "footer")]),
							key: "0"
						} : void 0]), 1040, [
							"center",
							"align-center",
							"close-icon",
							"draggable",
							"overflow",
							"fullscreen",
							"header-class",
							"body-class",
							"footer-class",
							"show-close",
							"title",
							"aria-level",
							"onClose"
						])) : F("v-if", !0)]),
						_: 3
					}, 8, [
						"trapped",
						"onFocusAfterTrapped",
						"onFocusAfterReleased",
						"onFocusoutPrevented",
						"onReleaseRequested"
					])], 46, ze)]),
					_: 3
				}, 8, [
					"mask",
					"overlay-class",
					"z-index"
				]), [[ge, Y(c)]])]),
				_: 3
			}, 16)]),
			_: 3
		}, 8, ["to", "disabled"]));
	}
})), Ve = { class: "title" }, He = {
	key: 0,
	class: "sub-title"
}, Ue = { class: "zh-dialog__footer" }, $ = /* @__PURE__ */ B({
	name: "ZhDialog",
	inheritAttrs: !1,
	__name: "Dialog",
	props: /* @__PURE__ */ se({
		title: {},
		subTitle: {},
		cancelButtonText: { default: "取消" },
		confirmButtonText: { default: "确定" },
		confirmButtonDisabled: {
			type: Boolean,
			default: !1
		},
		closeOnClickModal: {
			type: Boolean,
			default: !1
		},
		size: { default: "middle" },
		width: {},
		appendToBody: { type: Boolean },
		appendTo: {},
		beforeClose: {},
		destroyOnClose: { type: Boolean },
		closeOnPressEscape: { type: Boolean },
		lockScroll: { type: Boolean },
		modal: { type: Boolean },
		modalPenetrable: { type: Boolean },
		openDelay: {},
		closeDelay: {},
		top: {},
		modelValue: { type: Boolean },
		modalClass: {},
		zIndex: {},
		trapFocus: { type: Boolean },
		headerAriaLevel: {},
		transition: {},
		center: { type: Boolean },
		alignCenter: { type: Boolean },
		closeIcon: {},
		draggable: { type: Boolean },
		overflow: { type: Boolean },
		fullscreen: { type: Boolean },
		headerClass: {},
		bodyClass: {},
		footerClass: {},
		showClose: { type: Boolean },
		ariaLevel: {}
	}, {
		modelValue: {
			type: Boolean,
			default: !0
		},
		modelModifiers: {}
	}),
	emits: /* @__PURE__ */ se(["submit", "close"], ["update:modelValue"]),
	setup(e, { emit: t }) {
		let n = e, r = me(e, "modelValue"), i = t, a = () => {
			i("close");
		}, o = () => {
			i("submit");
		}, s = () => {
			i("close");
		}, c = {
			small: "400px",
			middle: "600px",
			large: "800px",
			extraLarge: "920px"
		}, l = N(() => n.width ? n.width : c[n.size]);
		return (t, n) => (G(), P(Y(Be), H({
			modelValue: r.value,
			"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
			class: "zh-dialog"
		}, t.$attrs, {
			width: l.value,
			"close-on-click-modal": e.closeOnClickModal,
			onClose: s
		}), {
			header: Z(() => [q(t.$slots, "header", {}, () => [L("div", Ve, J(e.title), 1), e.subTitle ? (G(), I("div", He, J(e.subTitle), 1)) : F("", !0)])]),
			footer: Z(() => [q(t.$slots, "footer", {}, () => [L("div", Ue, [z(j, { onClick: a }, {
				default: Z(() => [R(J(e.cancelButtonText), 1)]),
				_: 1
			}), z(j, {
				type: "primary",
				disabled: e.confirmButtonDisabled,
				onClick: o
			}, {
				default: Z(() => [R(J(e.confirmButtonText), 1)]),
				_: 1
			}, 8, ["disabled"])])])]),
			default: Z(() => [q(t.$slots, "default")]),
			_: 3
		}, 16, [
			"modelValue",
			"width",
			"close-on-click-modal"
		]));
	}
}), We = e($);
//#endregion
export { Q as a, ke as i, $ as n, be as o, Pe as r, ye as s, We as t };
