UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,515 lines 397 kB
var Er = Object.defineProperty; var Mr = (n, t, e) => t in n ? Er(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e; var W = (n, t, e) => Mr(n, typeof t != "symbol" ? t + "" : t, e); import { ref as k, watch as Fe, createVNode as D, createTextVNode as Nt, computed as z, defineComponent as ot, Fragment as Ut, reactive as yt, createApp as An, onUnmounted as sn, onMounted as Bt, Transition as qn, mergeProps as Rt, onBeforeUnmount as zn, withDirectives as Fr, resolveDirective as Or, nextTick as Xt, inject as Pt, provide as Ir, triggerRef as Dr, isVNode as Pr, onBeforeMount as Vr, Teleport as Nr, shallowRef as Rr, render as un, h as Br, cloneVNode as Hr } from "vue"; import { isPlainObject as Fn, cloneDeep as Tt, isUndefined as ft, throttle as Wr } from "lodash-es"; import { useIdentify as Gn, useGroupData as $r, useFilter as Yn, useHierarchy as Un, useLoading as jr, useDataView as Xn, useSelection as Qn, useSelectHierarchyItem as Lr, useDataViewContainerStyle as Kn, useCommandColumn as Ar, useColumn as Jn, useSort as qr, useGroupColumn as Zn, useRow as eo, useEdit as to, useVisualDataBound as no, useVisualDataCell as oo, useVisualDataRow as ro, useVisualData as ao, useCellPosition as io, useSidebar as so, useVirtualScroll as lo, useFitColumn as uo, useFilterHistory as zr, useColumnFilter as Gr, useDragColumn as Yr, getColumnHeader as Ur, getSidebar as co, getDisableMask as Xr, getHorizontalScrollbar as fo, getVerticalScrollbar as mo, getEmpty as ho } from "../data-view/index.esm.js"; import "../modal/index.esm.js"; import Qr from "../transfer/index.esm.js"; import Kr from "../tabs/index.esm.js"; import Jr from "../order/index.esm.js"; import "../condition/index.esm.js"; import { FCheckbox as Zr } from "../checkbox/index.esm.js"; import { useGuid as ea, resolveField as at, FormSchemaEntityFieldTypeName as On, getCustomClass as cn, withInstall as po, useArrayProcessor as vo, useCommonUtils as go, useDateFormat as ta, useNumberFormat as na, setFieldValue as mn } from "../common/index.esm.js"; import oa from "../filter-bar/index.esm.js"; import In from "../tooltip/index.esm.js"; import ra from "../pagination/index.esm.js"; import aa from "../button/index.esm.js"; import ia from "../search-box/index.esm.js"; import sa from "../tags/index.esm.js"; import la, { FDynamicFormGroup as ua, FDynamicFormInput as ca } from "../dynamic-form/index.esm.js"; import { createPropsResolver as da } from "../dynamic-resolver/index.esm.js"; import "../designer-canvas/index.esm.js"; import "../property-panel/index.esm.js"; import fa from "../accordion/index.esm.js"; import ma from "../avatar/index.esm.js"; import ha from "../../designer/button-edit/index.esm.js"; import pa from "../button-group/index.esm.js"; import va from "../calendar/index.esm.js"; import ga from "../capsule/index.esm.js"; import Dn from "../../designer/checkbox/index.esm.js"; import Pn from "../../designer/checkbox-group/index.esm.js"; import hn from "../combo-list/index.esm.js"; import ya from "../combo-tree/index.esm.js"; import ba from "../component/index.esm.js"; import wa from "../color-picker/index.esm.js"; import Ca from "../content-container/index.esm.js"; import _a from "../date-picker/index.esm.js"; import xa from "../../designer/data-grid/index.esm.js"; import Sa from "../dropdown/index.esm.js"; import Ta from "../events-editor/index.esm.js"; import ka from "../field-selector/index.esm.js"; import Ea from "../binding-selector/index.esm.js"; import Ma from "../image-cropper/index.esm.js"; import Fa from "../../designer/input-group/index.esm.js"; import Oa from "../layout/index.esm.js"; import Ia from "../list-nav/index.esm.js"; import Da from "../list-view/index.esm.js"; import Pa from "../lookup/index.esm.js"; import Va from "../mapping-editor/index.esm.js"; import Na from "../nav/index.esm.js"; import Ra from "../number-range/index.esm.js"; import Ba from "../number-spinner/index.esm.js"; import Ha from "../page-header/index.esm.js"; import Wa from "../page-footer/index.esm.js"; import $a from "../progress/index.esm.js"; import ja from "../query-solution/index.esm.js"; import La from "../../designer/radio-group/index.esm.js"; import Aa from "../rate/index.esm.js"; import qa from "../response-toolbar/index.esm.js"; import za from "../response-layout/index.esm.js"; import Ga from "../response-layout-editor/index.esm.js"; import Ya from "../section/index.esm.js"; import Ua from "../smoke-detector/index.esm.js"; import Xa from "../splitter/index.esm.js"; import Qa from "../step/index.esm.js"; import Ka from "../switch/index.esm.js"; import Ja from "../text/index.esm.js"; import Za from "../time-picker/index.esm.js"; import ei from "../tree-view/index.esm.js"; import ti from "../uploader/index.esm.js"; import ni from "../verify-detail/index.esm.js"; import oi from "../video/index.esm.js"; import ri from "../textarea/index.esm.js"; import ai from "../schema-selector/index.esm.js"; import ii from "../tree-grid/index.esm.js"; import si from "../event-parameter/index.esm.js"; import li from "../filter-condition-editor/index.esm.js"; import ui from "../fieldset/index.esm.js"; import ci from "../sort-condition-editor/index.esm.js"; import di from "../menu-lookup/index.esm.js"; import fi from "../drawer/index.esm.js"; import mi from "../json-editor/index.esm.js"; import hi from "../property-editor/index.esm.js"; import pi from "../expression-editor/index.esm.js"; import vi from "../code-editor/index.esm.js"; import gi from "../html-template/index.esm.js"; import "../external-container/index.esm.js"; import { useResizeObserver as bn } from "@vueuse/core"; import "../notify/index.esm.js"; const yo = {}, bo = {}; function wn(n) { const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), a = Object.keys(t).reduce((i, s) => ((!r || !o.find((l) => l === s)) && (i[s] = t[s].type === "object" && t[s].properties ? wn(t[s]) : Tt(t[s].default)), i), {}); if (e && (!r || !o.find((i) => i === "id"))) { const i = e.toLowerCase().replace(/-/g, "_"); a.id = `${i}_${Math.random().toString().slice(2, 6)}`; } return a; } function yi(n) { const { properties: t, title: e, required: o } = n; if (o && Array.isArray(o)) { const r = o.reduce((a, i) => (a[i] = t[i].type === "object" && t[i].properties ? wn(t[i]) : Tt(t[i].default), a), {}); if (e && o.find((a) => a === "id")) { const a = e.toLowerCase().replace(/-/g, "_"); r.id = `${a}_${Math.random().toString().slice(2, 6)}`; } return r; } return { type: e }; } function wo(n, t = {}, e) { const o = yo[n]; if (o) { let r = yi(o); const a = bo[n]; return r = a ? a({ getSchemaByType: wo }, r, t, e) : r, r; } return null; } function bi(n, t) { const e = wn(t); return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(n, r) && (o[r] && Fn(o[r]) && Fn(n[r] || !n[r]) ? Object.assign(o[r], n[r] || {}) : o[r] = n[r]), o), e), e; } function Co(n, t) { return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => { if (t.has(r)) { const a = t.get(r); if (typeof a == "string") o[a] = n[r]; else { const i = a(r, n[r], n); Object.assign(o, i); } } else o[r] = n[r]; return o; }, {}); } function wi(n, t, e = /* @__PURE__ */ new Map()) { const o = bi(n, t); return Co(o, e); } function Ci(n = {}) { function t(u, d, c, m) { if (typeof c == "number") return m[u].length === c; if (typeof c == "object") { const p = Object.keys(c)[0], v = c[p]; if (p === "not") return Number(m[u].length) !== Number(v); if (p === "moreThan") return Number(m[u].length) >= Number(v); if (p === "lessThan") return Number(m[u].length) <= Number(v); } return !1; } function e(u, d, c, m) { return m[u] && m[u].propertyValue && String(m[u].propertyValue.value) === String(c); } const o = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", e] ]); Object.keys(n).reduce((u, d) => (u.set(d, n[d]), u), o); function r(u, d) { const c = u; return typeof d == "number" ? [{ target: c, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: c, operator: "getProperty", param: u, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => { if (m === "length") return { target: c, operator: "length", param: null, value: d[m] }; const p = m, v = d[m]; return { target: c, operator: "getProperty", param: p, value: v }; }) : []; } function a(u) { return Object.keys(u).reduce((c, m) => { const p = r(m, u[m]); return c.push(...p), c; }, []); } function i(u, d) { if (o.has(u.operator)) { const c = o.get(u.operator); return c && c(u.target, u.param, u.value, d) || !1; } return !1; } function s(u, d) { return a(u).reduce((p, v) => p && i(v, d), !0); } function l(u, d) { const c = Object.keys(u), m = c.includes("allOf"), p = c.includes("anyOf"), v = m || p, y = (v ? u[v ? m ? "allOf" : "anyOf" : "allOf"] : [u]).map((f) => s(f, d)); return m ? !y.includes(!1) : y.includes(!0); } return { parseValueSchema: l }; } const fe = { 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: "标签页工具栏按钮" }, "html-template": { type: "html-template", 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: "抽屉" }, "external-container": { type: "external-container", name: "外部容器", icon: "content-container" }, "list-nav": { type: "list-nav", name: "列表导航" }, "filter-bar": { type: "filter-bar", name: "筛选条" } }, _i = {}, xi = {}; Ci(); function Ht(n, t, e = /* @__PURE__ */ new Map(), o = (i, s, l, u) => s, r = {}, a = (i) => i) { return yo[t.title] = t, bo[t.title] = o, _i[t.title] = r, xi[t.title] = a, (i = {}, s = !0) => { if (!s) return Co(i, e); const l = wi(i, t, e), u = Object.keys(n).reduce((d, c) => (d[c] = n[c].default, d), {}); return Object.assign(u, l); }; } function ln(n, t) { return { customClass: t.class, customStyle: t.style }; } function Si() { function n(t, e) { const { dataSource: o } = t || {}; return o === void 0 ? {} : {}; } return { resolve: n }; } function Ti() { function n(t, e) { return t.selectItemById(e); } return { selectItemById: n }; } function ki() { function n(t, e) { const { columns: o } = e; return t.updateColumns(o); } return { updateColumns: n }; } const Ei = /* @__PURE__ */ new Map([ ["appearance", ln] ]); function Mi(n, t, e) { return t; } const Fi = "tree-view", Oi = "A Farris Component", Ii = "object", Di = { basic: { description: "Basic Infomation", title: "基本信息", properties: { id: { description: "组件标识", title: "标识", type: "string", readonly: !0 }, type: { description: "组件类型", title: "控件类型", type: "select", editor: { type: "waiting for modification", enum: [] } } } } }, Pi = { title: Fi, description: Oi, type: Ii, categories: Di }, Vi = "https://json-schema.org/draft/2020-12/schema", Ni = "https://farris-design.gitee.io/tree-view.schema.json", Ri = "tree-view", Bi = "A Farris Component", Hi = "object", Wi = { 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 }, idField: { description: "", type: "string", default: "id" } }, $i = [ "id", "type" ], ji = { $schema: Vi, $id: Ni, title: Ri, description: Bi, type: Hi, properties: Wi, required: $i }, gm = { /** 自动列宽。设为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 } }, Cn = { /** 列集合 */ 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: !1, 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 }, /** 自动高度 **/ autoHeight: { type: Boolean, default: !1 } }, _o = Ht(Cn, ji, Ei, Mi, Pi); var rt = /* @__PURE__ */ ((n) => (n[n.readonly = 0] = "readonly", n[n.editable = 1] = "editable", n[n.editing = 2] = "editing", n))(rt || {}), vt = /* @__PURE__ */ ((n) => (n[n.initial = 0] = "initial", n[n.editing = 1] = "editing", n))(vt || {}), zt = /* @__PURE__ */ ((n) => (n[n.data = 0] = "data", n[n.group = 1] = "group", n[n.summary = 2] = "summary", n))(zt || {}), nt = /* @__PURE__ */ ((n) => (n[n.none = 0] = "none", n[n.filterable = 1] = "filterable", n[n.sortable = 2] = "sortable", n[n.filtered = 4] = "filtered", n[n.sorted = 8] = "sorted", n[n.ascending = 16] = "ascending", n[n.descending = 32] = "descending", n))(nt || {}); function xo(n, t) { var p; const e = String(Date.now()), o = ((p = n.rowOption) == null ? void 0 : p.height) || 28, r = k(t.value.primaryColumnsWidth); function a(v) { const O = {}; return v.reduce( (T, y, S) => { const f = S < v.length - 1 ? v[S + 1] : null; return S === 0 && (T[y.field] = { left: 0 }), y.actualWidth !== void 0 && (T[y.field].width = y.actualWidth), f && (T[f.field] = { left: T[y.field].left + (y.actualWidth || 0) }), T; }, O ), O; } function i(v, O, T) { const y = o * (T + 1), f = O[v.field].left - y + (O[v.field].width || 0), w = v.parent.height ? `${v.parent.height}px` : ""; return { left: `${y}px`, width: `${f}px`, height: `${w}` }; } function s(v, O, T) { return { right: "0px", height: `${v.parent.height ? `${v.parent.height}px` : ""}` }; } function l(v, O) { const T = v.parent.height ? `${v.parent.height}px` : ""; return { left: `${O[v.field].left}px`, height: `${T}`, width: isNaN(Number(O[v.field].width)) ? "100%" : `${O[v.field].width}px` }; } function u(v, O, T) { const S = (O.spanned || []).reduce((w, x) => w + (x.parent.height || 0), 0) + (v.height || 0); return { top: `${v.top}px`, left: `${T[O.field].left}px`, width: `${T[O.field].width}px`, height: `${S}px`, padding: `calc(${S / 2}px - 1rem) 0` // height: `calc(${rowHeight}px * ${cell.rowSpan})`, // padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0` }; } function d(v, O) { return `${e}_${v.type}_r_${v.index}_c_${O}_${v.refreshKey || ""}`; } function c(v) { return `${e}_${v.type}_r_${v.index}_${v.refreshKey || ""}`; } function m(v) { const O = v.height ? `${v.height}px` : ""; return { top: `${v.top}px`, width: isNaN(r.value) ? "100%" : `${r.value}px`, height: `${O}` }; } return Fe(t, () => { r.value = t.value.primaryColumnsWidth; }), { calculateCellPositionInRow: a, cellKey: d, cellPosition: l, groupCellPosition: i, rowKey: c, rowPosition: m, rowSpanCellPosition: u, summaryCellPosition: s }; } function Li(n, t, e) { const { hasChildrenField: o } = e, r = k("#9399a0"), a = k(28); function i() { return [].concat( ...t.value.filter((m) => m.raw.__fv_descendant_index__.length !== 0).map((m) => [...m.raw.__fv_descendant_index__.slice(-1)]).flat() ).sort((m, p) => Number(m) - Number(p)); } function s(d) { const c = new Array(t.value.length).fill(0); if (n.showLines) { const m = i(); t.value.forEach((p, v) => { const O = m.includes(v), T = p.raw[o.value]; c[v] = `repeating-linear-gradient(90deg, ${r.value} 0 1px, transparent 0px 2px) ${T ? "-10px" : "0px"} ${a.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${r.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${O ? "50%" : "100%"} no-repeat`; }), c[0] = ""; } return c[d]; } function l(d, c, m) { return m[d].parents.set(d, !0).forEach((v) => { m[v].childsLength = m[v].childWithLines.filter((O) => c[O].visible).length; }), c; } function u(d) { const p = d.raw.__fv_parent_index__ === void 0 || d.raw.__fv_parent_index__ === -1 ? 0 : 8, v = 0, O = d.raw[o.value], T = `${d.layer * 10 + d.layer * p + v}px`, y = d.visible || ft(d.visible) ? { paddingLeft: `calc(${T} + 0.75rem)`, // paddingLeft, background: s(d.index), display: "flex", width: "100%", position: "relative" } : { display: "none" }; return O || (y.paddingLeft = `calc(${T} + 2rem)`), y; } return { hierarchyCellContentStyle: u, handleCollapsedPaddingBottom: l }; } function Ai(n, t, e) { const o = k(n.iconField); function r(a, i) { if (o.value) return a.raw[n.iconField]; let s = ""; return a.raw[e.value] !== !0 ? s = t.value.leafnodes : s = a.collapse ? t.value.fold : t.value.unfold, s; } return { treeNodeIconsClass: r }; } function qi(n, t, e, o, r, a, i, s) { const { dataView: l, hasRealChildren: u, reOrderVisibleIndex: d } = o, { collapseField: c, hasChildrenField: m } = r, { reCalculateVisualDataRows: p, updateVirticalScroll: v } = a; function O(T) { if (T.raw[m.value]) { const S = l.value[T.raw.__fv_index__]; S[c.value] = !S[c.value], o.toggleChildrenVisibiltyByCollapseStatus(S), S[m.value] = u(S), d(), p(), v(); } t.emit("expandNode", { row: T }); } return { toggleTreeNode: O }; } function zi(n) { function t(r) { return {}; } function e(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: e, cellContentClassWithEllipsis: o }; } function So(n, t, e, o, r, a, i, s, l, u, d, c, m) { const { onClickCell: p } = a, { gridCellClass: v, gridHierarchyCellClass: O, gridRowClass: T, onClickRow: y, onMouseoverRow: S, onMouseoutRow: f } = s, { enableMultiSelect: w, select: x, unSelect: b, selectItem: h } = l; k(n.cellHeight); const C = k(n.treeNodeIconsData || {}), { hasChildrenField: _, shouldShowCheckBox: E, shouldShowIcon: g } = i, { toggleTreeNode: V } = qi(n, t, o, r, i, d), { toggleSelectHierarchyItem: N } = u, { cellKey: M, cellPosition: I, rowKey: q, rowPosition: $ } = xo(n, e), { cellContentClass: B, cellContentPosition: P, cellContentClassWithEllipsis: j } = zi(), { hierarchyCellContentStyle: F } = Li(n, o, i), { treeNodeIconsClass: R } = Ai(n, C, _); function U(G, ne) { const ye = G.raw[_.value]; return { "fv-tree-node-toggle": ye && G.collapse, "fv-tree-node-toggle-minus": ye && !G.collapse }; } function A(G, ne) { G.stopPropagation(), V(ne); } function H(G) { G.stopPropagation(); } function Y(G, ne) { return D("div", { class: U(G), onClick: (ye) => A(ye, G), onDblclick: H }, null); } function K(G, ne) { return g.value && D("div", { id: "treeNodeIcons", class: R(G, ne) }, null); } function J(G) { w.value ? (G.checked ? x(G) : b(G), N(G)) : h(G); } function Z(G, ne) { return E.value && D(Zr, { id: "checkbox_for_" + M(G, ne.index), indeterminate: G.indeterminate, disabled: G.disabled, checked: G.checked, "onUpdate:checked": (ye) => G.checked = ye, onChange: () => J(G) }, null); } function de(G, ne) { return D("span", { title: ne.data, style: "user-select:none" }, [t.slots.cellTemplate ? t.slots.cellTemplate({ cell: ne, row: G }) : ne.mode === rt.editing ? ne.getEditor(ne) : ne.formatter ? ne.formatter(ne, G) : ne.data != null ? ne.data.toString() : ne.data]); } function ve(G, ne) { return D("div", { class: j(ne) }, [ne.showTips ? D(In, null, { default: () => de(G, ne), contentTemplate: () => de(G, ne) }) : de(G, ne)]); } function Se(G, ne, ye) { const Ee = F(G); return D("div", { ref: ne.setRef, key: M(G, ne.index), class: "fv-grid-hierarchy-cell", style: I(ne, ye) }, [D("div", { class: B(ne), style: Ee }, [Y(G), K(G, ne), Z(G, ne), ve(G, ne)])]); } function De(G, ne, ye) { return D("div", { ref: ne.setRef, key: M(G, ne.index), class: v(ne), style: I(ne, ye), onClick: (Ee) => p(Ee, ne, G, ne.column) }, [D("div", { class: B(ne) }, [D("div", { class: j(ne) }, [ne.showTips ? D(In, null, { default: () => de(G, ne), contentTemplate: () => de(G, ne) }) : de(G, ne)])])]); } function Re(G, ne) { return ne === "left" && e.value.leftColumns.length > 0 && e.value.leftColumns[0].field === G.field || ne === "primary" && e.value.primaryColumns.length > 0 && e.value.primaryColumns[0].field === G.field; } function X(G, ne) { t.emit("dblclickNode", { $event: G, node: ne.raw }); } function le(G, ne, ye = "primary", Ee) { return D("div", { ref: G.setRef, key: q(G), class: T(G, Ee), style: $(G), onMouseover: (Pe) => S(Pe, G), onMouseout: (Pe) => f(Pe, G), onClick: (Pe) => y(Pe, G), onDblclick: (Pe) => X(Pe, G) }, [Object.values(G.data).filter((Pe) => ne[Pe.field] && Pe.rowSpan === 1).map((Pe) => Re(Pe, ye) ? Se(G, Pe, ne) : De(G, Pe, ne))]); } return { renderDataRow: le }; } function Gi(n, t, e) { const { horizontalScrollThumbStyle: o, onMouseDownScrollThumb: r, shouldShowHorizontalScrollbar: a } = e; function i() { return a.value && D("div", { class: "fv-grid-horizontal-scroll" }, [D("div", { class: "fv-grid-horizontal-scroll-thumb", style: o.value, onMousedown: (s) => r(s, t, "horizontal") }, null)]); } return { renderHorizontalScrollbar: i }; } function Yi() { function n(o, r) { switch (o.command) { case "edit": case "remove": return r.status === vt.initial; case "accept": case "cancel": return r.status === vt.editing; default: return !o.hidden; } } function t(o, r, a) { switch (o.onClick(r, a.dataIndex, a), o.command) { case "edit": a.status, vt.editing; break; case "accept": case "cancel": a.status, vt.initial; break; } } function e(o, r) { return o.commands && o.commands.map((a) => n(a, r) && D(aa, { class: "ml-2", type: a.type, size: a.size || "small", onClick: (i) => t(a, i, r), style: { "margin-bottom": "3px" } }, { default: () => [Nt(" "), a.text, Nt(" ")] })); } return { renderCommandColumn: e }; } function To(n) { const t = k(n.minHeight), e = k(n.minWidth), o = k(n.height), r = k(n.width), a = z(() => o.value <= 0 ? 0 : Math.max(o.value, t.value)), i = z(() => r.value <= 0 ? 0 : Math.max(r.value, e.value)); return Fe([ () => n.height, () => n.width, () => n.minHeight, () => n.minWidth ], ([l, u, d, c]) => { t.value = Number(d), e.value = Number(c), o.value = Number(l), r.value = Number(u); }), { containerStyleObject: z(() => ({ height: a.value > 0 ? `${a.value}px` : n.fit ? "100%" : "", width: i.value > 0 ? `${i.value}px` : n.fit ? "100%" : "", flex: "1 1 0" })) }; } const Ui = ""; function Xi(n) { const o = k({ 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 = k(n.summary), i = z(() => { const f = a.value; return (f == null ? void 0 : f.groupFields) || []; }); function s() { o.value.rightColumns.forEach((x) => { x.showSetting = !1; }), o.value.primaryColumns.forEach((x) => { x.showSetting = !1; }); const f = o.value.rightColumns.filter((x) => x.visible), w = o.value.primaryColumns.filter((x) => x.visible); f.length > 0 ? f[f.length - 1].showSetting = !0 : w.length > 0 && (w[w.length - 1].showSetting = !0); } function l(f) { r(); const w = /* @__PURE__ */ new Map(); return i.value && i.value.reduce((x, b) => (x.set(b, !0), x), w), f.reduce((x, b) => (b.visible = b.visible !== !1, b.filter = b.filter || Ui, b.fixed === "left" ? (o.value.leftColumns.push(b), o.value.leftColumnsMap.set(b.field, b), o.value.leftColumnsWidth += b.actualWidth) : b.fixed === "right" ? (o.value.rightColumns.push(b), o.value.rightColumnsMap.set(b.field, b), o.value.rightColumnsWidth += b.actualWidth) : (o.value.primaryColumns.push(b), o.value.primaryColumnsMap.set(b.field, b), o.value.primaryColumnsWidth += b.actualWidth), w.has(b.field) && o.value.summaryColumns.push(b), x), o), s(), o; } l(n.columns); const u = z(() => o.value.leftColumns.length > 0), d = z(() => o.value.rightColumns.length > 0); function c(f, w) { return w.sortable && w.sort && w.sort !== "none" && f.push(w), f; } function m(f, w) { return f.sortOrder = f.sortOrder || 0, w.sortOrder = w.sortOrder || 0, f.sortOrder === w.sortOrder ? 0 : f.sortOrder < w.sortOrder ? -1 : 1; } function p(f, w) { return f.sortOrder = f.sortOrder || 0, w.sortOrder = w.sortOrder || 0, f.sortOrder === w.sortOrder ? 0 : f.sortOrder < w.sortOrder ? 1 : -1; } function v(f, w) { return w.filterable && f.push(w), f; } function O() { const f = []; return o.value.leftColumns.reduce(v, f), o.value.primaryColumns.reduce(v, f), o.value.rightColumns.reduce(v, f), f; } function T() { const f = []; o.value.leftColumns.reduce(c, f), o.value.primaryColumns.reduce(c, f), o.value.rightColumns.reduce(c, f); const w = Math.max(...f.map((x) => x.sortOrder || 0)); return f.sort(p).map((x) => { const b = x.sortOrder || w + 1; return x.sortOrder = b, x; }).sort(m).map((x, b) => { const h = b + 1; return x.sortOrder = h, x; }); } function y(f, w, x) { const b = f.map((h) => { const C = x.getSorterByColumn(h), _ = h.sort === "asc", E = h.sort === "desc", g = _ ? C.ascend : E ? C.decend : void 0; return { field: h.field, compare: g }; }); w.setSorters(b); } function S(f, w) { const x = T(); y(x, f, w); } return { applyColumnSorter: S, collectionFilterableColumns: O, applySortableColumns: y, collectionSortableColumns: T, columnContext: o, hasLeftFixedColumn: u, hasRightFixedColumn: d, updateColumnRenderContext: l, updateColumnSettingIcon: s }; } k([{ name: "七天", selectable: !0 }, { name: "一个月", selectable: !0 }, { name: "三个月", selectable: !0 }, { name: "半年", selectable: !0 }]); function Qi(n) { const e = k(n.commandOption.enable || !1), o = k(n.commandOption.commands || []); function r(a) { if (e.value && !(a.value.findIndex((s) => s.dataType === "commands") > -1)) { const s = { field: "__commands__", title: "操作", width: 120, fixed: "right", dataType: "commands", commands: o.value, visible: !0 }; a.value.push(s); } } return { applyCommands: r }; } function Ki(n, t) { var u; const e = k((u = n.columnOption) == null ? void 0 : u.groups); function o(d, c, m, p, v) { const O = { actualWidth: 0, children: [], depth: 1, field: d.field, layer: 1, left: 0, parent: m, resizable: !0, title: d.title || "", status: nt.none, popoverRef: k(), showPopover: !1, column: null, sortType: "none" }, T = p || O; if (d.group) { let y = 1; d.group.reduce((S, f) => { if (typeof f == "string") { const w = c.get(f); w && (v.fieldToRootMap.set(f, T), S.actualWidth += w.actualWidth, S.children.push(w)); } else { const w = o(f, c, S, T, v); y = Math.max(y, w.depth), S.actualWidth += w.actualWidth, S.children.push(w); } return S; }, O), O.depth += y; } return t.value.headerDepth = Math.max(t.value.headerDepth, O.depth), O; } function r(d) { const c = { groupedCells: /* @__PURE__ */ new Map(), fieldToRootMap: /* @__PURE__ */ new Map() }; return e.value && e.value.reduce((m, p) => { const v = o(p, d, null, null, c); return m.groupedCells.set(p.field, v), m; }, c), c; } function a(d) { if (!d || d.length === 0) return 0; const c = d[0]; return c.children && c.children.length > 0 && (c.left = a(c.children)), c.left; } function i(d, c) { const m = t.value.headerDepth; d.forEach((p) => { p.layer = c ? c.layer + 1 : 1; const v = p.children && p.children.length === 0; p.depth = v ? m - (p.layer - 1) : 1, p.left = v ? p.left : a(p.children), p.children && i(p.children, p); }); } function s(d, c) { const m = /* @__PURE__ */ new Map(); return d.forEach((p) => { const v = c.fieldToRootMap.get(p.field), O = v != null; O && !m.has(v.field) && m.set(v.field, v), O || m.set(p.field, p); }), i(Array.from(m.values())), m; } function l(d) { let c = /* @__PURE__ */ new Map(), m = 0; if (d.reduce((p, v) => { let O = nt.none; O = v.filterable ? O | nt.filterable : O, O = v.sort && v.sort !== "none" ? O | nt.sorted | (v.sort === "asc" ? nt.ascending : nt.descending) : O; const T = v.field; return p.set(T, { actualWidth: v.actualWidth || 0, children: [], depth: 1, layer: 1, left: m, field: T, parent: null, resizable: v.resizable === void 0 ? !0 : v.resizable, title: v.title, status: O, popoverRef: k(), showPopover: !1, column: v, filterValue: null, sortType: v.sort || "none", showSetting: v.showSetting, draggable: v.draggable }), m += v.actualWidth || 0, p; }, c), e.value) { const p = r(c); c = s(c, p); } return c; } return { getGridHeaderCells: l }; } function Ji(n, t) { var S; ea(); const { idField: e } = t, o = k(n.summary), r = k(n.group), a = k(((S = n.group) == null ? void 0 : S.groupFields) || []), i = z(() => { var f; return (f = n.group) == null ? void 0 : f.enable; }), s = z(() => { var f; return (f = n.group) == null ? void 0 : f.showGroupPanel; }), l = z(() => { const f = o.value; return (f == null ? void 0 : f.groupFields) || []; }), u = z(() => { const f = r.value; return f && f.showSummary; }), d = k(0), c = /* @__PURE__ */ new Map(); let m = []; function p(f, w, x, b, h) { const C = b[x]; C && (w.reduce((_, E, g) => { var M; const V = E[C]; let N = _.get(V); if (!N) { const I = l.value.reduce((q, $) => (q.set($, 0), q), /* @__PURE__ */ new Map()); N = { field: C, title: ((M = h.get(C)) == null ? void 0 : M.title) || C, value: V, layer: x, details: [], groupSummaries: I }, _.set(V, N); } return l.value && l.value.forEach((I) => { if (N) { const q = N.groupSummaries.get(I) || 0; N.groupSummaries.set(I, q + E[I]); } }), N.details.push(E), _; }, f), x < b.length - 1 && f.forEach((_, E) => { _.nestGroup = /* @__PURE__ */ new Map(), p(_.nestGroup, _.details, x + 1, b, h), _.details = []; })); } function v(f, w) { return n.group && n.group.formatter ? n.group.formatter(f.value, { ...f, total: w }) : `${f.title}:${f.value} (${w})`; } function O(f, w) { const x = []; return f.forEach((b) => { const h = { // 如果存在二级分组,分组行标识保持唯一 [e.value]: `group_of_${w ? w[e.value] + "_" : ""}${b.field}_${b.value}`, __fv_data_grid_group_collapse__: !1, __fv_data_grid_group_field__: b.field, __fv_data_grid_group_layer__: b.layer, __fv_data_grid_group_row__: !0, __fv_data_grid_group_value__: b.value }; let C = 0; if (x.push(h), b.nestGroup) { const _ = O(b.nestGroup, h); x.push(..._), C += _.length; } if (b.details && b.details.length && (x.push(...b.details), C += b.details.length), u.value) { const _ = { __fv_data_grid_group_field__: b.field, __fv_data_grid_group_layer__: b.layer, __fv_data_grid_group_summary__: !0 }; _[e.value] = `summary_of_${b.field}_${b.value}`, _[b.field] = Array.from(b.groupSummaries.entries()).reduce( (E, [g, V]) => `${E} ${g} total:${V} `, "" ), x.push(_); } b.groupSummaries && b.groupSummaries.size && b.groupSummaries.forEach((_, E) => { h[E] = _; }), h[b.field] = v(b, C), h.value = b.value; }), x.forEach((b, h) => { b.__fv_data_index__ = h; }), x; } function T(f, w, x) { return !f || f.length === 0 || !w.length ? w : (f.join(","), c.clear(), m = [], w = w.filter((b) => !b.__fv_data_grid_group_row__), p(c, w, 0, f, x), m = O(c), m); } function y(f) { return { "f-icon": !0, "f-icon-arrow-chevron-down": !0, "fv-grid-group-row-icon-collapse": f.collapse }; } return { collpaseGroupIconClass: y, generateGroupData: T, groupFields: a, shouldGroupingData: i, showGroupPanel: s, groupRowSize: d }; } function Zi(n, t, e, o) { const r = k(0), a = k(!!n.hierarchy), { idField: i } = o, { collapseField: s, hasChildrenField: l, parentIdField: u } = e, d = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(); function p(A, H) { c.clear(), A.reduce((Y, K) => { const J = K[u.value] !== void 0 ? K[u.value] : ""; if (J && H.has(J)) { const de = H.get(J), ve = isNaN(Number(de.__fv_layer__)) ? 1 : Number(de.__fv_layer__); K.__fv_layer__ = ve + 1, K.__fv_parent_index__ = de.__fv_index__, de.__fv_hasChildren__ = !0; } else K.__fv_layer__ = 1; const Z = Y.has(J) ? Y.get(J) : []; return Z.push(K), Y.set(J, Z), Y; }, c); } function v(A) { m.clear(), A.reduce((H, Y) => { const K = Y[i.value]; return H.set(K, Y), H; }, m); } function O(A) { A.forEach((H) => { const Y = H[i.value]; H.__fv_children_index__.map((J) => A[J]).forEach((J) => { J.__fv_parents__ = new Map([ ...H.__fv_parents__.entries(), [Y, !0] ]); }); }); } function T(A) { A.forEach((H) => { const Y = new Set(H.__fv_children_index__); H.__fv_children_index__ = [...Y].sort((K, J) => K - J); }); } function y(A) { A.forEach((H) => { const Y = H.__fv_parents__; Array.from(Y.keys()).map((K) => m.get(K)).forEach((K) => { K.__fv_children_index__.push(H.__fv_index__); }); }), T(A); } function S(A) { A.forEach((H) => { H.__fv_child_with_lines__ = [], H.__fv_child_length__ = H.__fv_descendant_index__.length, H.__fv_descendant_index__.map((Y) => A[Y]).reduce((Y, K) => (Y.__fv_child_length__ += K.__fv_children_index__.length, Y.__fv_child_with_lines__.push(...K.__fv_children_index__, K.__fv_index__), Y), H); }); } function f(A, H) { return { id: A, index: H, parentId: "", parentIndex: -1, parents: /* @__PURE__ */ new Map(), children: /* @__PURE__ */ new Map(), descendant: /* @__PURE__ */ new Map(), collapsed: !1, visibleInHierarchy: !0 }; } function w(A, H, Y) { Array.from(H.keys()).forEach((K) => { H.get(K).reduce((Z, de) => { const ve = de[i.value], Se = A.get(de[i.value]), De = A.get(K), Re = Y.get(K); return De && Re && (De.children.set(ve, Se), De.children.set(ve, Se), Se.parentId = K, Se.parentIndex = De.index, Se.parents.set(K, De)), Z; }, A); }); } function x(A) { A.children.forEach((Y) => { Y.parents = new Map([ ...A.parents.entries(), [A.id, A] ]), x(Y); }); } function b(A, H) { A.filter((Y) => Y[u.value] === void 0 || Y[u.value] === "").forEach((Y) => { const K = Y[i.value], J = H.get(K); x(J); }); } function h(A) { Array.from(A.values()).forEach((H) => { Array.from(H.parents.values()).forEach((Y) => { Y.descendant.set(H.id, H); }); }); } function C(A) { d.clear(), A.forEach((H, Y) => { const K = H[i.value]; d.set(K, f(K, Y)); }), v(A), p(A, m), w(d, c, m), b(A, d), h(d); } function _(A) { const H = A[i.value], Y = d.get(H); return Y && Y.children.size > 0; } function E(A) { return A[l.value] && !_(A); } function g(A) { const H = A[i.value], Y = d.get(H); return Y && Y.visibleInHierarchy; } function V() { r.value = Date.now(); } function N(A, H) { H.forEach((Y) => { const K = d.get(Y[i.value]), J = d.get(A), Z = m.get(A); J && Z && (K.visibleInHierarchy = !Z[s.value] && J.visibleInHierarchy); }), V(); } function M(A) { if (c.has(A)) { const Y = c.get(A); N(A, Y), Y.map((K) => K[i.value]).forEach((K) => M(K)); } } function I(A) { const H = A[i.value]; M(H); } function q(A, H, Y = 0) { A.forEach((K) => { const J = E(K), Z = K.__fv_layer__ <= Y, de = H === "ToCollapse" ? K.__fv_layer__ <= Y : !(K.__fv_layer__ <= Y), ve = Z ? de : K[s.value]; K[s.value] = J || ve; }); for (const [K, J] of c.entries()) N(K, J); return A; } function $(A, H) { q(A, "ToCollapse", H); } function B(A, H) { q(A, "ToExpand", H); } function P(A) { A.forEach((H, Y) => { var de; const K = H[i.value], J = c.has(K) ? (de = c.get(K)) == null ? void 0 : de.map((ve) => ve.__fv_index__) : [], Z = f(K, Y); H.__fv_graph_node__ = Z, H.__fv_children_index__ = J, H.__fv_descendant_index__ = [...J], H.__fv_parents__ = /* @__PURE__ */ new Map(), E(H) && (H[s.value] = !0); }); } function j(A) { var K, J; C(t.value), P(A), O(A), y(A), n.showLines && S(A); const Y = ((K = n.hierarchy) == null ? void 0 : K.collapseTo) !== void 0 ? Number((J = n.hierarchy) == null ? void 0 : J.collapseTo) : 0; return q(A, "ToCollapse", Y), A; } function F(A, H, Y) { const J = Y.value[A][i.value], Z = d.get(J); if (Z) { const de = d.get(Z.parentId); let ve = Y.value.length - 1; if (de) { const Se = Array.from(de.children.keys()).indexOf(Z.id); if (Se === de.children.size - 1) { const Re = Array.from(de.descendant.values())[de.descendant.size - 1]; ve = Y.value.findIndex((le) => le[i.value] === Re.id) + 1; } else { const Re = Array.from(de.children.values())[Se + 1]; ve = Y.value.findIndex((le) => le[i.value] === Re.id); } H[l.value] = !1, H[u.value] = de.id, Y.value.splice(ve, 0, H); } } } function R(A, H, Y) { const K = Y.value[A], J = K[i.value]; if (d.get(J)) { const ve = Y.value.findIndex((Se) => Se[i.value] === J) + 1; K[l.value] = !0, K[s.value] = !1, H[l.value] = !1, H[u.value] = J, Y.value.splice(ve, 0, H); } } function U(A, H) { const Y = A[i.value], K = d.get(Y), J = Array.from(K.descendant.keys()); J.unshift(Y); const Z = d.get(K.parentId); if (Z && (Z.children.delete(Y), Z.children.size === 0)) { const ve = H.find((Se) => Se[i.value] === K.parentId); ve[l.value] = !1, ve[s.value] = !1; } return H.filter((ve) => J.indexOf(ve.id) === -1); } return { checkVisibleInHierarchy: r, collapseTo: $, expandTo: B, generateHierarchyData: j, hasRealChildren: _, insertSibling: F, insertChild: R, isVisibleInTree: g, shouldStratifyData: a, toggleChildrenVisibiltyByCollapseStatus: I, trimmedOriginalData: U }; } const es = { 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 }, safeHtml: { type: Boolean, default: !0 } }, ts = { showCloseButton: { type: Boolean, default: !0 }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, pn = /* @__PURE__ */ ot({ name: "Toast", props: ts, emits: ["close", "click"], setup: (n, t) => { const e = k(n.animate), o = "fadeOut", r = z(() => n.options), a = k(!1), i = z(() => { const y = { animated: a.value, toast: !0 }; return y[n.animate] = !1, y[o] = a.value, y[r.value.type] = !0, r.value.theme && (y[r.value.theme] = !0), y; }), s = z(() => { const f = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, w = { "f-icon": !0 }; return w[f] = !0, w; }), l = z(() => r.value.title || r.value.message), u = z(() => r.value.title && r.value.message), d = z(() => !r.value.title && r.value.message), c = z(() => n.showCloseButton), m = z(() => !!r.value.buttons || !!t.slots.default); function p(y) { y.stopPropagation(), y.preventDefault(), a.value = !1, setTimeout(() => { t.emit("close", r.value); }, 200); } function v(y, S) { } function O(y) { return `f-preten-link ${y.customClass ? y.customClass : ""}`; } Fe(e, () => { e.value; }); const T = () => { var y; return D(Ut, null, [D("div", { class: "after-toast-msg text-right" }, [!t.slots.default && ((y = r.value.buttons) == null ? void 0 : y.map((S) => D("span", { class: O(S), onClick: (f) => void 0 }, [S.text]))), t.slots.default && t.slots.default()])]); }; return () => D("div", { class: i.value, style: "min-height:44px" }, [c.value && D("button", { title: "关闭", class: "toast-close f-btn-icon f-bare", onClick: p }, [D("span", { class: "f-icon modal_close" }, null)]), l.value && D("section", { class: "modal-tips" }, [D("div", { class: "float-left modal-tips-iconwrap" }, [D("span", { class: s.value }, null)]), D("div", { class: "modal-tips-content" }, [u.value && D(Ut, null, [D("h5", { class: "toast-title modal-tips-title", innerHTML: r.value.title }, null), D("p", { class: "toast-msg", innerHTML: r.value.message }, null), m.value && T()]), d.value && (r.value.buttons ? D("div", { class: "toast-title-btns-wrapper d-flex" }, [D("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }, null), D("div", { class: "after-toast-title text-right ml-auto" }, [T()])]) : D("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }