UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,525 lines (1,524 loc) 307 kB
var Fo = Object.defineProperty; var ko = (e, t, n) => t in e ? Fo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var ne = (e, t, n) => ko(e, typeof t != "symbol" ? t + "" : t, n); import { ref as S, watch as xe, createVNode as M, createTextVNode as mt, computed as j, defineComponent as ze, Fragment as _t, reactive as at, createApp as rn, onUnmounted as Vt, onMounted as vt, Transition as an, mergeProps as ht, onBeforeUnmount as ln, withDirectives as Io, resolveDirective as Oo, nextTick as Bt, inject as yt, provide as Eo, triggerRef as Mo, isVNode as Vo, onBeforeMount as Bo, Teleport as Do, shallowRef as No, render as $t, h as Ro, cloneVNode as $o } from "vue"; import { isPlainObject as Qt, cloneDeep as dt, isUndefined as Jt } from "lodash-es"; import { useIdentify as sn, useGroupData as Po, useFilter as un, useHierarchy as cn, useLoading as jo, useDataView as dn, useSelection as fn, useSelectHierarchyItem as Ho, useDataViewContainerStyle as pn, useCommandColumn as Lo, useColumn as mn, useSort as Wo, useGroupColumn as hn, useRow as vn, useEdit as gn, useVisualDataBound as yn, useVisualDataCell as bn, useVisualDataRow as Cn, useVisualData as wn, useCellPosition as _n, useSidebar as Ao, useVirtualScroll as Sn, useFitColumn as xn, useFilterHistory as zo, useColumnFilter as Go, useDragColumn as qo, getColumnHeader as Uo, getSidebar as Yo, getDisableMask as Xo, getHorizontalScrollbar as Tn, getVerticalScrollbar as Fn, getEmpty as kn } from "../data-view/index.esm.js"; import "../modal/index.esm.js"; import Ko from "../transfer/index.esm.js"; import Qo from "../tabs/index.esm.js"; import Jo from "../order/index.esm.js"; import "../condition/index.esm.js"; import Zo, { FCheckbox as er } from "../checkbox/index.esm.js"; import tr from "../filter-bar/index.esm.js"; import Zt from "../tooltip/index.esm.js"; import nr from "../pagination/index.esm.js"; import or from "../button/index.esm.js"; import rr from "../search-box/index.esm.js"; import ir from "../tags/index.esm.js"; import ar, { FDynamicFormGroup as lr, FDynamicFormInput as sr } from "../dynamic-form/index.esm.js"; import "../designer-canvas/index.esm.js"; import { useResizeObserver as Gt } from "@vueuse/core"; import { getCustomClass as Pt, withInstall as In, useDateFormat as ur, useNumberFormat as cr, resolveField as Ye, setFieldValue as Ht } from "../common/index.esm.js"; import dr from "../accordion/index.esm.js"; import fr from "../avatar/index.esm.js"; import pr from "../button-edit/index.esm.js"; import mr from "../button-group/index.esm.js"; import hr from "../calendar/index.esm.js"; import vr from "../capsule/index.esm.js"; import gr from "../color-picker/index.esm.js"; import Lt from "../combo-list/index.esm.js"; import yr from "../content-container/index.esm.js"; import br from "../data-grid/index.esm.js"; import Cr from "../date-picker/index.esm.js"; import wr from "../dropdown/index.esm.js"; import "../external-container/index.esm.js"; import _r from "../events-editor/index.esm.js"; import Sr from "../image-cropper/index.esm.js"; import xr from "../input-group/index.esm.js"; import Tr from "../layout/index.esm.js"; import Fr from "../list-nav/index.esm.js"; import kr from "../list-view/index.esm.js"; import Ir from "../lookup/index.esm.js"; import Or from "../nav/index.esm.js"; import Er from "../number-spinner/index.esm.js"; import Mr from "../number-range/index.esm.js"; import Vr from "../page-header/index.esm.js"; import Br from "../page-footer/index.esm.js"; import Dr from "../progress/index.esm.js"; import Nr from "../query-solution/index.esm.js"; import Rr from "../radio-group/index.esm.js"; import $r from "../rate/index.esm.js"; import Pr from "../response-toolbar/index.esm.js"; import jr from "../response-layout/index.esm.js"; import Hr from "../response-layout-editor/index.esm.js"; import Lr from "../section/index.esm.js"; import Wr from "../smoke-detector/index.esm.js"; import Ar from "../splitter/index.esm.js"; import zr from "../step/index.esm.js"; import Gr from "../switch/index.esm.js"; import qr from "../text/index.esm.js"; import Ur from "../time-picker/index.esm.js"; import Yr from "../tree-view/index.esm.js"; import Xr from "../uploader/index.esm.js"; import Kr from "../verify-detail/index.esm.js"; import Qr from "../component/index.esm.js"; import Jr from "../video/index.esm.js"; import Zr from "../textarea/index.esm.js"; import ei from "../tree-grid/index.esm.js"; import ti from "../fieldset/index.esm.js"; import ni from "../drawer/index.esm.js"; import oi from "../binding-selector/index.esm.js"; import "../notify/index.esm.js"; import ri from "../combo-tree/index.esm.js"; import ii from "../field-selector/index.esm.js"; import ai from "../mapping-editor/index.esm.js"; import li from "../schema-selector/index.esm.js"; import si from "../event-parameter/index.esm.js"; import ui from "../filter-condition-editor/index.esm.js"; import ci from "../sort-condition-editor/index.esm.js"; import di from "../menu-lookup/index.esm.js"; import { createPropsResolver as fi } from "../dynamic-resolver/index.esm.js"; const On = {}, En = {}; function qt(e) { const { properties: t, title: n, ignore: o } = e, r = o && Array.isArray(o), a = Object.keys(t).reduce((i, u) => ((!r || !o.find((c) => c === u)) && (i[u] = t[u].type === "object" && t[u].properties ? qt(t[u]) : dt(t[u].default)), i), {}); if (n && (!r || !o.find((i) => i === "id"))) { const i = n.toLowerCase().replace(/-/g, "_"); a.id = `${i}_${Math.random().toString().slice(2, 6)}`; } return a; } function pi(e) { const { properties: t, title: n, required: o } = e; if (o && Array.isArray(o)) { const r = o.reduce((a, i) => (a[i] = t[i].type === "object" && t[i].properties ? qt(t[i]) : dt(t[i].default), a), {}); if (n && o.find((a) => a === "id")) { const a = n.toLowerCase().replace(/-/g, "_"); r.id = `${a}_${Math.random().toString().slice(2, 6)}`; } return r; } return { type: n }; } function Mn(e, t = {}, n) { const o = On[e]; if (o) { let r = pi(o); const a = En[e]; return r = a ? a({ getSchemaByType: Mn }, r, t, n) : r, r; } return null; } function mi(e, t) { const n = qt(t); return Object.keys(n).reduce((o, r) => (Object.prototype.hasOwnProperty.call(e, r) && (o[r] && Qt(o[r]) && Qt(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r]), o), n), n; } function Vn(e, t) { return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => { if (t.has(r)) { const a = t.get(r); if (typeof a == "string") o[a] = e[r]; else { const i = a(r, e[r], e); Object.assign(o, i); } } else o[r] = e[r]; return o; }, {}); } function hi(e, t, n = /* @__PURE__ */ new Map()) { const o = mi(e, t); return Vn(o, n); } function vi(e = {}) { function t(p, d, s, f) { if (typeof s == "number") return f[p].length === s; if (typeof s == "object") { const w = Object.keys(s)[0], _ = s[w]; if (w === "not") return Number(f[p].length) !== Number(_); if (w === "moreThan") return Number(f[p].length) >= Number(_); if (w === "lessThan") return Number(f[p].length) <= Number(_); } return !1; } function n(p, d, s, f) { return f[p] && f[p].propertyValue && String(f[p].propertyValue.value) === String(s); } const o = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", n] ]); Object.keys(e).reduce((p, d) => (p.set(d, e[d]), p), o); function r(p, d) { const s = p; return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((f) => { if (f === "length") return { target: s, operator: "length", param: null, value: d[f] }; const w = f, _ = d[f]; return { target: s, operator: "getProperty", param: w, value: _ }; }) : []; } function a(p) { return Object.keys(p).reduce((s, f) => { const w = r(f, p[f]); return s.push(...w), s; }, []); } function i(p, d) { if (o.has(p.operator)) { const s = o.get(p.operator); return s && s(p.target, p.param, p.value, d) || !1; } return !1; } function u(p, d) { return a(p).reduce((w, _) => w && i(_, d), !0); } function c(p, d) { const s = Object.keys(p), f = s.includes("allOf"), w = s.includes("anyOf"), _ = f || w, h = (_ ? p[_ ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((x) => u(x, d)); return f ? !h.includes(!1) : h.includes(!0); } return { parseValueSchema: c }; } const le = { button: { type: "button", name: "按钮" }, "response-toolbar": { type: "response-toolbar", name: "工具栏" }, "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" }, "content-container": { type: "content-container", name: "容器" }, "input-group": { type: "input-group", name: "文本" }, textarea: { type: "textarea", name: "多行文本" }, lookup: { type: "lookup", name: "帮助" }, "number-spinner": { type: "number-spinner", name: "数值" }, "date-picker": { type: "date-picker", name: "日期" }, switch: { type: "switch", name: "开关" }, "radio-group": { type: "radio-group", name: "单选组" }, "check-box": { type: "check-box", name: "复选框" }, "check-group": { type: "check-group", name: "复选框组" }, "combo-list": { type: "combo-list", name: "下拉列表" }, "response-form": { type: "response-form", name: "卡片面板" }, "response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" }, "response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" }, "tree-grid": { type: "tree-grid", name: "树表格" }, "tree-grid-column": { type: "tree-grid-column", name: "树表格列" }, "data-grid": { type: "data-grid", name: "表格" }, "data-grid-column": { type: "data-grid-column", name: "表格列" }, module: { type: "Module", name: "模块" }, component: { type: "component", name: "组件" }, tabs: { type: "tabs", name: "标签页" }, "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" }, "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" }, "time-picker": { type: "time-picker", name: "时间选择" }, section: { type: "section", name: "分组面板" }, "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" }, "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" }, splitter: { type: "splitter", name: "分栏面板" }, "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" }, "component-ref": { type: "component-ref", name: "组件引用节点" }, uploader: { type: "uploader", name: "附件上传" }, "page-header": { type: "page-header", name: "页头" }, "page-footer": { type: "page-footer", name: "页脚" }, "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" }, fieldset: { type: "fieldset", name: "分组" }, "query-solution": { type: "query-solution", name: "筛选方案" }, drawer: { type: "drawer", name: "抽屉" } }, gi = {}, yi = {}; vi(); function ft(e, t, n = /* @__PURE__ */ new Map(), o = (i, u, c, p) => u, r = {}, a = (i) => i) { return On[t.title] = t, En[t.title] = o, gi[t.title] = r, yi[t.title] = a, (i = {}, u = !0) => { if (!u) return Vn(i, n); const c = hi(i, t, n), p = Object.keys(e).reduce((d, s) => (d[s] = e[s].default, d), {}); return Object.assign(p, c); }; } function St(e, t) { return { customClass: t.class, customStyle: t.style }; } function bi() { function e(t, n) { const { dataSource: o } = t || {}; return o === void 0 ? {} : {}; } return { resolve: e }; } function Ci() { function e(t, n) { return t.selectItemById(n); } return { selectItemById: e }; } function wi() { function e(t, n) { const { columns: o } = n; return t.updateColumns(o); } return { updateColumns: e }; } const _i = /* @__PURE__ */ new Map([ ["appearance", St] ]); function Si(e, t, n) { return t; } const xi = "tree-view", Ti = "A Farris Component", Fi = "object", ki = { basic: { description: "Basic Infomation", title: "基本信息", properties: { id: { description: "组件标识", title: "标识", type: "string", readonly: !0 }, type: { description: "组件类型", title: "控件类型", type: "select", editor: { type: "waiting for modification", enum: [] } } } } }, Ii = { title: xi, description: Ti, type: Fi, categories: ki }, Oi = "https://json-schema.org/draft/2020-12/schema", Ei = "https://farris-design.gitee.io/tree-view.schema.json", Mi = "tree-view", Vi = "A Farris Component", Bi = "object", Di = { id: { description: "The unique identifier for tree-view", type: "string" }, type: { description: "The type string of tree-view", type: "string", default: "tree-view" }, appearance: { description: "", type: "object", properties: { class: { type: "string" }, style: { type: "string" } }, default: {} }, binding: { description: "", type: "object", default: {} }, disable: { type: "string", default: !1 }, editable: { description: "", type: "boolean", default: !0 }, placeholder: { description: "", type: "string", default: "" }, readonly: { description: "", type: "boolean", default: !1 }, require: { description: "", type: "boolean", default: !1 }, tabindex: { description: "", type: "number", default: -1 }, visible: { description: "", type: "boolean", default: !0 } }, Ni = [ "id", "type" ], Ri = { $schema: Oi, $id: Ei, title: Mi, description: Vi, type: Bi, properties: Di, required: Ni }, sc = { /** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */ fitColumns: { type: Boolean, default: !1 }, /** 自动适配列宽度模式 */ fitMode: { type: String, default: "average" }, groups: { type: Array, defaut: [] }, /** 允许拖动表头改变列显示顺序 */ reorderColumn: { type: Boolean, default: !1 }, /** 允许拖动改变列宽度 */ resizeColumn: { type: Boolean, default: !0 }, /** 双击表头列自适应内容宽度 */ resizeColumnOnDoubleClick: { type: Boolean, default: !0 } }, Ut = { /** 列集合 */ columns: { type: Array, default: [ { field: "name", title: "", dataType: "string", width: "100%" } ] }, columnOption: { type: Object }, displayField: { type: String, default: "name", require: !0 }, /** 是否显示连接线 */ showLines: { type: Boolean, default: !1 }, /** 树表数据 */ /** 被绑定数据 */ data: { type: Object, default: [] }, /** 禁用组件 */ disable: { type: Boolean, default: !1 }, disabledField: { type: String, default: "disabled" }, /** 适配父组件尺寸 */ fit: { type: Boolean, default: !1 }, /** 高度 */ height: { type: Number, default: -1 }, /** DataGrid组件唯一标识 */ id: { type: String, default: "" }, /** 被绑定数据的标识字段 */ idField: { type: String, default: "id", require: !0 }, /** 最小高度 */ minHeight: { type: Number, default: 300 }, /** 最小宽度 */ minWidth: { type: Number, default: 400 }, /** 分页配置 */ pagination: { type: Object, default: { enable: !1, size: -1 } }, /** 行号配置 */ rowNumber: { type: Object, default: { enable: !0, width: 32, heading: "序号" } }, /** 选择配置 */ selection: { type: Object, default: { enableSelectRow: !0, multiSelect: !1, multiSelectMode: "DependOnCheck", showCheckbox: !1, showSelectAll: !1, showSelection: !0 } }, /** 已选数据标识 */ selectionValues: { type: Array, default: [] }, /** 是否显示图标集 */ showTreeNodeIcons: { type: Boolean, default: !1 }, /** 树节点图标数据 */ treeNodeIconsData: { type: [Object, String], default: {} }, /** 绑定数据中的图标属性key值 */ iconField: { type: String, default: "" }, /** 宽度 */ width: { type: Number, default: -1 }, /** 新增值 */ newDataItem: { type: [Function, Object], default: () => { } }, /** 连接线颜色 */ lineColor: { type: String, default: "#9399a0" }, /** 单元格高度 */ cellHeight: { type: Number, default: 28 }, onOutputValue: { type: Function, default: () => { } }, onCurrentEvent: { type: Function, default: () => { } }, hierarchy: { type: Object, default: { cascadeOption: { autoCheckChildren: !1, autoCheckParent: !1, selectionRange: "All" }, parentIdField: "parent" } }, /** 行配置 */ rowOption: { type: Object }, /** 虚拟化渲染数据 */ virtualized: { type: Boolean, default: !1 }, /** 是否出现省略号 */ showEllipsis: { type: Boolean, default: !1 } }, Bn = ft(Ut, Ri, _i, Si, Ii); var et = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(et || {}), it = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(it || {}), bt = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(bt || {}), Le = /* @__PURE__ */ ((e) => (e[e.none = 0] = "none", e[e.filterable = 1] = "filterable", e[e.sortable = 2] = "sortable", e[e.filtered = 4] = "filtered", e[e.sorted = 8] = "sorted", e[e.ascending = 16] = "ascending", e[e.descending = 32] = "descending", e))(Le || {}); function Dn(e, t) { var w; const n = String(Date.now()), o = ((w = e.rowOption) == null ? void 0 : w.height) || 28, r = S(t.value.primaryColumnsWidth); function a(_) { const R = {}; return _.reduce( (F, h, g) => { const x = g < _.length - 1 ? _[g + 1] : null; return g === 0 && (F[h.field] = { left: 0 }), h.actualWidth !== void 0 && (F[h.field].width = h.actualWidth), x && (F[x.field] = { left: F[h.field].left + (h.actualWidth || 0) }), F; }, R ), R; } function i(_, R, F) { const h = o * (F + 1), x = R[_.field].left - h + (R[_.field].width || 0), m = _.parent.height ? `${_.parent.height}px` : ""; return { left: `${h}px`, width: `${x}px`, height: `${m}` }; } function u(_, R, F) { return { right: "0px", height: `${_.parent.height ? `${_.parent.height}px` : ""}` }; } function c(_, R) { const F = _.parent.height ? `${_.parent.height}px` : ""; return { left: `${R[_.field].left}px`, height: `${F}`, width: isNaN(Number(R[_.field].width)) ? "100%" : `${R[_.field].width}px` }; } function p(_, R, F) { const g = (R.spanned || []).reduce((m, v) => m + (v.parent.height || 0), 0) + (_.height || 0); return { top: `${_.top}px`, left: `${F[R.field].left}px`, width: `${F[R.field].width}px`, height: `${g}px`, padding: `calc(${g / 2}px - 1rem) 0` // height: `calc(${rowHeight}px * ${cell.rowSpan})`, // padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0` }; } function d(_, R) { return `${n}_${_.type}_r_${_.index}_c_${R}_${_.refreshKey || ""}`; } function s(_) { return `${n}_${_.type}_r_${_.index}_${_.refreshKey || ""}`; } function f(_) { const R = _.height ? `${_.height}px` : ""; return { top: `${_.top}px`, width: isNaN(r.value) ? "100%" : `${r.value}px`, height: `${R}` }; } return xe(t, () => { r.value = t.value.primaryColumnsWidth; }), { calculateCellPositionInRow: a, cellKey: d, cellPosition: c, groupCellPosition: i, rowKey: s, rowPosition: f, rowSpanCellPosition: p, summaryCellPosition: u }; } function $i(e, t, n) { const { hasChildrenField: o } = n, r = S("#9399a0"), a = S(28); function i() { return [].concat( ...t.value.filter((f) => f.raw.__fv_descendant_index__.length !== 0).map((f) => [...f.raw.__fv_descendant_index__.slice(-1)]).flat() ).sort((f, w) => Number(f) - Number(w)); } function u(d) { const s = new Array(t.value.length).fill(0); if (e.showLines) { const f = i(); t.value.forEach((w, _) => { const R = f.includes(_), F = w.raw[o.value]; s[_] = `repeating-linear-gradient(90deg, ${r.value} 0 1px, transparent 0px 2px) ${F ? "-10px" : "0px"} ${a.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${r.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${R ? "50%" : "100%"} no-repeat`; }), s[0] = ""; } return s[d]; } function c(d, s, f) { return f[d].parents.set(d, !0).forEach((_) => { f[_].childsLength = f[_].childWithLines.filter((R) => s[R].visible).length; }), s; } function p(d) { const w = d.raw.__fv_parent_index__ === void 0 || d.raw.__fv_parent_index__ === -1 ? 0 : 8, _ = 0, R = d.raw[o.value], F = d.visible ? { left: `${d.layer * 10 + d.layer * w + _}px`, // paddingBottom: handlePaddingBottomReturnValue(visualTreeNode.index), background: u(d.index), display: "flex", width: "100%", position: "relative", paddingLeft: "0.75rem" } : { display: "none" }; return R || (F.paddingLeft = "2rem"), F; } return { hierarchyCellContentStyle: p, handleCollapsedPaddingBottom: c }; } function Pi(e, t, n) { const o = S(e.iconField); function r(a, i) { if (o.value) return a.raw[e.iconField]; let u = ""; return a.raw[n.value] !== !0 ? u = t.value.leafnodes : u = a.collapse ? t.value.fold : t.value.unfold, u; } return { treeNodeIconsClass: r }; } function ji(e, t, n, o, r, a, i, u) { const { dataView: c, fold: p, hasRealChildren: d, unFold: s, reOrderVisibleIndex: f } = o, { collapseField: w, hasChildrenField: _ } = r, { reCalculateVisualDataRows: R, updateVirticalScroll: F } = a; function h(g) { if (g.raw[_.value]) { const m = c.value[g.raw.__fv_index__]; m[w.value] = !m[w.value], o.toggleChildrenVisibiltyByCollapseStatus(m), m[_.value] = d(m), f(), R(), F(); } t.emit("expandNode", { row: g }); } return { toggleTreeNode: h }; } function Hi(e) { function t(r) { return {}; } function n(r) { const { valign: a, align: i } = r; return { "d-flex": !0, "h-100": !0, "w-100": !0, "justify-content-start": i !== "center" && i !== "right", "justify-content-center": i === "center", "justify-content-right": i === "right", "align-items-start": a !== "middle" && a !== "bottom", "align-items-center": a === "middle", "align-items-end": a === "bottom" }; } function o(r) { const { align: a, showEllipsis: i } = r; return { "w-100": !0, "text-left": a !== "center" && a !== "right", "text-center": a === "center", "text-right": a === "right", "text-truncate": i }; } return { cellContentPosition: t, cellContentClass: n, cellContentClassWithEllipsis: o }; } function Nn(e, t, n, o, r, a, i, u, c, p, d, s, f) { const { onClickCell: w } = a, { gridRowClass: _, onClickRow: R, onMouseoverRow: F, onMouseoutRow: h } = u, { enableMultiSelect: g, select: x, unSelect: m, selectItem: v } = c; S(e.cellHeight); const I = S(e.treeNodeIconsData || {}), { hasChildrenField: l, shouldShowCheckBox: y, shouldShowIcon: C } = i, { toggleTreeNode: T } = ji(e, t, o, r, i, d), { toggleSelectHierarchyItem: b } = p, { cellKey: N, cellPosition: B, rowKey: D, rowPosition: E } = Dn(e, n), { cellContentClass: k, cellContentPosition: O, cellContentClassWithEllipsis: V } = Hi(), { hierarchyCellContentStyle: P } = $i(e, o, i), { treeNodeIconsClass: A } = Pi(e, I, l); function oe(J, Z) { const Fe = J.raw[l.value]; return { "fv-tree-node-toggle": Fe && J.collapse, "fv-tree-node-toggle-minus": Fe && !J.collapse }; } function K(J, Z) { J.stopPropagation(), T(Z); } function pe(J, Z) { return M("div", { class: oe(J), onClick: (Fe) => K(Fe, J) }, null); } function H(J, Z) { return C.value && M("div", { id: "treeNodeIcons", class: A(J, Z) }, null); } function L(J) { g.value ? (J.checked ? x(J) : m(J), b(J)) : v(J); } function z(J, Z) { return y.value && M(er, { id: "checkbox_for_" + N(J, Z.index), indeterminate: J.indeterminate, disabled: J.disabled, checked: J.checked, "onUpdate:checked": (Fe) => J.checked = Fe, onChange: () => L(J) }, null); } function U(J, Z) { return M("span", { title: Z.data, style: "user-select:none" }, [t.slots.cellTemplate ? t.slots.cellTemplate({ cell: Z, row: J }) : Z.mode === et.editing ? Z.getEditor(Z) : Z.formatter ? Z.formatter(Z, J) : Z.data != null ? Z.data.toString() : Z.data]); } function Q(J, Z) { return M("div", { class: k(Z), style: O(Z) }, [M("div", { class: V(Z) }, [Z.showTips ? M(Zt, null, { default: () => U(J, Z), contentTemplate: () => U(J, Z) }) : U(J, Z)])]); } function Y(J, Z, Fe) { return M("div", { ref: Z.setRef, key: N(J, Z.index), class: "fv-grid-hierarchy-cell", style: B(Z, Fe) }, [M("div", { style: P(J) }, [pe(J), H(J, Z), z(J, Z), Q(J, Z)])]); } function $(J, Z, Fe) { return M("div", { ref: Z.setRef, key: N(J, Z.index), class: "fv-grid-cell", style: B(Z, Fe), onClick: (Oe) => w(Oe, Z, J, Z.column) }, [M("div", { class: k(Z), style: O(Z) }, [M("div", { class: V(Z) }, [Z.showTips ? M(Zt, null, { default: () => U(J, Z), contentTemplate: () => U(J, Z) }) : U(J, Z)])])]); } function G(J, Z) { return Z === "left" && n.value.leftColumns.length > 0 && n.value.leftColumns[0].field === J.field || Z === "primary" && n.value.primaryColumns.length > 0 && n.value.primaryColumns[0].field === J.field; } function ie(J, Z, Fe = "primary", Oe) { return M("div", { ref: J.setRef, key: D(J), class: _(J, Oe), style: E(J), onMouseover: (ke) => F(ke, J), onMouseout: (ke) => h(ke, J), onClick: (ke) => R(ke, J) }, [Object.values(J.data).filter((ke) => Z[ke.field] && ke.rowSpan === 1).map((ke) => G(ke, Fe) ? Y(J, ke, Z) : $(J, ke, Z))]); } return { renderDataRow: ie }; } function Li(e, t, n) { const { horizontalScrollThumbStyle: o, onMouseDownScrollThumb: r, shouldShowHorizontalScrollbar: a } = n; function i() { return a.value && M("div", { class: "fv-grid-horizontal-scroll" }, [M("div", { class: "fv-grid-horizontal-scroll-thumb", style: o.value, onMousedown: (u) => r(u, t, "horizontal") }, null)]); } return { renderHorizontalScrollbar: i }; } function Wi() { function e(o, r) { switch (o.command) { case "edit": case "remove": return r.status === it.initial; case "accept": case "cancel": return r.status === it.editing; default: return !o.hidden; } } function t(o, r, a) { switch (o.onClick(r, a.dataIndex, a), o.command) { case "edit": a.status, it.editing; break; case "accept": case "cancel": a.status, it.initial; break; } } function n(o, r) { return o.commands && o.commands.map((a) => e(a, r) && M(or, { class: "ml-2", type: a.type, size: a.size || "small", onClick: (i) => t(a, i, r), style: { "margin-bottom": "3px" } }, { default: () => [mt(" "), a.text, mt(" ")] })); } return { renderCommandColumn: n }; } function Rn(e) { const t = S(e.minHeight), n = S(e.minWidth), o = S(e.height), r = S(e.width), a = j(() => o.value <= 0 ? 0 : Math.max(o.value, t.value)), i = j(() => r.value <= 0 ? 0 : Math.max(r.value, n.value)); return xe([ () => e.height, () => e.width, () => e.minHeight, () => e.minWidth ], ([c, p, d, s]) => { t.value = Number(d), n.value = Number(s), o.value = Number(c), r.value = Number(p); }), { containerStyleObject: j(() => ({ height: a.value > 0 ? `${a.value}px` : e.fit ? "100%" : "", width: i.value > 0 ? `${i.value}px` : e.fit ? "100%" : "", flex: "1 1 0" })) }; } const Ai = ""; function $n(e) { const o = S({ defaultColumnWidth: 120, headerDepth: 1, leftColumns: [], leftColumnsMap: /* @__PURE__ */ new Map(), leftColumnsWidth: 0, leftHeaderColumns: [], primaryColumns: [], primaryColumnsMap: /* @__PURE__ */ new Map(), primaryColumnsWidth: 0, primaryHeaderColumns: [], rightColumns: [], rightColumnsMap: /* @__PURE__ */ new Map(), rightColumnsWidth: 0, rightHeaderColumns: [], summaryColumns: [] }); function r() { o.value = { defaultColumnWidth: 120, headerDepth: 1, leftColumns: [], leftColumnsMap: /* @__PURE__ */ new Map(), leftColumnsWidth: 0, leftHeaderColumns: [], primaryColumns: [], primaryColumnsMap: /* @__PURE__ */ new Map(), primaryColumnsWidth: 0, primaryHeaderColumns: [], rightColumns: [], rightColumnsMap: /* @__PURE__ */ new Map(), rightColumnsWidth: 0, rightHeaderColumns: [], summaryColumns: [] }; } const a = S(e.summary), i = j(() => { const x = a.value; return (x == null ? void 0 : x.groupFields) || []; }); function u() { o.value.rightColumns.forEach((v) => { v.showSetting = !1; }), o.value.primaryColumns.forEach((v) => { v.showSetting = !1; }); const x = o.value.rightColumns.filter((v) => v.visible), m = o.value.primaryColumns.filter((v) => v.visible); x.length > 0 ? x[x.length - 1].showSetting = !0 : m.length > 0 && (m[m.length - 1].showSetting = !0); } function c(x) { r(); const m = /* @__PURE__ */ new Map(); return i.value && i.value.reduce((v, I) => (v.set(I, !0), v), m), x.reduce((v, I) => (I.visible = I.visible !== !1, I.filter = I.filter || Ai, I.fixed === "left" ? (o.value.leftColumns.push(I), o.value.leftColumnsMap.set(I.field, I), o.value.leftColumnsWidth += I.actualWidth) : I.fixed === "right" ? (o.value.rightColumns.push(I), o.value.rightColumnsMap.set(I.field, I), o.value.rightColumnsWidth += I.actualWidth) : (o.value.primaryColumns.push(I), o.value.primaryColumnsMap.set(I.field, I), o.value.primaryColumnsWidth += I.actualWidth), m.has(I.field) && o.value.summaryColumns.push(I), v), o), u(), o; } c(e.columns); const p = j(() => o.value.leftColumns.length > 0), d = j(() => o.value.rightColumns.length > 0); function s(x, m) { return m.sortable && m.sort && m.sort !== "none" && x.push(m), x; } function f(x, m) { return x.sortOrder = x.sortOrder || 0, m.sortOrder = m.sortOrder || 0, x.sortOrder === m.sortOrder ? 0 : x.sortOrder < m.sortOrder ? -1 : 1; } function w(x, m) { return x.sortOrder = x.sortOrder || 0, m.sortOrder = m.sortOrder || 0, x.sortOrder === m.sortOrder ? 0 : x.sortOrder < m.sortOrder ? 1 : -1; } function _(x, m) { return m.filterable && x.push(m), x; } function R() { const x = []; return o.value.leftColumns.reduce(_, x), o.value.primaryColumns.reduce(_, x), o.value.rightColumns.reduce(_, x), x; } function F() { const x = []; o.value.leftColumns.reduce(s, x), o.value.primaryColumns.reduce(s, x), o.value.rightColumns.reduce(s, x); const m = Math.max(...x.map((v) => v.sortOrder || 0)); return x.sort(w).map((v) => { const I = v.sortOrder || m + 1; return v.sortOrder = I, v; }).sort(f).map((v, I) => { const l = I + 1; return v.sortOrder = l, v; }); } function h(x, m, v) { const I = x.map((l) => { const y = v.getSorterByColumn(l), C = l.sort === "asc", T = l.sort === "desc", b = C ? y.ascend : T ? y.decend : void 0; return { field: l.field, compare: b }; }); m.setSorters(I); } function g(x, m) { const v = F(); h(v, x, m); } return { applyColumnSorter: g, collectionFilterableColumns: R, applySortableColumns: h, collectionSortableColumns: F, columnContext: o, hasLeftFixedColumn: p, hasRightFixedColumn: d, updateColumnRenderContext: c, updateColumnSettingIcon: u }; } S([{ name: "七天", selectable: !0 }, { name: "一个月", selectable: !0 }, { name: "三个月", selectable: !0 }, { name: "半年", selectable: !0 }]); function zi(e) { const n = S(e.commandOption.enable || !1), o = S(e.commandOption.commands || []); function r(a) { if (n.value && !(a.value.findIndex((u) => u.dataType === "commands") > -1)) { const u = { field: "__commands__", title: "操作", width: 120, fixed: "right", dataType: "commands", commands: o.value, visible: !0 }; a.value.push(u); } } return { applyCommands: r }; } function Gi(e, t) { var p; const n = S((p = e.columnOption) == null ? void 0 : p.groups); function o(d, s, f, w, _) { const R = { actualWidth: 0, children: [], depth: 1, field: d.field, layer: 1, left: 0, parent: f, resizable: !0, title: d.title || "", status: Le.none, popoverRef: S(), showPopover: !1, column: null, sortType: "none" }, F = w || R; if (d.group) { let h = 1; d.group.reduce((g, x) => { if (typeof x == "string") { const m = s.get(x); m && (_.fieldToRootMap.set(x, F), g.actualWidth += m.actualWidth, g.children.push(m)); } else { const m = o(x, s, g, F, _); h = Math.max(h, m.depth), g.actualWidth += m.actualWidth, g.children.push(m); } return g; }, R), R.depth += h; } return t.value.headerDepth = Math.max(t.value.headerDepth, R.depth), R; } function r(d) { const s = { groupedCells: /* @__PURE__ */ new Map(), fieldToRootMap: /* @__PURE__ */ new Map() }; return n.value && n.value.reduce((f, w) => { const _ = o(w, d, null, null, s); return f.groupedCells.set(w.field, _), f; }, s), s; } function a(d) { if (!d || d.length === 0) return 0; const s = d[0]; return s.children && s.children.length > 0 && (s.left = a(s.children)), s.left; } function i(d, s) { const f = t.value.headerDepth; d.forEach((w) => { w.layer = s ? s.layer + 1 : 1; const _ = w.children && w.children.length === 0; w.depth = _ ? f - (w.layer - 1) : 1, w.left = _ ? w.left : a(w.children), w.children && i(w.children, w); }); } function u(d, s) { const f = /* @__PURE__ */ new Map(); return d.forEach((w) => { const _ = s.fieldToRootMap.get(w.field), R = _ != null; R && !f.has(_.field) && f.set(_.field, _), R || f.set(w.field, w); }), i(Array.from(f.values())), f; } function c(d) { let s = /* @__PURE__ */ new Map(), f = 0; if (d.reduce((w, _) => { let R = Le.none; R = _.filterable ? R | Le.filterable : R, R = _.sort && _.sort !== "none" ? R | Le.sorted | (_.sort === "asc" ? Le.ascending : Le.descending) : R; const F = _.field; return w.set(F, { actualWidth: _.actualWidth || 0, children: [], depth: 1, layer: 1, left: f, field: F, parent: null, resizable: _.resizable === void 0 ? !0 : _.resizable, title: _.title, status: R, popoverRef: S(), showPopover: !1, column: _, filterValue: null, sortType: _.sort || "none", showSetting: _.showSetting, draggable: _.draggable }), f += _.actualWidth || 0, w; }, s), n.value) { const w = r(s); s = u(s, w); } return s; } return { getGridHeaderCells: c }; } function qi(e, t) { var h; const { idField: n } = t, o = S(e.summary), r = S(e.group), a = S(((h = e.group) == null ? void 0 : h.groupFields) || []), i = j(() => { var g; return (g = e.group) == null ? void 0 : g.enable; }), u = j(() => { var g; return (g = e.group) == null ? void 0 : g.showGroupPanel; }), c = j(() => { const g = o.value; return (g == null ? void 0 : g.groupFields) || []; }), p = j(() => { const g = r.value; return g && g.showSummary; }), d = /* @__PURE__ */ new Map(); let s = []; function f(g, x, m, v, I) { const l = v[m]; l && (x.reduce((y, C, T) => { var B; const b = C[l]; let N = y.get(b); if (!N) { const D = c.value.reduce((E, k) => (E.set(k, 0), E), /* @__PURE__ */ new Map()); N = { field: l, title: ((B = I.get(l)) == null ? void 0 : B.title) || l, value: b, layer: m, details: [], groupSummaries: D }, y.set(b, N); } return c.value && c.value.forEach((D) => { if (N) { const E = N.groupSummaries.get(D) || 0; N.groupSummaries.set(D, E + C[D]); } }), N.details.push(C), y; }, g), m < v.length - 1 && g.forEach((y, C) => { y.nestGroup = /* @__PURE__ */ new Map(), f(y.nestGroup, y.details, m + 1, v, I), y.details = []; })); } function w(g, x) { return e.group && e.group.formatter ? e.group.formatter(g.value, { ...g, total: x }) : `${g.title}:${g.value} (${x})`; } function _(g) { const x = []; return g.forEach((m) => { const v = { __fv_data_grid_group_collapse__: !1, __fv_data_grid_group_field__: m.field, __fv_data_grid_group_layer__: m.layer, __fv_data_grid_group_row__: !0, __fv_data_grid_group_value__: m.value }; let I = 0; if (x.push(v), m.nestGroup) { const l = _(m.nestGroup); x.push(...l), I += l.length; } if (m.details && m.details.length && (x.push(...m.details), I += m.details.length), p.value) { const l = { __fv_data_grid_group_field__: m.field, __fv_data_grid_group_layer__: m.layer, __fv_data_grid_group_summary__: !0 }; l[n.value] = `summary_of_${m.field}_${m.value}`, l[m.field] = Array.from(m.groupSummaries.entries()).reduce( (y, [C, T]) => `${y} ${C} total:${T} `, "" ), x.push(l); } m.groupSummaries && m.groupSummaries.size && m.groupSummaries.forEach((l, y) => { v[y] = l; }), v[n.value] = `group_of_${m.field}_${m.value}`, v[m.field] = w(m, I); }), x.forEach((m, v) => { m.__fv_data_index__ = v; }), x; } function R(g, x, m) { return !g || g.length === 0 || !x.length ? x : (g.join(","), d.clear(), s = [], x = x.filter((v) => !v.__fv_data_grid_group_row__), f(d, x, 0, g, m), s = _(d), s); } function F(g) { return { "f-icon": !0, "f-icon-arrow-chevron-down": !0, "fv-grid-group-row-icon-collapse": g.collapse }; } return { collpaseGroupIconClass: F, generateGroupData: R, groupFields: a, shouldGroupingData: i, showGroupPanel: u }; } function Ui(e, t, n, o) { const r = S(0), a = S(!!e.hierarchy), { idField: i } = o, { collapseField: u, hasChildrenField: c, parentIdField: p } = n, d = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(); function w(H, L) { s.clear(), H.reduce((z, U) => { const Q = U[p.value] !== void 0 ? U[p.value] : ""; if (Q && L.has(Q)) { const $ = L.get(Q), G = isNaN(Number($.__fv_layer__)) ? 1 : Number($.__fv_layer__); U.__fv_layer__ = G + 1, U.__fv_parent_index__ = $.__fv_index__, $.__fv_hasChildren__ = !0; } else U.__fv_layer__ = 1; const Y = z.has(Q) ? z.get(Q) : []; return Y.push(U), z.set(Q, Y), z; }, s); } function _(H) { f.clear(), H.reduce((L, z) => { const U = z[i.value]; return L.set(U, z), L; }, f); } function R(H) { H.forEach((L) => { const z = L[i.value]; L.__fv_children_index__.map((Q) => H[Q]).forEach((Q) => { Q.__fv_parents__ = new Map([ ...L.__fv_parents__.entries(), [z, !0] ]); }); }); } function F(H) { H.forEach((L) => { const z = new Set(L.__fv_children_index__); L.__fv_children_index__ = [...z].sort((U, Q) => U - Q); }); } function h(H) { H.forEach((L) => { const z = L.__fv_parents__; Array.from(z.keys()).map((U) => f.get(U)).forEach((U) => { U.__fv_children_index__.push(L.__fv_index__); }); }), F(H); } function g(H) { H.forEach((L) => { L.__fv_child_with_lines__ = [], L.__fv_child_length__ = L.__fv_descendant_index__.length, L.__fv_descendant_index__.map((z) => H[z]).reduce((z, U) => (z.__fv_child_length__ += U.__fv_children_index__.length, z.__fv_child_with_lines__.push(...U.__fv_children_index__, U.__fv_index__), z), L); }); } function x(H, L) { return { id: H, index: L, parentId: "", parentIndex: -1, parents: /* @__PURE__ */ new Map(), children: /* @__PURE__ */ new Map(), descendant: /* @__PURE__ */ new Map(), collapsed: !1, visibleInHierarchy: !0 }; } function m(H, L, z) { Array.from(L.keys()).forEach((U) => { L.get(U).reduce((Y, $) => { const G = $[i.value], ie = H.get($[i.value]), J = H.get(U), Z = z.get(U); return J && Z && (J.children.set(G, ie), J.children.set(G, ie), ie.parentId = U, ie.parentIndex = J.index, ie.parents.set(U, J)), Y; }, H); }); } function v(H) { H.children.forEach((z) => { z.parents = new Map([ ...H.parents.entries(), [H.id, H] ]), v(z); }); } function I(H, L) { H.filter((z) => z[p.value] === void 0 || z[p.value] === "").forEach((z) => { const U = z[i.value], Q = L.get(U); v(Q); }); } function l(H) { Array.from(H.values()).forEach((L) => { Array.from(L.parents.values()).forEach((z) => { z.descendant.set(L.id, L); }); }); } function y(H) { d.clear(), H.forEach((L, z) => { const U = L[i.value]; d.set(U, x(U, z)); }), _(H), w(H, f), m(d, s, f), I(H, d), l(d); } function C(H) { const L = H[i.value], z = d.get(L); return z && z.children.size > 0; } function T(H) { return H[c.value] && !C(H); } function b(H) { const L = H[i.value], z = d.get(L); return z && z.visibleInHierarchy; } function N() { r.value = Date.now(); } function B(H, L) { L.forEach((z) => { const U = d.get(z[i.value]), Q = d.get(H), Y = f.get(H); Q && Y && (U.visibleInHierarchy = !Y[u.value] && Q.visibleInHierarchy); }), N(); } function D(H) { if (s.has(H)) { const z = s.get(H); B(H, z), z.map((U) => U[i.value]).forEach((U) => D(U)); } } function E(H) { const L = H[i.value]; D(L); } function k(H, L, z = 0) { H.forEach((U) => { const Q = T(U), Y = U.__fv_layer__ <= z, $ = L === "ToCollapse" ? U.__fv_layer__ <= z : !(U.__fv_layer__ <= z), G = Y ? $ : U[u.value]; U[u.value] = Q || G; }); for (const [U, Q] of s.entries()) B(U, Q); return H; } function O(H, L) { k(H, "ToCollapse", L); } function V(H, L) { k(H, "ToExpand", L); } function P(H) { H.forEach((L, z) => { var $; const U = L[i.value], Q = s.has(U) ? ($ = s.get(U)) == null ? void 0 : $.map((G) => G.__fv_index__) : [], Y = x(U, z); L.__fv_graph_node__ = Y, L.__fv_children_index__ = Q, L.__fv_descendant_index__ = [...Q], L.__fv_parents__ = /* @__PURE__ */ new Map(), T(L) && (L[u.value] = !0); }); } function A(H) { var U, Q; y(t.value), P(H), R(H), h(H), e.showLines && g(H); const z = ((U = e.hierarchy) == null ? void 0 : U.collapseTo) !== void 0 ? Number((Q = e.hierarchy) == null ? void 0 : Q.collapseTo) : 0; return k(H, "ToCollapse", z), H; } function oe(H, L, z) { const Q = z.value[H][i.value], Y = d.get(Q); if (Y) { const $ = d.get(Y.parentId); let G = z.value.length - 1; if ($) { const ie = Array.from($.children.keys()).indexOf(Y.id); if (ie === $.children.size - 1) { const Z = Array.from($.descendant.values())[$.descendant.size - 1]; G = z.value.findIndex((Oe) => Oe[i.value] === Z.id) + 1; } else { const Z = Array.from($.children.values())[ie + 1]; G = z.value.findIndex((Oe) => Oe[i.value] === Z.id); } L[c.value] = !1, L[p.value] = $.id, z.value.splice(G, 0, L); } } } function K(H, L, z) { const U = z.value[H], Q = U[i.value]; if (d.get(Q)) { const G = z.value.findIndex((ie) => ie[i.value] === Q) + 1; U[c.value] = !0, U[u.value] = !1, L[c.value] = !1, L[p.value] = Q, z.value.splice(G, 0, L); } } function pe(H, L) { const z = H[i.value], U = d.get(z), Q = Array.from(U.descendant.keys()); Q.unshift(z); const Y = d.get(U.parentId); if (Y && (Y.children.delete(z), Y.children.size === 0)) { const G = L.find((ie) => ie[i.value] === U.parentId); G[c.value] = !1, G[u.value] = !1; } return L.filter((G) => Q.indexOf(G.id) === -1); } return { checkVisibleInHierarchy: r, collapseTo: O, expandTo: V, generateHierarchyData: A, hasRealChildren: C, insertSibling: oe, insertChild: K, isVisibleInTree: b, shouldStratifyData: a, toggleChildrenVisibiltyByCollapseStatus: E, trimmedOriginalData: pe }; } const Yi = { showCloseButton: { type: Boolean, default: !0 }, position: { type: String, default: "top-center" }, timeout: { type: Number, default: 3e3 }, theme: { type: String, default: "bootstrap" }, left: { type: Number }, right: { type: Number }, top: { type: Number }, bottom: { type: Number }, id: { type: String }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, Xi = { showCloseButton: { type: Boolean, default: !0 }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, Wt = /* @__PURE__ */ ze({ name: "Toast", props: Xi, emits: ["close", "click"], setup: (e, t) => { const n = S(e.animate), o = "fadeOut", r = j(() => e.options), a = S(!1), i = j(() => { const h = { animated: a.value, toast: !0 }; return h[e.animate] = !1, h[o] = a.value, h[r.value.type] = !0, r.value.theme && (h[r.value.theme] = !0), h; }), u = j(() => { const x = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, m = { "f-icon": !0 }; return m[x] = !0, m; }), c = j(() => r.value.title || r.value.message), p = j(() => r.value.title && r.value.message), d = j(() => !r.value.title && r.value.message), s = j(() => e.showCloseButton), f = j(() => !!r.value.buttons || !!t.slots.default); function w(h) { h.stopPropagation(), h.preventDefault(), a.value = !1, setTimeout(() => { t.emit("close", r.value); }, 200); } function _(h, g) { } function R(h) { return `f-preten-link ${h.customClass ? h.customClass : ""}`; } xe(n, () => { n.value; }); const F = () => { var h; return M(_t, null, [M("div", { class: "after-toast-msg text-right" }, [!t.slots.default && ((h = r.value.buttons) == null ? void 0 : h.map((g) => M("span", { class: R(g), onClick: (x) => void 0 }, [g.text]))), t.slots.default && t.slots.default()])]); }; return () => M("div", { class: i.value, style: "min-height:44px" }, [s.value && M("button", { title: "关闭", class: "toast-close f-btn-icon f-bare", onClick: w }, [M("span", { class: "f-icon modal_close" }, null)]), c.value && M("section", { class: "modal-tips" }, [M("div", { class: "float-left modal-tips-iconwrap" }, [M("span", { class: u.value }, null)]), M("div", { class: "modal-tips-content" }, [p.value && M(_t, null, [M("h5", { class: "toast-title modal-tips-title", innerHTML: r.value.title }, null), M("p", { class: "toast-msg", innerHTML: r.value.message }, null), f.value && F()]), d.value && (r.value.buttons ? M("div", { class: "toast-title-btns-wrapper d-flex" }, [M("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }, null), M("div", { class: "after-toast-title text-right ml-auto" }, [F()])]) : M("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }, null))])])]); } }), Tt = /* @__PURE__ */ ze({ name: "Notify", props: Yi, emits: ["close", "empty"], setup(e, t) { const n = j(() => ({ "farris-notify": !0 })), o = { left: 12, right: 12, top: 20, bottom: 12 }, r = S(), a = S(e.options), i = S(e.showCloseButton), u = j(() => e.position || "bottom-right"), c = j(() => e.timeout != null ? e.timeout : 3e3), p = j(() => { const f = e.bottom ? e.bottom : o.bottom, w = e.top ? e.top : o.top, _ = { transition: "all 0.2s ease", left: u.value.indexOf("left") > -1 ? `${e.left ? e.left : o.left}px` : "", right: u.value.indexOf("right") > -1 ? `${e.right ? e.right : o.right}px` : "", top: u.value.indexOf("top") > -1 ? `${w}px` : "", bottom: u.value.indexOf("bottom") > -1 ? `${f}px` : "" }; return u.value.indexOf("center") > -1 && (_.left = "50%", _.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (_.top = "50%", _.transform = "translate(-50%, -50%)")), _; }); function d(f) { t.emit("close"); } c.value && setTimeout(() => { d(); }, c.value), t.expose({ closeToast: d, container: r, notifyPosition: u }); function s(f, w) { d(); } return () => M("div", { class: n.value, style: p.value, ref: r }, [M(Wt, { options: a.value,