UNPKG

@arco-design/web-vue

Version:

Arco Design Vue 2.0: A Vue.js 3 UI Library

741 lines 1.12 MB
!function(e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t(require("vue")) : "function" == typeof define && define.amd ? define(["vue"], t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).ArcoVue = t(e.Vue); }(this, function(e) { "use strict"; const t = Object.prototype.toString; function o(e2) { return "[object Array]" === t.call(e2); } function l(e2) { return "[object Null]" === t.call(e2); } function n(e2) { return "[object Boolean]" === t.call(e2); } function a(e2) { return "[object Object]" === t.call(e2); } const r = (e2) => "[object Promise]" === t.call(e2); function i(e2) { return "[object String]" === t.call(e2); } function s(e2) { return "[object Number]" === t.call(e2) && e2 == e2; } function c(e2) { return void 0 === e2; } function u(e2) { return "function" == typeof e2; } function d(e2) { return e2 || 0 === e2; } function p(e2) { return e2 === window; } const m = (e2) => void 0 !== (e2 == null ? void 0 : e2.$); function f(e2) { return a(e2) && "$y" in e2 && "$M" in e2 && "$D" in e2 && "$d" in e2 && "$H" in e2 && "$m" in e2 && "$s" in e2; } const v = Symbol("ArcoConfigProvider"), h = { formatYear: "YYYY \u5E74", formatMonth: "YYYY \u5E74 MM \u6708", today: "\u4ECA\u5929", view: { month: "\u6708", year: "\u5E74", week: "\u5468", day: "\u65E5" }, month: { long: { January: "\u4E00\u6708", February: "\u4E8C\u6708", March: "\u4E09\u6708", April: "\u56DB\u6708", May: "\u4E94\u6708", June: "\u516D\u6708", July: "\u4E03\u6708", August: "\u516B\u6708", September: "\u4E5D\u6708", October: "\u5341\u6708", November: "\u5341\u4E00\u6708", December: "\u5341\u4E8C\u6708" }, short: { January: "\u4E00\u6708", February: "\u4E8C\u6708", March: "\u4E09\u6708", April: "\u56DB\u6708", May: "\u4E94\u6708", June: "\u516D\u6708", July: "\u4E03\u6708", August: "\u516B\u6708", September: "\u4E5D\u6708", October: "\u5341\u6708", November: "\u5341\u4E00\u6708", December: "\u5341\u4E8C\u6708" } }, week: { long: { self: "\u5468", monday: "\u5468\u4E00", tuesday: "\u5468\u4E8C", wednesday: "\u5468\u4E09", thursday: "\u5468\u56DB", friday: "\u5468\u4E94", saturday: "\u5468\u516D", sunday: "\u5468\u65E5" }, short: { self: "\u5468", monday: "\u4E00", tuesday: "\u4E8C", wednesday: "\u4E09", thursday: "\u56DB", friday: "\u4E94", saturday: "\u516D", sunday: "\u65E5" } } }, g = { locale: "zh-CN", empty: { description: "\u6682\u65E0\u6570\u636E" }, drawer: { okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" }, popconfirm: { okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" }, modal: { okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" }, pagination: { goto: "\u524D\u5F80", page: "\u9875", countPerPage: "\u6761/\u9875", total: "\u5171 {0} \u6761" }, table: { okText: "\u786E\u5B9A", resetText: "\u91CD\u7F6E" }, upload: { start: "\u5F00\u59CB", cancel: "\u53D6\u6D88", delete: "\u5220\u9664", retry: "\u70B9\u51FB\u91CD\u8BD5", buttonText: "\u70B9\u51FB\u4E0A\u4F20", preview: "\u9884\u89C8", drag: "\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\u4E0A\u4F20", dragHover: "\u91CA\u653E\u6587\u4EF6\u5E76\u5F00\u59CB\u4E0A\u4F20", error: "\u4E0A\u4F20\u5931\u8D25" }, calendar: h, datePicker: { view: h.view, month: h.month, week: h.week, placeholder: { date: "\u8BF7\u9009\u62E9\u65E5\u671F", week: "\u8BF7\u9009\u62E9\u5468", month: "\u8BF7\u9009\u62E9\u6708\u4EFD", year: "\u8BF7\u9009\u62E9\u5E74\u4EFD", quarter: "\u8BF7\u9009\u62E9\u5B63\u5EA6", time: "\u8BF7\u9009\u62E9\u65F6\u95F4" }, rangePlaceholder: { date: ["\u5F00\u59CB\u65E5\u671F", "\u7ED3\u675F\u65E5\u671F"], week: ["\u5F00\u59CB\u5468", "\u7ED3\u675F\u5468"], month: ["\u5F00\u59CB\u6708\u4EFD", "\u7ED3\u675F\u6708\u4EFD"], year: ["\u5F00\u59CB\u5E74\u4EFD", "\u7ED3\u675F\u5E74\u4EFD"], quarter: ["\u5F00\u59CB\u5B63\u5EA6", "\u7ED3\u675F\u5B63\u5EA6"], time: ["\u5F00\u59CB\u65F6\u95F4", "\u7ED3\u675F\u65F6\u95F4"] }, selectTime: "\u9009\u62E9\u65F6\u95F4", today: "\u4ECA\u5929", now: "\u6B64\u523B", ok: "\u786E\u5B9A" }, image: { loading: "\u52A0\u8F7D\u4E2D" }, imagePreview: { fullScreen: "\u5168\u5C4F", rotateRight: "\u5411\u53F3\u65CB\u8F6C", rotateLeft: "\u5411\u5DE6\u65CB\u8F6C", zoomIn: "\u653E\u5927", zoomOut: "\u7F29\u5C0F", originalSize: "\u539F\u59CB\u5C3A\u5BF8" }, typography: { copied: "\u5DF2\u590D\u5236", copy: "\u590D\u5236", expand: "\u5C55\u5F00", collapse: "\u6298\u53E0", edit: "\u7F16\u8F91" }, form: { validateMessages: { required: "#{field} \u662F\u5FC5\u586B\u9879", type: { string: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u6587\u672C\u7C7B\u578B", number: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u6570\u5B57\u7C7B\u578B", boolean: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u5E03\u5C14\u7C7B\u578B", array: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u6570\u7EC4\u7C7B\u578B", object: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u5BF9\u8C61\u7C7B\u578B", url: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684 url \u5730\u5740", email: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684\u90AE\u7BB1\u5730\u5740", ip: "#{field} \u4E0D\u662F\u5408\u6CD5\u7684 IP \u5730\u5740" }, number: { min: "`#{value}` \u5C0F\u4E8E\u6700\u5C0F\u503C `#{min}`", max: "`#{value}` \u5927\u4E8E\u6700\u5927\u503C `#{max}`", equal: "`#{value}` \u4E0D\u7B49\u4E8E `#{equal}`", range: "`#{value}` \u4E0D\u5728 `#{min} ~ #{max}` \u8303\u56F4\u5185", positive: "`#{value}` \u4E0D\u662F\u6B63\u6570", negative: "`#{value}` \u4E0D\u662F\u8D1F\u6570" }, array: { length: "`#{field}` \u4E2A\u6570\u4E0D\u7B49\u4E8E #{length}", minLength: "`#{field}` \u4E2A\u6570\u6700\u5C11\u4E3A #{minLength}", maxLength: "`#{field}` \u4E2A\u6570\u6700\u591A\u4E3A #{maxLength}", includes: "#{field} \u4E0D\u5305\u542B #{includes}", deepEqual: "#{field} \u4E0D\u7B49\u4E8E #{deepEqual}", empty: "`#{field}` \u4E0D\u662F\u7A7A\u6570\u7EC4" }, string: { minLength: "\u5B57\u7B26\u6570\u6700\u5C11\u4E3A #{minLength}", maxLength: "\u5B57\u7B26\u6570\u6700\u591A\u4E3A #{maxLength}", length: "\u5B57\u7B26\u6570\u5FC5\u987B\u662F #{length}", match: "`#{value}` \u4E0D\u7B26\u5408\u6A21\u5F0F #{pattern}", uppercase: "`#{value}` \u5FC5\u987B\u5168\u5927\u5199", lowercase: "`#{value}` \u5FC5\u987B\u5168\u5C0F\u5199" }, object: { deepEqual: "`#{field}` \u4E0D\u7B49\u4E8E\u671F\u671B\u503C", hasKeys: "`#{field}` \u4E0D\u5305\u542B\u5FC5\u987B\u5B57\u6BB5", empty: "`#{field}` \u4E0D\u662F\u5BF9\u8C61" }, boolean: { true: "\u671F\u671B\u662F `true`", false: "\u671F\u671B\u662F `false`" } } }, colorPicker: { history: "\u6700\u8FD1\u4F7F\u7528\u989C\u8272", preset: "\u7CFB\u7EDF\u9884\u8BBE\u989C\u8272", empty: "\u6682\u65E0" } }, y = e.ref("zh-CN"), k = e.reactive({ "zh-CN": g }), b = () => { const t2 = e.inject(v, void 0), o2 = e.computed(() => { var _a2; return (_a2 = t2 == null ? void 0 : t2.locale) != null ? _a2 : k[y.value]; }), l2 = e.computed(() => o2.value.locale); return { i18nMessage: o2, locale: l2, t: (e2, ...t3) => { const l3 = e2.split("."); let n2 = o2.value; for (const t4 of l3) { if (!n2[t4]) return e2; n2 = n2[t4]; } return i(n2) && t3.length > 0 ? n2.replace(/{(\d+)}/g, (e3, o3) => { var _a2; return (_a2 = t3[o3]) != null ? _a2 : e3; }) : n2; } }; }, C = "$arco", x = (e2) => { var _a2; return (_a2 = e2 == null ? void 0 : e2.componentPrefix) != null ? _a2 : "A"; }, w = (e2, t2) => { var _a2; t2 && t2.classPrefix && (e2.config.globalProperties[C] = { ...(_a2 = e2.config.globalProperties[C]) != null ? _a2 : {}, classPrefix: t2.classPrefix }); }, S = (t2) => { var _a2, _b, _c2; const o2 = e.getCurrentInstance(), l2 = e.inject(v, void 0), n2 = (_c2 = (_b = l2 == null ? void 0 : l2.prefixCls) != null ? _b : (_a2 = o2 == null ? void 0 : o2.appContext.config.globalProperties[C]) == null ? void 0 : _a2.classPrefix) != null ? _c2 : "arco"; return t2 ? `${n2}-${t2}` : n2; }; var V = function() { if ("undefined" != typeof Map) return Map; function e2(e3, t2) { var o2 = -1; return e3.some(function(e4, l2) { return e4[0] === t2 && (o2 = l2, true); }), o2; } return function() { function t2() { this.__entries__ = []; } return Object.defineProperty(t2.prototype, "size", { get: function() { return this.__entries__.length; }, enumerable: true, configurable: true }), t2.prototype.get = function(t3) { var o2 = e2(this.__entries__, t3), l2 = this.__entries__[o2]; return l2 && l2[1]; }, t2.prototype.set = function(t3, o2) { var l2 = e2(this.__entries__, t3); ~l2 ? this.__entries__[l2][1] = o2 : this.__entries__.push([t3, o2]); }, t2.prototype.delete = function(t3) { var o2 = this.__entries__, l2 = e2(o2, t3); ~l2 && o2.splice(l2, 1); }, t2.prototype.has = function(t3) { return !!~e2(this.__entries__, t3); }, t2.prototype.clear = function() { this.__entries__.splice(0); }, t2.prototype.forEach = function(e3, t3) { void 0 === t3 && (t3 = null); for (var o2 = 0, l2 = this.__entries__; o2 < l2.length; o2++) { var n2 = l2[o2]; e3.call(t3, n2[1], n2[0]); } }, t2; }(); }(), N = "undefined" != typeof window && "undefined" != typeof document && window.document === document, B = "undefined" != typeof global && global.Math === Math ? global : "undefined" != typeof self && self.Math === Math ? self : "undefined" != typeof window && window.Math === Math ? window : Function("return this")(), $ = "function" == typeof requestAnimationFrame ? requestAnimationFrame.bind(B) : function(e2) { return setTimeout(function() { return e2(Date.now()); }, 1e3 / 60); }; var z = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], P = "undefined" != typeof MutationObserver, E = function() { function e2() { this.connected_ = false, this.mutationEventsAdded_ = false, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = function(e3, t2) { var o2 = false, l2 = false, n2 = 0; function a2() { o2 && (o2 = false, e3()), l2 && i2(); } function r2() { $(a2); } function i2() { var e4 = Date.now(); if (o2) { if (e4 - n2 < 2) return; l2 = true; } else o2 = true, l2 = false, setTimeout(r2, t2); n2 = e4; } return i2; }(this.refresh.bind(this), 20); } return e2.prototype.addObserver = function(e3) { ~this.observers_.indexOf(e3) || this.observers_.push(e3), this.connected_ || this.connect_(); }, e2.prototype.removeObserver = function(e3) { var t2 = this.observers_, o2 = t2.indexOf(e3); ~o2 && t2.splice(o2, 1), !t2.length && this.connected_ && this.disconnect_(); }, e2.prototype.refresh = function() { this.updateObservers_() && this.refresh(); }, e2.prototype.updateObservers_ = function() { var e3 = this.observers_.filter(function(e4) { return e4.gatherActive(), e4.hasActive(); }); return e3.forEach(function(e4) { return e4.broadcastActive(); }), e3.length > 0; }, e2.prototype.connect_ = function() { N && !this.connected_ && (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), P ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, { attributes: true, childList: true, characterData: true, subtree: true })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = true), this.connected_ = true); }, e2.prototype.disconnect_ = function() { N && this.connected_ && (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = false, this.connected_ = false); }, e2.prototype.onTransitionEnd_ = function(e3) { var t2 = e3.propertyName, o2 = void 0 === t2 ? "" : t2; z.some(function(e4) { return !!~o2.indexOf(e4); }) && this.refresh(); }, e2.getInstance = function() { return this.instance_ || (this.instance_ = new e2()), this.instance_; }, e2.instance_ = null, e2; }(), L = function(e2, t2) { for (var o2 = 0, l2 = Object.keys(t2); o2 < l2.length; o2++) { var n2 = l2[o2]; Object.defineProperty(e2, n2, { value: t2[n2], enumerable: false, writable: false, configurable: true }); } return e2; }, O = function(e2) { return e2 && e2.ownerDocument && e2.ownerDocument.defaultView || B; }, I = R(0, 0, 0, 0); function M(e2) { return parseFloat(e2) || 0; } function j(e2) { for (var t2 = [], o2 = 1; o2 < arguments.length; o2++) t2[o2 - 1] = arguments[o2]; return t2.reduce(function(t3, o3) { return t3 + M(e2["border-" + o3 + "-width"]); }, 0); } function T(e2) { var t2 = e2.clientWidth, o2 = e2.clientHeight; if (!t2 && !o2) return I; var l2 = O(e2).getComputedStyle(e2), n2 = function(e3) { for (var t3 = {}, o3 = 0, l3 = ["top", "right", "bottom", "left"]; o3 < l3.length; o3++) { var n3 = l3[o3], a3 = e3["padding-" + n3]; t3[n3] = M(a3); } return t3; }(l2), a2 = n2.left + n2.right, r2 = n2.top + n2.bottom, i2 = M(l2.width), s2 = M(l2.height); if ("border-box" === l2.boxSizing && (Math.round(i2 + a2) !== t2 && (i2 -= j(l2, "left", "right") + a2), Math.round(s2 + r2) !== o2 && (s2 -= j(l2, "top", "bottom") + r2)), !function(e3) { return e3 === O(e3).document.documentElement; }(e2)) { var c2 = Math.round(i2 + a2) - t2, u2 = Math.round(s2 + r2) - o2; 1 !== Math.abs(c2) && (i2 -= c2), 1 !== Math.abs(u2) && (s2 -= u2); } return R(n2.left, n2.top, i2, s2); } var A = "undefined" != typeof SVGGraphicsElement ? function(e2) { return e2 instanceof O(e2).SVGGraphicsElement; } : function(e2) { return e2 instanceof O(e2).SVGElement && "function" == typeof e2.getBBox; }; function D(e2) { return N ? A(e2) ? function(e3) { var t2 = e3.getBBox(); return R(0, 0, t2.width, t2.height); }(e2) : T(e2) : I; } function R(e2, t2, o2, l2) { return { x: e2, y: t2, width: o2, height: l2 }; } var F = function() { function e2(e3) { this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = R(0, 0, 0, 0), this.target = e3; } return e2.prototype.isActive = function() { var e3 = D(this.target); return this.contentRect_ = e3, e3.width !== this.broadcastWidth || e3.height !== this.broadcastHeight; }, e2.prototype.broadcastRect = function() { var e3 = this.contentRect_; return this.broadcastWidth = e3.width, this.broadcastHeight = e3.height, e3; }, e2; }(), W = function(e2, t2) { var o2, l2, n2, a2, r2, i2, s2, c2 = (l2 = (o2 = t2).x, n2 = o2.y, a2 = o2.width, r2 = o2.height, i2 = "undefined" != typeof DOMRectReadOnly ? DOMRectReadOnly : Object, s2 = Object.create(i2.prototype), L(s2, { x: l2, y: n2, width: a2, height: r2, top: n2, right: l2 + a2, bottom: r2 + n2, left: l2 }), s2); L(this, { target: e2, contentRect: c2 }); }, H = function() { function e2(e3, t2, o2) { if (this.activeObservations_ = [], this.observations_ = new V(), "function" != typeof e3) throw new TypeError("The callback provided as parameter 1 is not a function."); this.callback_ = e3, this.controller_ = t2, this.callbackCtx_ = o2; } return e2.prototype.observe = function(e3) { if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); if ("undefined" != typeof Element && Element instanceof Object) { if (!(e3 instanceof O(e3).Element)) throw new TypeError('parameter 1 is not of type "Element".'); var t2 = this.observations_; t2.has(e3) || (t2.set(e3, new F(e3)), this.controller_.addObserver(this), this.controller_.refresh()); } }, e2.prototype.unobserve = function(e3) { if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); if ("undefined" != typeof Element && Element instanceof Object) { if (!(e3 instanceof O(e3).Element)) throw new TypeError('parameter 1 is not of type "Element".'); var t2 = this.observations_; t2.has(e3) && (t2.delete(e3), t2.size || this.controller_.removeObserver(this)); } }, e2.prototype.disconnect = function() { this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this); }, e2.prototype.gatherActive = function() { var e3 = this; this.clearActive(), this.observations_.forEach(function(t2) { t2.isActive() && e3.activeObservations_.push(t2); }); }, e2.prototype.broadcastActive = function() { if (this.hasActive()) { var e3 = this.callbackCtx_, t2 = this.activeObservations_.map(function(e4) { return new W(e4.target, e4.broadcastRect()); }); this.callback_.call(e3, t2, e3), this.clearActive(); } }, e2.prototype.clearActive = function() { this.activeObservations_.splice(0); }, e2.prototype.hasActive = function() { return this.activeObservations_.length > 0; }, e2; }(), K = "undefined" != typeof WeakMap ? /* @__PURE__ */ new WeakMap() : new V(), q = function e2(t2) { if (!(this instanceof e2)) throw new TypeError("Cannot call a class as a function."); if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); var o2 = E.getInstance(), l2 = new H(t2, o2, this); K.set(this, l2); }; ["observe", "unobserve", "disconnect"].forEach(function(e2) { q.prototype[e2] = function() { var t2; return (t2 = K.get(this))[e2].apply(t2, arguments); }; }); var Z = void 0 !== B.ResizeObserver ? B.ResizeObserver : q; const Y = (e2) => Boolean(e2 && 1 & e2.shapeFlag), U = (e2, t2) => Boolean(e2 && 6 & e2.shapeFlag), X = (e2, t2) => Boolean(e2 && 16 & e2.shapeFlag), G = (e2, t2) => Boolean(e2 && 32 & e2.shapeFlag), _ = (e2) => { var _a2, _b; if (e2) for (const t2 of e2) { if (Y(t2) || U(t2)) return t2; if (X(t2, t2.children)) { const e3 = _(t2.children); if (e3) return e3; } else if (G(t2, t2.children)) { const e3 = (_b = (_a2 = t2.children).default) == null ? void 0 : _b.call(_a2); if (e3) { const t3 = _(e3); if (t3) return t3; } } else if (o(t2)) { const e3 = _(t2); if (e3) return e3; } } }, Q = (t2, o2) => { if (t2 && t2.length > 0) for (let l2 = 0; l2 < t2.length; l2++) { const n2 = t2[l2]; if (Y(n2) || U(n2)) { const a3 = u(o2) ? o2(n2) : o2; return t2[l2] = e.cloneVNode(n2, a3, true), true; } const a2 = J(n2); if (a2 && a2.length > 0) { if (Q(a2, o2)) return true; } } return false; }, J = (e2) => X(e2, e2.children) ? e2.children : o(e2) ? e2 : void 0, ee = (e2) => { var _a2, _b; if (Y(e2)) return e2.el; if (!U(e2)) { const t2 = J(e2); return te(t2); } if (1 === ((_a2 = e2.el) == null ? void 0 : _a2.nodeType)) return e2.el; if ((_b = e2.component) == null ? void 0 : _b.subTree) { const t2 = ee(e2.component.subTree); if (t2) return t2; } }, te = (e2) => { if (e2 && e2.length > 0) for (const t2 of e2) { const e3 = ee(t2); if (e3) return e3; } }, oe = (e2, t2 = false) => { var _a2, _b; const l2 = []; for (const a2 of e2 != null ? e2 : []) Y(a2) || U(a2) || t2 && (n2 = a2, a2.children, Boolean(n2 && 8 & n2.shapeFlag)) ? l2.push(a2) : X(a2, a2.children) ? l2.push(...oe(a2.children, t2)) : G(a2, a2.children) ? l2.push(...oe((_b = (_a2 = a2.children).default) == null ? void 0 : _b.call(_a2), t2)) : o(a2) && l2.push(...oe(a2, t2)); var n2; return l2; }; const le = (e2) => { if (e2) return u(e2) ? e2 : () => e2; }, ne = (e2, t2) => { var _a2; const o2 = []; if (U(e2, e2.type)) e2.type.name === t2 ? e2.component && o2.push(e2.component.uid) : ((_a2 = e2.component) == null ? void 0 : _a2.subTree) && o2.push(...ne(e2.component.subTree, t2)); else { const l2 = J(e2); l2 && o2.push(...ae(l2, t2)); } return o2; }, ae = (e2, t2) => { const o2 = []; if (e2 && e2.length > 0) for (const l2 of e2) o2.push(...ne(l2, t2)); return o2; }; var re = e.defineComponent({ name: "ResizeObserver", emits: ["resize"], setup(t2, { emit: o2, slots: l2 }) { let n2; const a2 = e.ref(), r2 = e.computed(() => m(a2.value) ? a2.value.$el : a2.value), i2 = (e2) => { e2 && (n2 = new Z((e3) => { const t3 = e3[0]; o2("resize", t3); }), n2.observe(e2)); }, s2 = () => { n2 && (n2.disconnect(), n2 = null); }; return e.watch(r2, (e2) => { n2 && s2(), e2 && i2(e2); }), e.onMounted(() => { r2.value && i2(r2.value); }), e.onUnmounted(() => { s2(); }), () => { var _a2, _b; const t3 = _((_b = (_a2 = l2.default) == null ? void 0 : _a2.call(l2)) != null ? _b : []); return t3 ? e.cloneVNode(t3, { ref: a2 }, true) : null; }; } }); const ie = "undefined" == typeof window ? global : window, se = ie.requestAnimationFrame, ce = ie.cancelAnimationFrame; function ue(e2) { let t2 = 0; const o2 = (...o3) => { t2 && ce(t2), t2 = se(() => { e2(...o3), t2 = 0; }); }; return o2.cancel = () => { ce(t2), t2 = 0; }, o2; } const de = () => { }, pe = () => { const { body: e2 } = document, t2 = document.documentElement; let o2; try { o2 = (window.top || window.self || window).document.body; } catch { } return { height: Math.max(e2.scrollHeight, e2.offsetHeight, t2.clientHeight, t2.scrollHeight, t2.offsetHeight, (o2 == null ? void 0 : o2.scrollHeight) || 0, (o2 == null ? void 0 : o2.clientHeight) || 0), width: Math.max(e2.scrollWidth, e2.offsetWidth, t2.clientWidth, t2.scrollWidth, t2.offsetWidth, (o2 == null ? void 0 : o2.scrollWidth) || 0, (o2 == null ? void 0 : o2.clientWidth) || 0) }; }, me = (() => { try { return !("undefined" != typeof window && void 0 !== document); } catch (e2) { return true; } })(), fe = me ? de : (e2, t2, o2, l2 = false) => { e2.addEventListener(t2, o2, l2); }, ve = me ? de : (e2, t2, o2, l2 = false) => { e2.removeEventListener(t2, o2, l2); }, he = (e2) => { const t2 = document.createElement("div"); return t2.setAttribute("class", `arco-overlay arco-overlay-${e2}`), t2; }, ge = (e2, t2) => { var _a2; if (!me) return (_a2 = (t2 != null ? t2 : document).querySelector(e2)) != null ? _a2 : void 0; }, ye = (e2, t2) => { if (i(e2)) { const o2 = "#" === e2[0] ? `[id='${e2.slice(1)}']` : e2; return ge(o2, t2); } return e2; }; var ke = (e2, t2) => { const o2 = e2.__vccOpts || e2; for (const [e3, l2] of t2) o2[e3] = l2; return o2; }; const be = e.defineComponent({ name: "Affix", components: { ResizeObserver: re }, props: { offsetTop: { type: Number, default: 0 }, offsetBottom: { type: Number }, target: { type: [String, Object, Function] }, targetContainer: { type: [String, Object, Function] } }, emits: { change: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("affix"), { target: n2, targetContainer: a2 } = e.toRefs(t2), r2 = e.ref(), i2 = e.ref(), s2 = e.ref(false), u2 = e.ref({}), d2 = e.ref({}), m2 = e.computed(() => ({ [l2]: s2.value })), f2 = ue(() => { if (!r2.value || !i2.value) return; const { offsetTop: e2, offsetBottom: l3 } = t2, n3 = c(l3) ? "top" : "bottom", a3 = r2.value.getBoundingClientRect(), m3 = function(e3) { return p(e3) ? { top: 0, bottom: window.innerHeight } : e3.getBoundingClientRect(); }(i2.value); let f3 = false, v2 = {}; const h2 = { width: `${r2.value.offsetWidth}px`, height: `${r2.value.offsetHeight}px` }; "top" === n3 ? (f3 = a3.top - m3.top < (e2 || 0), v2 = f3 ? { position: "fixed", top: `${m3.top + (e2 || 0)}px` } : {}) : (f3 = m3.bottom - a3.bottom < (l3 || 0), v2 = f3 ? { position: "fixed", bottom: `${window.innerHeight - m3.bottom + (l3 || 0)}px` } : {}), f3 !== s2.value && (s2.value = f3, o2("change", f3)), u2.value = h2, d2.value = { ...v2, ...f3 ? h2 : {} }; }); return e.onMounted(() => { e.watchEffect((e2) => { const t3 = n2 && n2.value !== window && ye(n2.value) || window; i2.value = t3, t3 && (fe(t3, "scroll", f2), fe(t3, "resize", f2), e2(() => { ve(t3, "scroll", f2), ve(t3, "resize", f2); })); }), e.watchEffect((e2) => { if (!i2.value) return; const t3 = a2 && a2.value !== window && ye(a2.value) || window; t3 && (fe(t3, "scroll", f2), fe(t3, "resize", f2), e2(() => { ve(t3, "scroll", f2), ve(t3, "resize", f2); })); }); }), { wrapperRef: r2, isFixed: s2, classNames: m2, placeholderStyles: u2, fixedStyles: d2, updatePositionThrottle: f2 }; }, methods: { updatePosition() { this.updatePositionThrottle(); } } }), Ce = { ref: "wrapperRef" }; var xe = ke(be, [["render", function(t2, o2, l2, n2, a2, r2) { const i2 = e.resolveComponent("ResizeObserver"); return e.openBlock(), e.createBlock(i2, { onResize: t2.updatePositionThrottle }, { default: e.withCtx(() => [e.createElementVNode("div", Ce, [t2.isFixed ? (e.openBlock(), e.createElementBlock("div", { key: 0, style: e.normalizeStyle(t2.placeholderStyles) }, null, 4)) : e.createCommentVNode("v-if", true), e.createElementVNode("div", { class: e.normalizeClass(t2.classNames), style: e.normalizeStyle(t2.fixedStyles) }, [e.createVNode(i2, { onResize: t2.updatePositionThrottle }, { default: e.withCtx(() => [e.renderSlot(t2.$slots, "default")]), _: 3 }, 8, ["onResize"])], 6)], 512)]), _: 3 }, 8, ["onResize"]); }]]); const we = Object.assign(xe, { install: (e2, t2) => { w(e2, t2); const o2 = x(t2); e2.component(o2 + xe.name, xe); } }); var Se = ke(e.defineComponent({ name: "IconHover", props: { prefix: { type: String }, size: { type: String, default: "medium" }, disabled: { type: Boolean, default: false } }, setup: () => ({ prefixCls: S("icon-hover") }) }), [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("span", { class: e.normalizeClass([t2.prefixCls, { [`${t2.prefix}-icon-hover`]: t2.prefix, [`${t2.prefixCls}-size-${t2.size}`]: "medium" !== t2.size, [`${t2.prefixCls}-disabled`]: t2.disabled }]) }, [e.renderSlot(t2.$slots, "default")], 2); }]]); const Ve = e.defineComponent({ name: "IconClose", props: { size: { type: [Number, String] }, strokeWidth: { type: Number, default: 4 }, strokeLinecap: { type: String, default: "butt", validator: (e2) => ["butt", "round", "square"].includes(e2) }, strokeLinejoin: { type: String, default: "miter", validator: (e2) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e2) }, rotate: Number, spin: Boolean }, emits: { click: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("icon"); return { cls: e.computed(() => [l2, `${l2}-close`, { [`${l2}-spin`]: t2.spin }]), innerStyle: e.computed(() => { const e2 = {}; return t2.size && (e2.fontSize = s(t2.size) ? `${t2.size}px` : t2.size), t2.rotate && (e2.transform = `rotate(${t2.rotate}deg)`), e2; }), onClick: (e2) => { o2("click", e2); } }; } }), Ne = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; var Be = ke(Ve, [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: e.normalizeClass(t2.cls), style: e.normalizeStyle(t2.innerStyle), "stroke-width": t2.strokeWidth, "stroke-linecap": t2.strokeLinecap, "stroke-linejoin": t2.strokeLinejoin, onClick: o2[0] || (o2[0] = (...e2) => t2.onClick && t2.onClick(...e2)) }, o2[1] || (o2[1] = [e.createElementVNode("path", { d: "M9.857 9.858 24 24m0 0 14.142 14.142M24 24 38.142 9.858M24 24 9.857 38.142" }, null, -1)]), 14, Ne); }]]); const $e = Object.assign(Be, { install: (e2, t2) => { var _a2; const o2 = (_a2 = t2 == null ? void 0 : t2.iconPrefix) != null ? _a2 : ""; e2.component(o2 + Be.name, Be); } }), ze = e.defineComponent({ name: "IconInfoCircleFill", props: { size: { type: [Number, String] }, strokeWidth: { type: Number, default: 4 }, strokeLinecap: { type: String, default: "butt", validator: (e2) => ["butt", "round", "square"].includes(e2) }, strokeLinejoin: { type: String, default: "miter", validator: (e2) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e2) }, rotate: Number, spin: Boolean }, emits: { click: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("icon"); return { cls: e.computed(() => [l2, `${l2}-info-circle-fill`, { [`${l2}-spin`]: t2.spin }]), innerStyle: e.computed(() => { const e2 = {}; return t2.size && (e2.fontSize = s(t2.size) ? `${t2.size}px` : t2.size), t2.rotate && (e2.transform = `rotate(${t2.rotate}deg)`), e2; }), onClick: (e2) => { o2("click", e2); } }; } }), Pe = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; var Ee = ke(ze, [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: e.normalizeClass(t2.cls), style: e.normalizeStyle(t2.innerStyle), "stroke-width": t2.strokeWidth, "stroke-linecap": t2.strokeLinecap, "stroke-linejoin": t2.strokeLinejoin, onClick: o2[0] || (o2[0] = (...e2) => t2.onClick && t2.onClick(...e2)) }, o2[1] || (o2[1] = [e.createElementVNode("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z", fill: "currentColor", stroke: "none" }, null, -1)]), 14, Pe); }]]); const Le = Object.assign(Ee, { install: (e2, t2) => { var _a2; const o2 = (_a2 = t2 == null ? void 0 : t2.iconPrefix) != null ? _a2 : ""; e2.component(o2 + Ee.name, Ee); } }), Oe = e.defineComponent({ name: "IconCheckCircleFill", props: { size: { type: [Number, String] }, strokeWidth: { type: Number, default: 4 }, strokeLinecap: { type: String, default: "butt", validator: (e2) => ["butt", "round", "square"].includes(e2) }, strokeLinejoin: { type: String, default: "miter", validator: (e2) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e2) }, rotate: Number, spin: Boolean }, emits: { click: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("icon"); return { cls: e.computed(() => [l2, `${l2}-check-circle-fill`, { [`${l2}-spin`]: t2.spin }]), innerStyle: e.computed(() => { const e2 = {}; return t2.size && (e2.fontSize = s(t2.size) ? `${t2.size}px` : t2.size), t2.rotate && (e2.transform = `rotate(${t2.rotate}deg)`), e2; }), onClick: (e2) => { o2("click", e2); } }; } }), Ie = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; var Me = ke(Oe, [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: e.normalizeClass(t2.cls), style: e.normalizeStyle(t2.innerStyle), "stroke-width": t2.strokeWidth, "stroke-linecap": t2.strokeLinecap, "stroke-linejoin": t2.strokeLinejoin, onClick: o2[0] || (o2[0] = (...e2) => t2.onClick && t2.onClick(...e2)) }, o2[1] || (o2[1] = [e.createElementVNode("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z", fill: "currentColor", stroke: "none" }, null, -1)]), 14, Ie); }]]); const je = Object.assign(Me, { install: (e2, t2) => { var _a2; const o2 = (_a2 = t2 == null ? void 0 : t2.iconPrefix) != null ? _a2 : ""; e2.component(o2 + Me.name, Me); } }), Te = e.defineComponent({ name: "IconExclamationCircleFill", props: { size: { type: [Number, String] }, strokeWidth: { type: Number, default: 4 }, strokeLinecap: { type: String, default: "butt", validator: (e2) => ["butt", "round", "square"].includes(e2) }, strokeLinejoin: { type: String, default: "miter", validator: (e2) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e2) }, rotate: Number, spin: Boolean }, emits: { click: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("icon"); return { cls: e.computed(() => [l2, `${l2}-exclamation-circle-fill`, { [`${l2}-spin`]: t2.spin }]), innerStyle: e.computed(() => { const e2 = {}; return t2.size && (e2.fontSize = s(t2.size) ? `${t2.size}px` : t2.size), t2.rotate && (e2.transform = `rotate(${t2.rotate}deg)`), e2; }), onClick: (e2) => { o2("click", e2); } }; } }), Ae = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; var De = ke(Te, [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: e.normalizeClass(t2.cls), style: e.normalizeStyle(t2.innerStyle), "stroke-width": t2.strokeWidth, "stroke-linecap": t2.strokeLinecap, "stroke-linejoin": t2.strokeLinejoin, onClick: o2[0] || (o2[0] = (...e2) => t2.onClick && t2.onClick(...e2)) }, o2[1] || (o2[1] = [e.createElementVNode("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-2-11a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2Zm4-18a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V15Z", fill: "currentColor", stroke: "none" }, null, -1)]), 14, Ae); }]]); const Re = Object.assign(De, { install: (e2, t2) => { var _a2; const o2 = (_a2 = t2 == null ? void 0 : t2.iconPrefix) != null ? _a2 : ""; e2.component(o2 + De.name, De); } }), Fe = e.defineComponent({ name: "IconCloseCircleFill", props: { size: { type: [Number, String] }, strokeWidth: { type: Number, default: 4 }, strokeLinecap: { type: String, default: "butt", validator: (e2) => ["butt", "round", "square"].includes(e2) }, strokeLinejoin: { type: String, default: "miter", validator: (e2) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e2) }, rotate: Number, spin: Boolean }, emits: { click: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("icon"); return { cls: e.computed(() => [l2, `${l2}-close-circle-fill`, { [`${l2}-spin`]: t2.spin }]), innerStyle: e.computed(() => { const e2 = {}; return t2.size && (e2.fontSize = s(t2.size) ? `${t2.size}px` : t2.size), t2.rotate && (e2.transform = `rotate(${t2.rotate}deg)`), e2; }), onClick: (e2) => { o2("click", e2); } }; } }), We = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; var He = ke(Fe, [["render", function(t2, o2, l2, n2, a2, r2) { return e.openBlock(), e.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: e.normalizeClass(t2.cls), style: e.normalizeStyle(t2.innerStyle), "stroke-width": t2.strokeWidth, "stroke-linecap": t2.strokeLinecap, "stroke-linejoin": t2.strokeLinejoin, onClick: o2[0] || (o2[0] = (...e2) => t2.onClick && t2.onClick(...e2)) }, o2[1] || (o2[1] = [e.createElementVNode("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z", fill: "currentColor", stroke: "none" }, null, -1)]), 14, We); }]]); const Ke = Object.assign(He, { install: (e2, t2) => { var _a2; const o2 = (_a2 = t2 == null ? void 0 : t2.iconPrefix) != null ? _a2 : ""; e2.component(o2 + He.name, He); } }); var qe = ke(e.defineComponent({ name: "Alert", components: { IconHover: Se, IconClose: $e, IconInfoCircleFill: Le, IconCheckCircleFill: je, IconExclamationCircleFill: Re, IconCloseCircleFill: Ke }, props: { type: { type: String, default: "info" }, showIcon: { type: Boolean, default: true }, closable: { type: Boolean, default: false }, title: String, banner: { type: Boolean, default: false }, center: { type: Boolean, default: false } }, emits: { close: (e2) => true, afterClose: () => true }, setup(t2, { slots: o2, emit: l2 }) { const n2 = S("alert"), a2 = e.ref(true), r2 = e.computed(() => [n2, `${n2}-${t2.type}`, { [`${n2}-with-title`]: Boolean(t2.title || o2.title), [`${n2}-banner`]: t2.banner, [`${n2}-center`]: t2.center }]); return { prefixCls: n2, cls: r2, visible: a2, handleClose: (e2) => { a2.value = false, l2("close", e2); }, handleAfterLeave: () => { l2("afterClose"); } }; } }), [["render", function(t2, o2, l2, n2, a2, r2) { const i2 = e.resolveComponent("icon-info-circle-fill"), s2 = e.resolveComponent("icon-check-circle-fill"), c2 = e.resolveComponent("icon-exclamation-circle-fill"), u2 = e.resolveComponent("icon-close-circle-fill"), d2 = e.resolveComponent("icon-close"), p2 = e.resolveComponent("icon-hover"); return e.openBlock(), e.createBlock(e.Transition, { name: "zoom-in-top", onAfterLeave: t2.handleAfterLeave }, { default: e.withCtx(() => [t2.visible ? (e.openBlock(), e.createElementBlock("div", { key: 0, role: "alert", class: e.normalizeClass(t2.cls) }, [t2.showIcon && ("normal" !== t2.type || t2.$slots.icon) ? (e.openBlock(), e.createElementBlock("div", { key: 0, class: e.normalizeClass(`${t2.prefixCls}-icon`) }, [e.renderSlot(t2.$slots, "icon", {}, () => ["info" === t2.type ? (e.openBlock(), e.createBlock(i2, { key: 0 })) : "success" === t2.type ? (e.openBlock(), e.createBlock(s2, { key: 1 })) : "warning" === t2.type ? (e.openBlock(), e.createBlock(c2, { key: 2 })) : "error" === t2.type ? (e.openBlock(), e.createBlock(u2, { key: 3 })) : e.createCommentVNode("v-if", true)])], 2)) : e.createCommentVNode("v-if", true), e.createElementVNode("div", { class: e.normalizeClass(`${t2.prefixCls}-body`) }, [t2.title || t2.$slots.title ? (e.openBlock(), e.createElementBlock("div", { key: 0, class: e.normalizeClass(`${t2.prefixCls}-title`) }, [e.renderSlot(t2.$slots, "title", {}, () => [e.createTextVNode(e.toDisplayString(t2.title), 1)])], 2)) : e.createCommentVNode("v-if", true), e.createElementVNode("div", { class: e.normalizeClass(`${t2.prefixCls}-content`) }, [e.renderSlot(t2.$slots, "default")], 2)], 2), t2.$slots.action ? (e.openBlock(), e.createElementBlock("div", { key: 1, class: e.normalizeClass(`${t2.prefixCls}-action`) }, [e.renderSlot(t2.$slots, "action")], 2)) : e.createCommentVNode("v-if", true), t2.closable ? (e.openBlock(), e.createElementBlock("div", { key: 2, tabindex: "-1", role: "button", "aria-label": "Close", class: e.normalizeClass(`${t2.prefixCls}-close-btn`), onClick: o2[0] || (o2[0] = (...e2) => t2.handleClose && t2.handleClose(...e2)) }, [e.renderSlot(t2.$slots, "close-element", {}, () => [e.createVNode(p2, null, { default: e.withCtx(() => [e.createVNode(d2)]), _: 1 })])], 2)) : e.createCommentVNode("v-if", true)], 2)) : e.createCommentVNode("v-if", true)]), _: 3 }, 8, ["onAfterLeave"]); }]]); const Ze = Object.assign(qe, { install: (e2, t2) => { w(e2, t2); const o2 = x(t2); e2.component(o2 + qe.name, qe); } }); function Ye(e2) { return "object" == typeof e2 && null != e2 && 1 === e2.nodeType; } function Ue(e2, t2) { return (!t2 || "hidden" !== e2) && "visible" !== e2 && "clip" !== e2; } function Xe(e2, t2) { if (e2.clientHeight < e2.scrollHeight || e2.clientWidth < e2.scrollWidth) { var o2 = getComputedStyle(e2, null); return Ue(o2.overflowY, t2) || Ue(o2.overflowX, t2) || function(e3) { var t3 = function(e4) { if (!e4.ownerDocument || !e4.ownerDocument.defaultView) return null; try { return e4.ownerDocument.defaultView.frameElement; } catch (e5) { return null; } }(e3); return !!t3 && (t3.clientHeight < e3.scrollHeight || t3.clientWidth < e3.scrollWidth); }(e2); } return false; } function Ge(e2, t2, o2, l2, n2, a2, r2, i2) { return a2 < e2 && r2 > t2 || a2 > e2 && r2 < t2 ? 0 : a2 <= e2 && i2 <= o2 || r2 >= t2 && i2 >= o2 ? a2 - e2 - l2 : r2 > t2 && i2 < o2 || a2 < e2 && i2 > o2 ? r2 - t2 + n2 : 0; } var _e = function(e2, t2) { var o2 = window, l2 = t2.scrollMode, n2 = t2.block, a2 = t2.inline, r2 = t2.boundary, i2 = t2.skipOverflowHiddenElements, s2 = "function" == typeof r2 ? r2 : function(e3) { return e3 !== r2; }; if (!Ye(e2)) throw new TypeError("Invalid target"); for (var c2, u2, d2 = document.scrollingElement || document.documentElement, p2 = [], m2 = e2; Ye(m2) && s2(m2); ) { if ((m2 = null == (u2 = (c2 = m2).parentElement) ? c2.getRootNode().host || null : u2) === d2) { p2.push(m2); break; } null != m2 && m2 === document.body && Xe(m2) && !Xe(document.documentElement) || null != m2 && Xe(m2, i2) && p2.push(m2); } for (var f2 = o2.visualViewport ? o2.visualViewport.width : innerWidth, v2 = o2.visualViewport ? o2.visualViewport.height : innerHeight, h2 = window.scrollX || pageXOffset, g2 = window.scrollY || pageYOffset, y2 = e2.getBoundingClientRect(), k2 = y2.height, b2 = y2.width, C2 = y2.top, x2 = y2.right, w2 = y2.bottom, S2 = y2.left, V2 = "start" === n2 || "nearest" === n2 ? C2 : "end" === n2 ? w2 : C2 + k2 / 2, N2 = "center" === a2 ? S2 + b2 / 2 : "end" === a2 ? x2 : S2, B2 = [], $2 = 0; $2 < p2.length; $2++) { var z2 = p2[$2], P2 = z2.getBoundingClientRect(), E2 = P2.height, L2 = P2.width, O2 = P2.top, I2 = P2.right, M2 = P2.bottom, j2 = P2.left; if ("if-needed" === l2 && C2 >= 0 && S2 >= 0 && w2 <= v2 && x2 <= f2 && C2 >= O2 && w2 <= M2 && S2 >= j2 && x2 <= I2) return B2; var T2 = getComputedStyle(z2), A2 = parseInt(T2.borderLeftWidth, 10), D2 = parseInt(T2.borderTopWidth, 10), R2 = parseInt(T2.borderRightWidth, 10), F2 = parseInt(T2.borderBottomWidth, 10), W2 = 0, H2 = 0, K2 = "offsetWidth" in z2 ? z2.offsetWidth - z2.clientWidth - A2 - R2 : 0, q2 = "offsetHeight" in z2 ? z2.offsetHeight - z2.clientHeight - D2 - F2 : 0, Z2 = "offsetWidth" in z2 ? 0 === z2.offsetWidth ? 0 : L2 / z2.offsetWidth : 0, Y2 = "offsetHeight" in z2 ? 0 === z2.offsetHeight ? 0 : E2 / z2.offsetHeight : 0; if (d2 === z2) W2 = "start" === n2 ? V2 : "end" === n2 ? V2 - v2 : "nearest" === n2 ? Ge(g2, g2 + v2, v2, D2, F2, g2 + V2, g2 + V2 + k2, k2) : V2 - v2 / 2, H2 = "start" === a2 ? N2 : "center" === a2 ? N2 - f2 / 2 : "end" === a2 ? N2 - f2 : Ge(h2, h2 + f2, f2, A2, R2, h2 + N2, h2 + N2 + b2, b2), W2 = Math.max(0, W2 + g2), H2 = Math.max(0, H2 + h2); else { W2 = "start" === n2 ? V2 - O2 - D2 : "end" === n2 ? V2 - M2 + F2 + q2 : "nearest" === n2 ? Ge(O2, M2, E2, D2, F2 + q2, V2, V2 + k2, k2) : V2 - (O2 + E2 / 2) + q2 / 2, H2 = "start" === a2 ? N2 - j2 - A2 : "center" === a2 ? N2 - (j2 + L2 / 2) + K2 / 2 : "end" === a2 ? N2 - I2 + R2 + K2 : Ge(j2, I2, L2, A2, R2 + K2, N2, N2 + b2, b2); var U2 = z2.scrollLeft, X2 = z2.scrollTop; V2 += X2 - (W2 = Math.max(0, Math.min(X2 + W2 / Y2, z2.scrollHeight - E2 / Y2 + q2))), N2 += U2 - (H2 = Math.max(0, Math.min(U2 + H2 / Z2, z2.scrollWidth - L2 / Z2 + K2))); } B2.push({ el: z2, top: W2, left: H2 }); } return B2; }, Qe = function(e2) { return function(t2) { return Math.pow(t2, e2); }; }, Je = function(e2) { return function(t2) { return 1 - Math.abs(Math.pow(t2 - 1, e2)); }; }, et = function(e2) { return function(t2) { return t2 < 0.5 ? Qe(e2)(2 * t2) / 2 : Je(e2)(2 * t2 - 1) / 2 + 0.5; }; }, tt = Qe(2), ot = Je(2), lt = et(2), nt = Qe(3), at = Je(3), rt = et(3), it = Qe(4), st = Je(4), ct = et(4), ut = Qe(5), dt = Je(5), pt = et(5), mt = function(e2) { var t2 = 7.5625, o2 = 2.75; return e2 < 1 / o2 ? t2 * e2 * e2 : e2 < 2 / o2 ? t2 * (e2 -= 1.5 / o2) * e2 + 0.75 : e2 < 2.5 / o2 ? t2 * (e2 -= 2.25 / o2) * e2 + 0.9375 : t2 * (e2 -= 2.625 / o2) * e2 + 0.984375; }, ft = function(e2) { return 1 - mt(1 - e2); }, vt = Object.freeze({ linear: function(e2) { return e2; }, quadIn: tt, quadOut: ot, quadInOut: lt, cubicIn: nt, cubicOut: at, cubicInOut: rt, quartIn: it, quartOut: st, quartInOut: ct, quintIn: ut, quintOut: dt, quintInOut: pt, sineIn: function(e2) { return 1 + Math.sin(Math.PI / 2 * e2 - Math.PI / 2); }, sineOut: function(e2) { return Math.sin(Math.PI / 2 * e2); }, sineInOut: function(e2) { return (1 + Math.sin(Math.PI * e2 - Math.PI / 2)) / 2; }, bounceOut: mt, bounceIn: ft, bounceInOut: function(e2) { return e2 < 0.5 ? 0.5 * ft(2 * e2) : 0.5 * mt(2 * e2 - 1) + 0.5; } }), ht = function(e2) { var t2 = e2.from, o2 = e2.to, l2 = e2.duration, n2 = e2.delay, a2 = e2.easing, r2 = e2.onStart, i2 = e2.onUpdate, s2 = e2.onFinish; for (var c2 in t2) void 0 === o2[c2] && (o2[c2] = t2[c2]); for (var u2 in o2) void 0 === t2[u2] && (t2[u2] = o2[u2]); this.from = t2, this.to = o2, this.duration = l2 || 500, this.delay = n2 || 0, this.easing = a2 || "linear", this.onStart = r2, this.onUpdate = i2 || function() { }, this.onFinish = s2, this.startTime = Date.now() + this.delay, this.started = false, this.finished = false, this.timer = null, this.keys = {}; }; ht.prototype.update = function() { if (this.time = Date.now(), !(this.time < this.startTime || this.finished)) if (this.elapsed !== this.duration) { for (var e2 in this.elapsed = this.time - this.startTime, this.elapsed = this.elapsed > this.duration ? this.duration : this.elapsed, this.to) this.keys[e2] = this.from[e2] + (this.to[e2] - this.from[e2]) * vt[this.easing](this.elapsed / this.duration); this.started || (this.onStart && this.onStart(this.keys), this.started = true), this.onUpdate(this.keys); } else this.finished || (this.finished = true, this.onFinish && this.onFinish(this.keys)); }, ht.prototype.start = function() { var e2 = this; this.startTime = Date.now() + this.delay; var t2 = function() { e2.update(), e2.timer = requestAnimationFrame(t2), e2.finished && (cancelAnimationFrame(e2.timer), e2.timer = null); }; t2(); }, ht.prototype.stop = function() { cancelAnimationFrame(this.timer), this.timer = null; }; const gt = Symbol("ArcoAnchor"), yt = ["start", "end", "center", "nearest"], kt = e.defineComponent({ name: "Anchor", props: { boundary: { type: [Number, String], default: "start", validator: (e2) => s(e2) || yt.includes(e2) }, lineLess: { type: Boolean, default: false }, scrollContainer: { type: [String, Object] }, changeHash: { type: Boolean, default: true }, smooth: { type: Boolean, default: true } }, emits: { select: (e2, t2) => true, change: (e2) => true }, setup(t2, { emit: o2 }) { const l2 = S("anchor"), n2 = e.ref(), a2 = e.ref(), r2 = e.reactive({}), i2 = e.ref(""), c2 = e.ref(false), d2 = e.ref(), m2 = e.ref(), f2 = (e2) => { try { const o3 = ye(e2); if (!o3) return; let l3, n3 = 0; s(t2.boundary) ? (l3 = "start", n3 = t2.boundary) : l3 = t2.boundary; const a3 = _e(o3, { block: l3 }); if (!a3.length) return; const { el: r3, top: i3 } = a3[0]; !function(e3, t3, o4) { new ht({ from: { scrollTop: e3.scrollTop }, to: { scrollTop: t3 }, easing: "quartOut", duration: 300, onUpdate: (t4) => { e3.scrollTop = t4.scrollTop; }, onFinish: () => { u(o4) && o4(); } }).start(); }(r3, i3 - n3, () => { c2.value = false; }), c2.value = true; } catch (e3) { console.error(e3); } }, v2 = ue(() => { if (c2.value) return; const e2 = g2(); if (e2 && e2.id) { const t3 = `#${e2.id}`; h2(t3); } }), h2 = (t3) => { if (!r2[t3] && n2.value) { const e2 = ye(`a[data-href='${t3}']`, n2.value); if (!e2) return; r2[t3] = e2; } t3 !== i2.value && (i2.value = t3, e.nextTick(() => { o2("change", t3); })); }, g2 = () => { if (!d2.value || !m2.value) return; const e2 = s(t2.boundary) ? t2.boundary : 0, o3 = m2.value.getBoundingClientRect(); for (const t3 of Object.keys(r2)) { const l3 = ye(t3); if (l3) { const { top: t4 } = l3.getBo