import { ref as m, reactive as ae, watch as se, watchEffect as ie, unref as u, defineComponent as w, toRefs as ft, createVNode as v, isVNode as pt, getCurrentInstance as Z, inject as Ve, computed as h, onUnmounted as Se, h as Me, provide as Ge, onMounted as _e, nextTick as P, onBeforeUnmount as gt, resolveComponent as T, openBlock as y, createElementBlock as B, createElementVNode as Ke, normalizeClass as N, normalizeStyle as X, createBlock as k, resolveDynamicComponent as mt, withCtx as _, renderSlot as F, Fragment as Te, createCommentVNode as J, mergeProps as W, readonly as ht, resolveDirective as yt, withDirectives as vt, createTextVNode as pe, toDisplayString as ge, useSlots as bt, toRef as St, createSlots as Pe, renderList as ke, normalizeProps as Fe, guardReactiveProps as je, toRaw as ne } from "vue";
import { Modal as ze, Tooltip as me, Button as _t } from "ant-design-vue";
import { tryOnUnmounted as $e, useDebounceFn as Tt, tryOnMounted as $t, useMutationObserver as wt } from "@vueuse/core";
import { mergeWith as Ot, intersectionWith as Ct, isEqual as he, unionWith as Mt, omit as de } from "lodash-es";
import "dayjs";
import Pt from "resize-observer-polyfill";
import { FullscreenExitOutlined as kt, FullscreenOutlined as Ft, CloseOutlined as jt, InfoCircleOutlined as zt } from "@ant-design/icons-vue";
import Bt from "@purge-icons/generated";
const xt = {
  pagination: {
    totalItemText: "Total",
    goToText: "Go to"
  },
  accordion: {
    loading: "loading",
    noData: "No Data"
  },
  autoCompleteDropdown: {
    latestInput: "Latest input"
  },
  cascaderList: {
    noData: "No data"
  },
  colorPicker: {
    foundationPanel: "Foundation panel",
    advancedPanel: "Advanced panel"
  },
  datePickerPro: {
    ok: "OK",
    placeholder: "select date",
    month1: "Jan",
    month2: "Feb",
    month3: "Mar",
    month4: "Apr",
    month5: "May",
    month6: "June",
    month7: "July",
    month8: "Aug",
    month9: "Sep",
    month10: "Oct",
    month11: "Nov",
    month12: "Dec",
    year: "年",
    startPlaceholder: "select start date",
    endPlaceholder: "select end date",
    getWeekDays() {
      return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
    },
    getTimeArr() {
      return ["Hr", "Min", "Sec"];
    },
    getYearMonthStr(e, t) {
      return `${e} - ${t}`;
    }
  },
  editableSelect: {
    noRelatedRecords: "No related records found",
    noData: "No data"
  },
  input: {
    placeholder: "Please enter"
  },
  splitterBar: {
    collapse: "Collapse",
    expand: "Expand"
  },
  stepsGuide: {
    previous: "Previous",
    continue: "Continue",
    ok: "OK"
  },
  table: {
    selectAll: "Select all",
    ok: "OK"
  },
  timePopup: {
    ok: "OK"
  },
  transfer: {
    unit: "",
    panelUnit: "",
    headerUnit: "",
    noData: "No Data",
    placeholder: "Please enter keywords"
  },
  tree: {
    loading: "Loading",
    newNode: "New node",
    selectPlaceholder: "Please select"
  },
  upload: {
    save: "Save",
    upload: "Upload",
    imgUpload: "ImageUpload",
    uploaded: "Uploaded",
    operating: "Operating",
    del: "Delete",
    download: "download",
    saveWarn: "Please wait for the file to upload and save!",
    saveError: "There is no file successfully uploaded and cannot be saved!",
    preview: "Preview",
    choose: "Select the file",
    accept: "Support {0} format",
    acceptUpload: "Only upload files in {0} format",
    maxSize: "A single file does not exceed {0}MB ",
    maxSizeMultiple: "Only upload files up to {0}MB!",
    maxNumber: "Only upload up to {0} files",
    legend: "Legend",
    fileName: "File name",
    fileSize: "File size",
    fileStatue: "File status",
    startUpload: "Start upload",
    uploadSuccess: "Upload successfully",
    uploadError: "Upload failed",
    uploading: "Uploading",
    uploadWait: "Please wait for the file upload to finish",
    reUploadFailed: "Re-upload failed files",
    noFile: "The file does not exist!"
  },
  search: {
    placeholder: "Enter a keyword"
  },
  select: {
    placeholder: "Please select",
    noDataText: "No data",
    noMatchText: "No related records found",
    loadingText: "Loading..."
  },
  tagInput: {
    maxTagsText: "Maximum number reached: "
  },
  timeSelect: {
    placeholder: "Please select time"
  },
  modal: {
    cancelText: "Close",
    okText: "Confirm",
    close: "Close",
    maximize: "Maximize",
    restore: "Restore"
  },
  excel: {
    exportModalTitle: "Export data",
    fileType: "File type",
    fileName: "File name"
  },
  form: {
    putAway: "Put away",
    unfold: "Unfold",
    maxTip: "The number of characters should be less than {0}",
    apiSelectNotFound: "Wait for data loading to complete..."
  },
  previewFile: {
    notSupport: "The file does not support preview",
    download: "download"
  },
  signature: {
    deleteSelectedSignature: "Delete selected signature",
    deleteAllSignature: "Delete all signatures",
    page: "page",
    jumpTo: "jump to",
    dragTip: "Please select the following signature and drag it to the left file",
    selectTip: "Please select the signature",
    smallTip: "The signature can't be any smaller",
    deleteTip: "Please select the signature you want to delete",
    addSignature: "Add Signature"
  },
  common: {
    preview: "Preview",
    download: "Download",
    okText: "OK",
    closeText: "Close",
    cancelText: "Cancel",
    loadingText: "Loading...",
    saveText: "Save",
    submitText: "Submit",
    delText: "Delete",
    resetText: "Reset",
    searchText: "Search",
    queryText: "Search",
    inputText: "Please enter",
    chooseText: "Please choose",
    redo: "Refresh",
    back: "Back",
    light: "Light",
    dark: "Dark",
    zoomIn: "Zoom In",
    zoomOut: "Zoom Out",
    reset: "reset",
    enterFullScreen: "Full Screen",
    exitFullScreen: "Exit Full Screen"
  }
}, Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: xt
}, Symbol.toStringTag, { value: "Module" })), Nt = {
  pagination: {
    totalItemText: "所有条目",
    goToText: "跳至",
    perPage: "条/页"
  },
  accordion: {
    loading: "加载中",
    noData: "没有数据"
  },
  autoCompleteDropdown: {
    latestInput: "最近输入"
  },
  cascaderList: {
    noData: "没有数据"
  },
  colorPicker: {
    foundationPanel: "基础面板",
    advancedPanel: "高级面板"
  },
  datePickerPro: {
    ok: "确定",
    placeholder: "请选择日期",
    month1: "1月",
    month2: "2月",
    month3: "3月",
    month4: "4月",
    month5: "5月",
    month6: "6月",
    month7: "7月",
    month8: "8月",
    month9: "9月",
    month10: "10月",
    month11: "11月",
    month12: "12月",
    year: "年",
    startPlaceholder: "请选择开始日期",
    endPlaceholder: "请选择结束日期",
    getWeekDays() {
      return ["日", "一", "二", "三", "四", "五", "六"];
    },
    getTimeArr() {
      return ["时", "分", "秒"];
    },
    getYearMonthStr(e, t) {
      return `${e}年${t}月`;
    }
  },
  editableSelect: {
    noRelatedRecords: "找不到相关记录",
    noData: "没有数据"
  },
  input: {
    placeholder: "请输入"
  },
  splitterBar: {
    collapse: "收起",
    expand: "展开"
  },
  stepsGuide: {
    previous: "上一步",
    continue: "我知道啦，继续",
    ok: "我知道啦"
  },
  table: {
    selectAll: "全选",
    ok: "确定"
  },
  timePopup: {
    ok: "确定"
  },
  transfer: {
    unit: "项",
    panelUnit: "项",
    headerUnit: "项",
    noData: "暂无数据",
    placeholder: "请输入关键词搜索"
  },
  tree: {
    loading: "加载中",
    newNode: "新节点",
    selectPlaceholder: "请选择"
  },
  upload: {
    save: "保存",
    upload: "上传",
    imgUpload: "图片上传",
    uploaded: "已上传",
    operating: "操作",
    del: "删除",
    download: "下载",
    saveWarn: "请等待文件上传后，保存!",
    saveError: "没有上传成功的文件，无法保存!",
    preview: "预览",
    choose: "选择文件",
    accept: "支持{0}格式",
    acceptUpload: "只能上传{0}格式文件",
    maxSize: "单个文件不超过{0}MB",
    maxSizeMultiple: "只能上传不超过{0}MB的文件!",
    maxNumber: "最多只能上传{0}个文件",
    legend: "略缩图",
    fileName: "文件名",
    fileSize: "文件大小",
    fileStatue: "状态",
    startUpload: "开始上传",
    uploadSuccess: "上传成功",
    uploadError: "上传失败",
    uploading: "上传中",
    uploadWait: "请等待文件上传结束后操作",
    reUploadFailed: "重新上传失败文件",
    import: "导入",
    startImport: "开始导入",
    importing: "导入中",
    reImportFailed: "重新导入失败文件",
    noFile: "文件不存在！"
  },
  search: {
    placeholder: "请输入关键字"
  },
  select: {
    placeholder: "请选择",
    noDataText: "无数据",
    noMatchText: "找不到相关记录",
    loadingText: "加载中..."
  },
  tagInput: {
    maxTagsText: "已达到最大个数："
  },
  timeSelect: {
    placeholder: "请选择时间"
  },
  modal: {
    cancelText: "关闭",
    okText: "确认",
    close: "关闭",
    maximize: "最大化",
    restore: "还原"
  },
  excel: {
    exportModalTitle: "导出数据",
    fileType: "文件类型",
    fileName: "文件名"
  },
  form: {
    putAway: "收起",
    unfold: "展开",
    maxTip: "字符数应小于{0}位",
    apiSelectNotFound: "请等待数据加载完成..."
  },
  previewFile: {
    notSupport: "该文件不支持预览",
    download: "下载"
  },
  signature: {
    deleteSelectedSignature: "删除选中签名",
    deleteAllSignature: "删除全部签名",
    page: "页",
    jumpTo: "跳至",
    dragTip: "请选择以下签名并将其拖到左侧文件",
    selectTip: "请选择签名",
    smallTip: "已经最小了",
    deleteTip: "请选中你要删除的签名",
    addSignature: "新建电子签章"
  },
  common: {
    preview: "预览",
    download: "下载",
    okText: "确认",
    closeText: "关闭",
    cancelText: "取消",
    loadingText: "加载中...",
    saveText: "保存",
    submitText: "提交",
    delText: "删除",
    resetText: "重置",
    searchText: "搜索",
    queryText: "查询",
    inputText: "请输入",
    chooseText: "请选择",
    redo: "刷新",
    back: "返回",
    light: "亮色主题",
    dark: "黑暗主题",
    zoomIn: "放大",
    zoomOut: "缩小",
    reset: "还原",
    enterFullScreen: "全屏",
    exitFullScreen: "退出全屏"
  }
}, Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Nt
}, Symbol.toStringTag, { value: "Module" })), Be = /* @__PURE__ */ Object.assign({ "./lang/en.ts": Ht, "./lang/zh_cn.ts": Dt }), Xe = {};
Object.keys(Be).forEach((e) => {
  const t = Be[e].default || {};
  Xe[e] = t;
});
const xe = m("zh_cn"), Lt = () => {
  const e = ae({
    langMessages: Xe
  }), t = () => xe.value.toLocaleLowerCase();
  return {
    getLang: t,
    setLang: (o) => {
      xe.value = o;
    },
    getMessages: () => {
      const o = `./lang/${t()}.ts`;
      return e.langMessages[o];
    }
  };
};
function Rt(e, t) {
  const n = t.split(".");
  let r = e;
  return n.forEach((o) => {
    r = r[o] ?? "";
  }), r;
}
function Je() {
  return (e) => {
    const t = Lt().getMessages();
    return Rt(t, e);
  };
}
const He = Je(), Et = {
  visible: { type: Boolean },
  scrollTop: { type: Boolean, default: !0 },
  height: { type: Number },
  minHeight: { type: Number },
  // open drag
  draggable: { type: Boolean, default: !0 },
  centered: { type: Boolean },
  cancelText: { type: String, default: He("modal.cancelText") },
  okText: { type: String, default: He("modal.okText") },
  closeFunc: Function
}, we = Object.assign({}, Et, {
  defaultFullscreen: { type: Boolean },
  // Can it be full screen
  canFullscreen: { type: Boolean, default: !0 },
  // After enabling the wrapper, the bottom can be increased in height
  wrapperFooterOffset: { type: Number, default: 0 },
  // Warm reminder message
  helpMessage: [String, Array],
  // Whether to setting wrapper
  useWrapper: { type: Boolean, default: !0 },
  loading: { type: Boolean },
  loadingTip: { type: String },
  /**
   * @description: Show close button
   */
  showCancelBtn: { type: Boolean, default: !0 },
  /**
   * @description: Show confirmation button
   */
  showOkBtn: { type: Boolean, default: !0 },
  wrapperProps: Object,
  afterClose: Function,
  bodyStyle: Object,
  closable: { type: Boolean, default: !0 },
  closeIcon: Object,
  confirmLoading: { type: Boolean },
  destroyOnClose: { type: Boolean, default: !0 },
  footer: Object,
  getContainer: Function,
  mask: { type: Boolean, default: !0 },
  maskClosable: { type: Boolean, default: !0 },
  keyboard: { type: Boolean, default: !0 },
  maskStyle: Object,
  okType: { type: String, default: "primary" },
  okButtonProps: Object,
  cancelButtonProps: Object,
  title: { type: String },
  visible: { type: Boolean },
  width: [String, Number],
  wrapClassName: { type: String },
  zIndex: { type: Number }
}), ce = "G", Wt = Object.prototype.toString;
function Ze(e, t) {
  return Wt.call(e) === `[object ${t}]`;
}
function Qe(e) {
  return Ze(e, "String");
}
function ye(e) {
  return e && Array.isArray(e);
}
function Ne(e) {
  return e !== null && Ze(e, "Object");
}
function Q(e) {
  return typeof e == "function";
}
function At(e) {
  return typeof e < "u";
}
function It(e) {
  return !At(e);
}
function et(e, t, n = "replace") {
  return t ? e ? Ot({}, e, t, (r, o) => {
    if (ye(o) && ye(r))
      switch (n) {
        case "union":
          return Mt(r, o, he);
        case "intersection":
          return Ct(r, o, he);
        case "concat":
          return r.concat(o);
        case "replace":
          return o;
        default:
          throw new Error(
            `Unknown merge array strategy: ${n}`
          );
      }
    if (Ne(o) && Ne(r))
      return et(r, o, n);
  }) : t : e;
}
function tt(e, t = "default", n, r) {
  if (!e || !Reflect.has(e, t))
    return null;
  if (!Q(e[t]))
    return console.error(`${t} is not a function!`), null;
  const o = e[t];
  if (!o)
    return null;
  const a = {
    ...n,
    ...r
  };
  return o(a);
}
function Ut(e, t = []) {
  const n = Object.keys(e), r = {};
  return n.map((o) => {
    if (t.includes(o))
      return null;
    r[o] = (a) => tt(e, o, a);
  }), r;
}
const qt = "gopher-gui";
function nt(e) {
  throw new Error(`[${qt} error]:${e}`);
}
function De(e, t, n) {
  e && t && n && e.addEventListener(t, n, !1);
}
function Le(e, t, n) {
  e && t && n && e.removeEventListener(t, n, !1);
}
for (let e = 0; e <= 15; e++)
  e.toString(16);
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function Re(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function Yt(e) {
  var t, n;
  return Re(e) === !1 ? !1 : (t = e.constructor, t === void 0 ? !0 : (n = t.prototype, !(Re(n) === !1 || n.hasOwnProperty("isPrototypeOf") === !1)));
}
function G() {
  return G = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, G.apply(this, arguments);
}
function ot(e, t) {
  if (e == null)
    return {};
  var n, r, o = {}, a = Object.keys(e);
  for (r = 0; r < a.length; r++)
    t.indexOf(n = a[r]) >= 0 || (o[n] = e[n]);
  return o;
}
const ve = { silent: !1, logLevel: "warn" }, Vt = ["validator"], rt = Object.prototype, lt = rt.toString, Gt = rt.hasOwnProperty, at = /^\s*function (\w+)/;
function Ee(e) {
  var t;
  const n = (t = e == null ? void 0 : e.type) !== null && t !== void 0 ? t : e;
  if (n) {
    const r = n.toString().match(at);
    return r ? r[1] : "";
  }
  return "";
}
const L = Yt, st = (e) => e;
let S = st;
process.env.NODE_ENV !== "production" && (S = typeof console < "u" ? function(t, n = ve.logLevel) {
  ve.silent === !1 && console[n](`[VueTypes warn]: ${t}`);
} : st);
const A = (e, t) => Gt.call(e, t), Kt = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, I = Array.isArray || function(e) {
  return lt.call(e) === "[object Array]";
}, U = (e) => lt.call(e) === "[object Function]", le = (e) => L(e) && A(e, "_vueTypes_name"), it = (e) => L(e) && (A(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t) => A(e, t)));
function Oe(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function R(e, t, n = !1) {
  let r, o = !0, a = "";
  r = L(e) ? e : { type: e };
  const l = le(r) ? r._vueTypes_name + " - " : "";
  if (it(r) && r.type !== null) {
    if (r.type === void 0 || r.type === !0 || !r.required && t === void 0)
      return o;
    I(r.type) ? (o = r.type.some((s) => R(s, t, !0) === !0), a = r.type.map((s) => Ee(s)).join(" or ")) : (a = Ee(r), o = a === "Array" ? I(t) : a === "Object" ? L(t) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(s) {
      if (s == null)
        return "";
      const i = s.constructor.toString().match(at);
      return i ? i[1] : "";
    }(t) === a : t instanceof r.type);
  }
  if (!o) {
    const s = `${l}value "${t}" should be of type "${a}"`;
    return n === !1 ? (S(s), !1) : s;
  }
  if (A(r, "validator") && U(r.validator)) {
    const s = S, i = [];
    if (S = (c) => {
      i.push(c);
    }, o = r.validator(t), S = s, !o) {
      const c = (i.length > 1 ? "* " : "") + i.join(`
* `);
      return i.length = 0, n === !1 ? (S(c), o) : c;
    }
  }
  return o;
}
function $(e, t) {
  const n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(o) {
    return o === void 0 ? (A(this, "default") && delete this.default, this) : U(o) || R(this, o, !0) === !0 ? (this.default = I(o) ? () => [...o] : L(o) ? () => Object.assign({}, o) : o, this) : (S(`${this._vueTypes_name} - invalid default value: "${o}"`), this);
  } } }), { validator: r } = n;
  return U(r) && (n.validator = Oe(r, n)), n;
}
function j(e, t) {
  const n = $(e, t);
  return Object.defineProperty(n, "validate", { value(r) {
    return U(this.validator) && S(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = Oe(r, this), this;
  } });
}
function We(e, t, n) {
  const r = function(i) {
    const c = {};
    return Object.getOwnPropertyNames(i).forEach((d) => {
      c[d] = Object.getOwnPropertyDescriptor(i, d);
    }), Object.defineProperties({}, c);
  }(t);
  if (r._vueTypes_name = e, !L(n))
    return r;
  const { validator: o } = n, a = ot(n, Vt);
  if (U(o)) {
    let { validator: i } = r;
    i && (i = (s = (l = i).__original) !== null && s !== void 0 ? s : l), r.validator = Oe(i ? function(c) {
      return i.call(this, c) && o.call(this, c);
    } : o, r);
  }
  var l, s;
  return Object.assign(r, a);
}
function ue(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
const Xt = () => j("any", {}), Jt = () => j("function", { type: Function }), Zt = () => j("boolean", { type: Boolean }), Qt = () => j("string", { type: String }), en = () => j("number", { type: Number }), tn = () => j("array", { type: Array }), nn = () => j("object", { type: Object }), on = () => $("integer", { type: Number, validator: (e) => Kt(e) }), rn = () => $("symbol", { validator: (e) => typeof e == "symbol" });
function ln(e, t = "custom validation failed") {
  if (typeof e != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return $(e.name || "<<anonymous function>>", { type: null, validator(n) {
    const r = e(n);
    return r || S(`${this._vueTypes_name} - ${t}`), r;
  } });
}
function an(e) {
  if (!I(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const t = `oneOf - value should be one of "${e.join('", "')}".`, n = e.reduce((r, o) => {
    if (o != null) {
      const a = o.constructor;
      r.indexOf(a) === -1 && r.push(a);
    }
    return r;
  }, []);
  return $("oneOf", { type: n.length > 0 ? n : void 0, validator(r) {
    const o = e.indexOf(r) !== -1;
    return o || S(t), o;
  } });
}
function sn(e) {
  if (!I(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let t = !1, n = [];
  for (let o = 0; o < e.length; o += 1) {
    const a = e[o];
    if (it(a)) {
      if (le(a) && a._vueTypes_name === "oneOf" && a.type) {
        n = n.concat(a.type);
        continue;
      }
      if (U(a.validator) && (t = !0), a.type === !0 || !a.type) {
        S('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      n = n.concat(a.type);
    } else
      n.push(a);
  }
  n = n.filter((o, a) => n.indexOf(o) === a);
  const r = n.length > 0 ? n : null;
  return $("oneOfType", t ? { type: r, validator(o) {
    const a = [], l = e.some((s) => {
      const i = R(le(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, o, !0);
      return typeof i == "string" && a.push(i), i === !0;
    });
    return l || S(`oneOfType - provided value does not match any of the ${a.length} passed-in validators:
${ue(a.join(`
`))}`), l;
  } } : { type: r });
}
function cn(e) {
  return $("arrayOf", { type: Array, validator(t) {
    let n = "";
    const r = t.every((o) => (n = R(e, o, !0), n === !0));
    return r || S(`arrayOf - value validation error:
${ue(n)}`), r;
  } });
}
function un(e) {
  return $("instanceOf", { type: e });
}
function dn(e) {
  return $("objectOf", { type: Object, validator(t) {
    let n = "";
    const r = Object.keys(t).every((o) => (n = R(e, t[o], !0), n === !0));
    return r || S(`objectOf - value validation error:
${ue(n)}`), r;
  } });
}
function fn(e) {
  const t = Object.keys(e), n = t.filter((o) => {
    var a;
    return !((a = e[o]) === null || a === void 0 || !a.required);
  }), r = $("shape", { type: Object, validator(o) {
    if (!L(o))
      return !1;
    const a = Object.keys(o);
    if (n.length > 0 && n.some((l) => a.indexOf(l) === -1)) {
      const l = n.filter((s) => a.indexOf(s) === -1);
      return S(l.length === 1 ? `shape - required property "${l[0]}" is not defined.` : `shape - required properties "${l.join('", "')}" are not defined.`), !1;
    }
    return a.every((l) => {
      if (t.indexOf(l) === -1)
        return this._vueTypes_isLoose === !0 || (S(`shape - shape definition does not include a "${l}" property. Allowed keys: "${t.join('", "')}".`), !1);
      const s = R(e[l], o[l], !0);
      return typeof s == "string" && S(`shape - "${l}" property validation error:
 ${ue(s)}`), s === !0;
    });
  } });
  return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get() {
    return this._vueTypes_isLoose = !0, this;
  } }), r;
}
const pn = ["name", "validate", "getter"], gn = /* @__PURE__ */ (() => {
  var e;
  return (e = class {
    static get any() {
      return Xt();
    }
    static get func() {
      return Jt().def(this.defaults.func);
    }
    static get bool() {
      return Zt().def(this.defaults.bool);
    }
    static get string() {
      return Qt().def(this.defaults.string);
    }
    static get number() {
      return en().def(this.defaults.number);
    }
    static get array() {
      return tn().def(this.defaults.array);
    }
    static get object() {
      return nn().def(this.defaults.object);
    }
    static get integer() {
      return on().def(this.defaults.integer);
    }
    static get symbol() {
      return rn();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(t) {
      if (I(t))
        return t.forEach((i) => this.extend(i)), this;
      const { name: n, validate: r = !1, getter: o = !1 } = t, a = ot(t, pn);
      if (A(this, n))
        throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);
      const { type: l } = a;
      if (le(l))
        return delete a.type, Object.defineProperty(this, n, o ? { get: () => We(n, l, a) } : { value(...i) {
          const c = We(n, l, a);
          return c.validator && (c.validator = c.validator.bind(c, ...i)), c;
        } });
      let s;
      return s = o ? { get() {
        const i = Object.assign({}, a);
        return r ? j(n, i) : $(n, i);
      }, enumerable: !0 } : { value(...i) {
        const c = Object.assign({}, a);
        let d;
        return d = r ? j(n, c) : $(n, c), c.validator && (d.validator = c.validator.bind(d, ...i)), d;
      }, enumerable: !0 }, Object.defineProperty(this, n, s);
    }
  }).defaults = {}, e.sensibleDefaults = void 0, e.config = ve, e.custom = ln, e.oneOf = an, e.instanceOf = un, e.oneOfType = sn, e.arrayOf = cn, e.objectOf = dn, e.shape = fn, e.utils = { validate: (t, n) => R(n, t, !0) === !0, toType: (t, n, r = !1) => r ? j(t, n) : $(t, n) }, e;
})();
function ct(e = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var t;
  return (t = class extends gn {
    static get sensibleDefaults() {
      return G({}, this.defaults);
    }
    static set sensibleDefaults(n) {
      this.defaults = n !== !1 ? G({}, n !== !0 ? n : e) : {};
    }
  }).defaults = G({}, e), t;
}
class To extends ct() {
}
const mn = ct({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  object: void 0,
  integer: void 0
});
mn.extend([
  {
    name: "style",
    getter: !0,
    type: [String, Object],
    default: void 0
  },
  {
    name: "VNodeChild",
    getter: !0,
    type: void 0
  }
]);
function hn(e) {
  const t = m(!1);
  let n;
  function r() {
    t.value = !1, n && window.clearTimeout(n);
  }
  function o() {
    r(), n = setTimeout(() => {
      t.value = !0;
    }, e);
  }
  return o(), $e(r), { readyRef: t, stop: r, start: o };
}
function yn(e, t, n = !1) {
  if (!Q(e))
    throw new Error("handle is not Function!");
  const { readyRef: r, stop: o, start: a } = hn(t);
  return n ? e() : se(
    r,
    (l) => {
      l && e();
    },
    { immediate: !1 }
  ), { readyRef: r, stop: o, start: a };
}
function vn(e) {
  const t = (o, a) => getComputedStyle(o)[a], n = (o) => {
    if (!o)
      return;
    o.setAttribute("data-drag", u(e.draggable));
    const a = o.querySelector(".ant-modal-header"), l = o.querySelector(".ant-modal");
    !a || !l || !u(e.draggable) || (a.style.cursor = "move", a.onmousedown = (s) => {
      if (!s)
        return;
      const i = s.clientX, c = s.clientY, d = document.body.clientWidth, p = document.documentElement.clientHeight, g = l.offsetWidth, b = l.offsetHeight, O = l.offsetLeft, C = d - l.offsetLeft - g, M = l.offsetTop, D = p - l.offsetTop - b, z = t(l, "left"), q = t(l, "top");
      let Y = +z, V = +q;
      z.includes("%") ? (Y = +document.body.clientWidth * (+z.replace(/%/g, "") / 100), V = +document.body.clientHeight * (+q.replace(/%/g, "") / 100)) : (Y = +z.replace(/px/g, ""), V = +q.replace(/px/g, "")), document.onmousemove = function(te) {
        let f = te.clientX - i, H = te.clientY - c;
        -f > O ? f = -O : f > C && (f = C), -H > M ? H = -M : H > D && (H = D), l.style.cssText += `;left:${f + Y}px;top:${H + V}px;`;
      }, document.onmouseup = () => {
        document.onmousemove = null, document.onmouseup = null;
      };
    });
  }, r = () => {
    const o = document.querySelectorAll(".ant-modal-wrap");
    for (const a of Array.from(o)) {
      if (!a)
        continue;
      const l = t(a, "display"), s = a.getAttribute("data-drag");
      l !== "none" && (s === null || u(e.destroyOnClose)) && n(a);
    }
  };
  ie(() => {
    !u(e.visible) || !u(e.draggable) || yn(() => {
      r();
    }, 30);
  });
}
function bn(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !pt(e);
}
const Sn = /* @__PURE__ */ w({
  name: "Modal",
  inheritAttrs: !1,
  components: {
    Modal: ze
  },
  props: we,
  emits: ["cancel"],
  setup(e, {
    slots: t,
    emit: n,
    attrs: r
  }) {
    const {
      visible: o,
      draggable: a,
      destroyOnClose: l
    } = ft(e);
    vn({
      visible: o,
      destroyOnClose: l,
      draggable: a
    });
    const s = (i) => {
      n("cancel", i);
    };
    return () => {
      let i;
      const c = {
        ...u(r),
        ...e,
        onCancel: s
      };
      return v(ze, c, bn(i = Ut(t)) ? i : {
        default: () => [i]
      });
    };
  }
});
function _n(e, t = 150, n) {
  let r = () => {
    e();
  };
  r = Tt(r, t);
  const a = () => {
    n && n.immediate && r(), window.addEventListener("resize", r);
  }, l = () => {
    window.removeEventListener("resize", r);
  };
  return $t(() => {
    a();
  }), $e(() => {
    l();
  }), [a, l];
}
const Tn = typeof window > "u";
function $n(e) {
  for (const t of e) {
    const n = t.target.__resizeListeners__ || [];
    n.length && n.forEach((r) => {
      r();
    });
  }
}
function Ae(e, t) {
  Tn || (e.__resizeListeners__ || (e.__resizeListeners__ = [], e.__ro__ = new Pt($n), e.__ro__.observe(e)), e.__resizeListeners__.push(t));
}
function Ie(e, t) {
  !e || !e.__resizeListeners__ || (e.__resizeListeners__.splice(
    e.__resizeListeners__.indexOf(t),
    1
  ), e.__resizeListeners__.length || e.__ro__.disconnect());
}
const wn = {
  vertical: {
    offset: "offsetHeight",
    scroll: "scrollTop",
    scrollSize: "scrollHeight",
    size: "height",
    key: "vertical",
    axis: "Y",
    client: "clientY",
    direction: "top"
  },
  horizontal: {
    offset: "offsetWidth",
    scroll: "scrollLeft",
    scrollSize: "scrollWidth",
    size: "width",
    key: "horizontal",
    axis: "X",
    client: "clientX",
    direction: "left"
  }
};
function On({ move: e, size: t, bar: n }) {
  const r = {}, o = `translate${n.axis}(${e}%)`;
  return r[n.size] = t, r.transform = o, r.msTransform = o, r.webkitTransform = o, r;
}
function Cn(e, t) {
  return Object.assign(e, t);
}
function Mn(e) {
  const t = {};
  for (let n = 0; n < e.length; n++)
    e[n] && Cn(t, e[n]);
  return t;
}
const Pn = w({
  name: "Bar",
  props: {
    vertical: Boolean,
    size: String,
    move: Number
  },
  setup(e) {
    const t = Z(), n = m(), r = Ve(
      "scroll-bar-wrap",
      {}
    ), o = h(() => wn[e.vertical ? "vertical" : "horizontal"]), a = m({}), l = m(), s = (g) => {
      var D, z;
      if (l.value === !1)
        return;
      const b = a.value[o.value.axis];
      if (!b)
        return;
      const O = (((D = t == null ? void 0 : t.vnode.el) == null ? void 0 : D.getBoundingClientRect()[o.value.direction]) - g[o.value.client]) * -1, C = n.value[o.value.offset] - b, M = (O - C) * 100 / ((z = t == null ? void 0 : t.vnode.el) == null ? void 0 : z[o.value.offset]);
      r.value[o.value.scroll] = M * r.value[o.value.scrollSize] / 100;
    };
    function i() {
      l.value = !1, a.value[o.value.axis] = 0, Le(document, "mousemove", s), document.onselectstart = null;
    }
    const c = (g) => {
      g.stopImmediatePropagation(), l.value = !0, De(document, "mousemove", s), De(document, "mouseup", i), document.onselectstart = () => !1;
    }, d = (g) => {
      var b;
      g.ctrlKey || g.button === 2 || ((b = window.getSelection()) == null || b.removeAllRanges(), c(g), a.value[o.value.axis] = g.currentTarget[o.value.offset] - (g[o.value.client] - g.currentTarget.getBoundingClientRect()[o.value.direction]));
    }, p = (g) => {
      var M;
      const b = Math.abs(
        g.target.getBoundingClientRect()[o.value.direction] - g[o.value.client]
      ), O = n.value[o.value.offset] / 2, C = (b - O) * 100 / ((M = t == null ? void 0 : t.vnode.el) == null ? void 0 : M[o.value.offset]);
      r.value[o.value.scroll] = C * r.value[o.value.scrollSize] / 100;
    };
    return Se(() => {
      Le(document, "mouseup", i);
    }), () => Me(
      "div",
      {
        class: ["scrollbar__bar", "is-" + o.value.key],
        onMousedown: p
      },
      Me("div", {
        ref: n,
        class: "scrollbar__thumb",
        onMousedown: d,
        style: On({
          size: e.size,
          move: e.move,
          bar: o.value
        })
      })
    );
  }
}), kn = w({
  name: "Scrollbar",
  // inheritAttrs: false,
  components: { Bar: Pn },
  props: {
    native: {
      type: Boolean,
      default: !1
    },
    wrapStyle: {
      type: [String, Array],
      default: ""
    },
    wrapClass: {
      type: [String, Array],
      default: ""
    },
    viewClass: {
      type: [String, Array],
      default: ""
    },
    viewStyle: {
      type: [String, Array],
      default: ""
    },
    noresize: Boolean,
    // 如果 container 尺寸不会发生变化，最好设置它可以优化性能
    tag: {
      type: String,
      default: "div"
    }
  },
  setup(e) {
    const t = m("0"), n = m("0"), r = m(0), o = m(0), a = m(), l = m();
    Ge("scroll-bar-wrap", a);
    const s = h(() => Array.isArray(e.wrapStyle) ? Mn(e.wrapStyle) : e.wrapStyle), i = () => {
      e.native || (o.value = u(a).scrollTop * 100 / u(a).clientHeight, r.value = u(a).scrollLeft * 100 / u(a).clientWidth);
    }, c = () => {
      if (!u(a))
        return;
      const d = u(a).clientHeight * 100 / u(a).scrollHeight, p = u(a).clientWidth * 100 / u(a).scrollWidth;
      n.value = d < 100 ? d + "%" : "", t.value = p < 100 ? p + "%" : "";
    };
    return _e(() => {
      e.native || (P(c), e.noresize || (Ae(u(l), c), Ae(u(a), c), addEventListener("resize", c)));
    }), gt(() => {
      e.native || e.noresize || (Ie(u(l), c), Ie(u(a), c), removeEventListener("resize", c));
    }), {
      moveX: r,
      moveY: o,
      sizeWidth: t,
      sizeHeight: n,
      style: s,
      wrap: a,
      resize: l,
      update: c,
      handleScroll: i
    };
  }
});
const x = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [r, o] of t)
    n[r] = o;
  return n;
}, Fn = { class: "scrollbar" };
function jn(e, t, n, r, o, a) {
  const l = T("bar");
  return y(), B("div", Fn, [
    Ke("div", {
      ref: "wrap",
      class: N([
        e.wrapClass,
        "scrollbar__wrap",
        e.native ? "" : "scrollbar__wrap--hidden-default"
      ]),
      style: X(e.style),
      onScroll: t[0] || (t[0] = (...s) => e.handleScroll && e.handleScroll(...s))
    }, [
      (y(), k(mt(e.tag), {
        ref: "resize",
        class: N(["scrollbar__view", e.viewClass]),
        style: X(e.viewStyle)
      }, {
        default: _(() => [
          F(e.$slots, "default")
        ]),
        _: 3
      }, 8, ["class", "style"]))
    ], 38),
    e.native ? J("", !0) : (y(), B(Te, { key: 0 }, [
      v(l, {
        move: e.moveX,
        size: e.sizeWidth
      }, null, 8, ["move", "size"]),
      v(l, {
        vertical: "",
        move: e.moveY,
        size: e.sizeHeight
      }, null, 8, ["move", "size"])
    ], 64))
  ]);
}
const zn = /* @__PURE__ */ x(kn, [["render", jn]]), Bn = (e, t, n, r) => (e /= r / 2, e < 1 ? n / 2 * e * e + t : (e--, -n / 2 * (e * (e - 2) - 1) + t)), xn = (e, t) => {
  e.scrollTop = t;
}, Hn = (e) => e.scrollTop;
function Ue({
  el: e,
  to: t,
  duration: n = 500,
  callback: r
}) {
  const o = m(!1), a = Hn(e), l = t - a, s = 20;
  let i = 0;
  n = It(n) ? 500 : n;
  const c = function() {
    if (!u(o))
      return;
    i += s;
    const g = Bn(i, a, l, n);
    xn(e, g), i < n && u(o) ? requestAnimationFrame(c) : r && Q(r) && r();
  };
  return { start: () => {
    o.value = !0, c();
  }, stop: () => {
    o.value = !1;
  } };
}
const Nn = w({
  name: `${ce}ScrollContainer`,
  components: { Scrollbar: zn },
  setup() {
    const e = m(null);
    function t(o, a = 500) {
      const l = u(e);
      l && P(() => {
        const s = u(l.wrap);
        if (!s)
          return;
        const { start: i } = Ue({
          el: s,
          to: o,
          duration: a
        });
        i();
      });
    }
    function n() {
      const o = u(e);
      return o ? o.wrap : null;
    }
    function r() {
      const o = u(e);
      o && P(() => {
        const a = u(o.wrap);
        if (!a)
          return;
        const l = a.scrollHeight, { start: s } = Ue({
          el: a,
          to: l
        });
        s();
      });
    }
    return {
      scrollbarRef: e,
      scrollTo: t,
      scrollBottom: r,
      getScrollWrap: n
    };
  }
});
function Dn(e, t, n, r, o, a) {
  const l = T("Scrollbar");
  return y(), k(l, W({
    ref: "scrollbarRef",
    class: "scroll-container"
  }, e.$attrs), {
    default: _(() => [
      F(e.$slots, "default")
    ]),
    _: 3
  }, 16);
}
const re = /* @__PURE__ */ x(Nn, [["render", Dn]]);
re.install = function(e, t) {
  e.component(t || re.name, re);
};
function Ln(e, t = Symbol(), n = {}) {
  const { readonly: r = !0, createProvider: o = !1, native: a = !1 } = n, l = ae(e), s = r ? ht(l) : l;
  return !o && Ge(t, a ? e : s), {
    state: l
  };
}
function Rn(e = Symbol(), t) {
  return Ve(e, t || {});
}
const ut = Symbol();
function En(e) {
  return Ln(e, ut);
}
function $o() {
  return Rn(ut);
}
const Wn = {
  loading: { type: Boolean },
  useWrapper: { type: Boolean, default: !0 },
  modalHeaderHeight: { type: Number, default: 57 },
  modalFooterHeight: { type: Number, default: 74 },
  minHeight: { type: Number, default: 200 },
  height: { type: Number },
  footerOffset: { type: Number, default: 0 },
  visible: { type: Boolean },
  fullScreen: { type: Boolean },
  loadingTip: { type: String }
}, An = w({
  name: "ModalWrapper",
  components: { ScrollContainer: re },
  inheritAttrs: !1,
  props: Wn,
  emits: ["height-change", "ext-height"],
  setup(e, { emit: t }) {
    const n = m(null), r = m(null), o = m(0), a = m(0);
    let l = 0;
    _n(c.bind(null, !1)), wt(
      r,
      () => {
        c();
      },
      {
        attributes: !0,
        subtree: !0
      }
    ), En({
      redoModalHeight: c
    });
    const s = h(() => ({
      minHeight: `${e.minHeight}px`,
      [e.fullScreen ? "height" : "maxHeight"]: `${u(o)}px`
    }));
    ie(() => {
      e.useWrapper && c();
    }), se(
      () => e.fullScreen,
      (d) => {
        c(), d ? a.value = o.value : o.value = a.value;
      }
    ), _e(() => {
      const { modalHeaderHeight: d, modalFooterHeight: p } = e;
      t("ext-height", d + p);
    }), Se(() => {
    });
    async function i() {
      P(() => {
        var p;
        const d = u(n);
        d && ((p = d == null ? void 0 : d.scrollTo) == null || p.call(d, 0));
      });
    }
    async function c() {
      if (!e.visible)
        return;
      const d = u(n);
      if (!d)
        return;
      const p = d.$el.parentElement;
      if (p) {
        p.style.padding = "0", await P();
        try {
          const g = p.parentElement && p.parentElement.parentElement;
          if (!g)
            return;
          const b = getComputedStyle(g).top, O = Number.parseInt(b);
          let C = window.innerHeight - O * 2 + (e.footerOffset || 0) - e.modalFooterHeight - e.modalHeaderHeight;
          O < 40 && (C -= 26), await P();
          const M = u(r);
          if (!M)
            return;
          await P(), l = M.scrollHeight, e.fullScreen ? o.value = window.innerHeight - e.modalFooterHeight - e.modalHeaderHeight - 28 : o.value = e.height ? e.height : l > C ? C : l, t("height-change", u(o));
        } catch (g) {
          console.log(g);
        }
      }
    }
    return { wrapperRef: n, spinRef: r, spinStyle: s, scrollTop: i, setModalHeight: c };
  }
}), In = ["loading-tip"];
function Un(e, t, n, r, o, a) {
  const l = T("ScrollContainer"), s = yt("loading");
  return y(), k(l, { ref: "wrapperRef" }, {
    default: _(() => [
      vt((y(), B("div", {
        ref: "spinRef",
        style: X(e.spinStyle),
        "loading-tip": e.loadingTip
      }, [
        F(e.$slots, "default")
      ], 12, In)), [
        [s, e.loading]
      ])
    ]),
    _: 3
  }, 512);
}
const qn = /* @__PURE__ */ x(An, [["render", Un]]), qe = "g";
function oe(e, t, n) {
  let r = e;
  return t && (r += `__${t}`), n && (r += `--${n}`), r;
}
function ee(e, t = !1) {
  const n = t ? `.${qe}-${e}` : `${qe}-${e}`;
  return {
    b: () => oe(n),
    e: (s) => s ? oe(n, s) : "",
    m: (s) => s ? oe(n, "", s) : "",
    em: (s, i) => s && i ? oe(n, s, i) : ""
  };
}
const Yn = w({
  name: "ModalClose",
  components: {
    Tooltip: me,
    FullscreenExitOutlined: kt,
    FullscreenOutlined: Ft,
    CloseOutlined: jt
  },
  props: {
    canFullscreen: { type: Boolean, default: !0 },
    fullScreen: { type: Boolean }
  },
  emits: ["cancel", "fullscreen"],
  setup(e, { emit: t }) {
    const r = ee("basic-modal-close").b();
    Z();
    const o = Je(), a = h(() => [
      r,
      `${r}--custom`,
      {
        [`${r}--can-full`]: e.canFullscreen
      }
    ]);
    function l(i) {
      t("cancel", i);
    }
    function s(i) {
      i == null || i.stopPropagation(), i == null || i.preventDefault(), t("fullscreen");
    }
    return {
      t: o,
      getClass: a,
      prefixCls: r,
      handleCancel: l,
      handleFullScreen: s
    };
  }
});
function Vn(e, t, n, r, o, a) {
  const l = T("FullscreenExitOutlined"), s = T("Tooltip"), i = T("FullscreenOutlined"), c = T("CloseOutlined");
  return y(), B("div", {
    class: N(e.getClass)
  }, [
    e.canFullscreen ? (y(), B(Te, { key: 0 }, [
      e.fullScreen ? (y(), k(s, {
        key: 0,
        title: e.t("modal.restore"),
        placement: "bottom"
      }, {
        default: _(() => [
          v(l, {
            role: "full",
            onClick: e.handleFullScreen
          }, null, 8, ["onClick"])
        ]),
        _: 1
      }, 8, ["title"])) : (y(), k(s, {
        key: 1,
        title: e.t("modal.maximize"),
        placement: "bottom"
      }, {
        default: _(() => [
          v(i, {
            role: "close",
            onClick: e.handleFullScreen
          }, null, 8, ["onClick"])
        ]),
        _: 1
      }, 8, ["title"]))
    ], 64)) : J("", !0),
    v(s, {
      title: e.t("modal.close"),
      placement: "bottom"
    }, {
      default: _(() => [
        v(c, { onClick: e.handleCancel }, null, 8, ["onClick"])
      ]),
      _: 1
    }, 8, ["title"])
  ], 2);
}
const Gn = /* @__PURE__ */ x(Yn, [["render", Vn]]), Kn = w({
  name: "BasicModalFooter",
  props: we,
  components: {
    Button: _t
  },
  emits: ["ok", "cancel"],
  setup(e, { emit: t }) {
    function n(o) {
      t("ok", o);
    }
    function r(o) {
      t("cancel", o);
    }
    return { handleOk: n, handleCancel: r };
  }
});
function Xn(e, t, n, r, o, a) {
  const l = T("Button");
  return y(), B("div", null, [
    F(e.$slots, "insertFooter"),
    e.showCancelBtn ? (y(), k(l, W({ key: 0 }, e.cancelButtonProps, { onClick: e.handleCancel }), {
      default: _(() => [
        pe(ge(e.cancelText), 1)
      ]),
      _: 1
    }, 16, ["onClick"])) : J("", !0),
    F(e.$slots, "centerFooter"),
    e.showOkBtn ? (y(), k(l, W({
      key: 1,
      type: e.okType,
      onClick: e.handleOk,
      loading: e.confirmLoading
    }, e.okButtonProps), {
      default: _(() => [
        pe(ge(e.okText), 1)
      ]),
      _: 1
    }, 16, ["type", "onClick", "loading"])) : J("", !0),
    F(e.$slots, "appendFooter")
  ]);
}
const Jn = /* @__PURE__ */ x(Kn, [["render", Xn]]), Zn = w({
  name: `${ce}SvgIcon`,
  props: {
    prefix: {
      type: String,
      default: "icon"
    },
    name: {
      type: String,
      required: !0
    },
    size: {
      type: [Number, String],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const n = ee("svg-icon").b(), r = h(() => `#${e.prefix}-${e.name}`), o = h(() => {
      const { size: a } = e;
      let l = `${a}`;
      return l = `${l.replace("px", "")}px`, {
        width: l,
        height: l
      };
    });
    return { symbolId: r, prefixCls: n, getStyle: o };
  }
});
const Qn = ["xlink:href"];
function eo(e, t, n, r, o, a) {
  return y(), B("svg", {
    class: N([e.prefixCls, e.$attrs.class, e.spin && "svg-icon-spin"]),
    style: X(e.getStyle),
    "aria-hidden": "true"
  }, [
    Ke("use", { "xlink:href": e.symbolId }, null, 8, Qn)
  ], 6);
}
const to = /* @__PURE__ */ x(Zn, [["render", eo]]), Ye = "|svg", no = w({
  name: `${ce}Icon`,
  components: { SvgIcon: to },
  props: {
    // icon name
    icon: String,
    // icon color
    color: String,
    // icon size
    size: {
      type: [String, Number],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    },
    prefix: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    const t = m(null), n = h(() => {
      var s;
      return (s = e.icon) == null ? void 0 : s.endsWith(Ye);
    }), r = h(
      () => e.icon.replace(Ye, "")
    ), o = h(
      () => `${e.prefix ? e.prefix + ":" : ""}${e.icon}`
    ), a = async () => {
      if (u(n))
        return;
      const s = u(t);
      if (!s)
        return;
      await P();
      const i = u(o);
      if (!i)
        return;
      const c = Bt.renderSVG(i, {});
      if (c)
        s.textContent = "", s.appendChild(c);
      else {
        const d = document.createElement("span");
        d.className = "iconify", d.dataset.icon = i, s.textContent = "", s.appendChild(d);
      }
    }, l = h(() => {
      const { size: s, color: i } = e;
      let c = s;
      return Qe(s) && (c = parseInt(s, 10)), {
        fontSize: `${c}px`,
        color: i,
        display: "inline-flex"
      };
    });
    return se(() => e.icon, a, { flush: "post" }), _e(a), { elRef: t, getWrapStyle: l, isSvgIcon: n, getSvgIcon: r };
  }
});
function oo(e, t, n, r, o, a) {
  const l = T("SvgIcon");
  return e.isSvgIcon ? (y(), k(l, {
    key: 0,
    size: e.size,
    name: e.getSvgIcon,
    class: N([e.$attrs.class, "anticon"]),
    spin: e.spin
  }, null, 8, ["size", "name", "class", "spin"])) : (y(), B("span", {
    key: 1,
    ref: "elRef",
    class: N([e.$attrs.class, "app-iconify anticon", e.spin && "app-iconify-spin"]),
    style: X(e.getWrapStyle)
  }, null, 6));
}
const fe = /* @__PURE__ */ x(no, [["render", oo]]);
fe.install = function(e, t) {
  e.component(t || fe.name, fe);
};
const ro = {
  /**
   * Help text max-width
   * @default: 600px
   */
  maxWidth: {
    type: String,
    default: "600px"
  },
  /**
   * Whether to display the serial number
   * @default: false
   */
  showIndex: {
    type: Boolean
  },
  /**
   * Help text font color
   * @default: #ffffff
   */
  color: {
    type: String,
    default: "#ffffff"
  },
  /**
   * Help text font size
   * @default: 14px
   */
  fontSize: {
    type: String,
    default: "14px"
  },
  /**
   * Help text list
   */
  placement: {
    type: String,
    default: "right"
  },
  /**
   * Help text list
   */
  text: {
    type: [Array, String]
  }
}, lo = /* @__PURE__ */ w({
  name: "BasicHelp",
  components: {
    Tooltip: me
  },
  props: ro,
  setup(e, {
    slots: t
  }) {
    const r = ee("basic-help").b(), o = h(() => ({
      color: e.color,
      fontSize: e.fontSize
    })), a = h(() => ({
      maxWidth: e.maxWidth
    }));
    function l() {
      const i = e.text;
      return Qe(i) ? v("p", null, [i]) : ye(i) ? i.map((c, d) => v("p", {
        key: c
      }, [v(Te, null, [e.showIndex ? `${d + 1}. ` : "", c])])) : null;
    }
    function s(i) {
      return (i == null ? void 0 : i.parentNode) ?? document.body;
    }
    return () => v(me, {
      overlayClassName: `${r}__wrap`,
      title: v("div", {
        style: u(o)
      }, [l()]),
      autoAdjustOverflow: !0,
      overlayStyle: u(a),
      placement: e.placement,
      getPopupContainer: () => s()
    }, {
      default: () => [v("span", {
        class: r
      }, [tt(t) || v(zt, null, null)])]
    });
  }
});
const ao = /* @__PURE__ */ w({
  __name: "BasicTitle",
  props: {
    /**
     * Help text list or string
     * @default: ''
     */
    helpMessage: {
      type: [String, Array],
      default: ""
    },
    /**
     * Whether the color block on the left side of the title
     * @default: false
     */
    span: { type: Boolean },
    /**
     * Whether to default the text, that is, not bold
     * @default: false
     */
    normal: { type: Boolean }
  },
  setup(e) {
    const t = ee("basic-title"), n = e, r = t.b(), o = bt(), a = h(() => [
      r,
      { [`${r}-show-span`]: n.span && o.default },
      { [`${r}-normal`]: n.normal }
    ]);
    return (l, s) => (y(), B("span", {
      class: N(a.value)
    }, [
      F(l.$slots, "default"),
      e.helpMessage ? (y(), k(lo, {
        key: 0,
        class: N(`${u(r)}-help`),
        text: e.helpMessage
      }, null, 8, ["class", "text"])) : J("", !0)
    ], 2));
  }
});
const so = w({
  name: "BasicModalHeader",
  components: { BasicTitle: ao },
  props: {
    helpMessage: {
      type: [String, Array]
    },
    title: { type: String }
  },
  emits: ["dblclick"]
});
function io(e, t, n, r, o, a) {
  const l = T("BasicTitle");
  return y(), k(l, { helpMessage: e.helpMessage }, {
    default: _(() => [
      pe(ge(e.title), 1)
    ]),
    _: 1
  }, 8, ["helpMessage"]);
}
const co = /* @__PURE__ */ x(so, [["render", io]]);
function uo(e) {
  const t = m(!1), n = h(() => {
    const o = u(e.wrapClassName) || "";
    return u(t) ? `fullscreen-modal ${o} ` : u(o);
  });
  function r(o) {
    o && o.stopPropagation(), t.value = !u(t);
  }
  return { getWrapClassName: n, handleFullScreen: r, fullScreenRef: t };
}
const fo = w({
  name: `${ce}BasicModal`,
  components: { Modal: Sn, ModalWrapper: qn, ModalClose: Gn, ModalFooter: Jn, ModalHeader: co },
  inheritAttrs: !1,
  props: we,
  emits: [
    "visible-change",
    "height-change",
    "cancel",
    "ok",
    "register",
    "update:visible"
  ],
  setup(e, { emit: t, attrs: n }) {
    const r = m(!1), o = m(null), a = m(null), l = ee("basic-modal"), s = m(0), i = {
      setModalProps: z,
      emitVisible: void 0,
      redoModalHeight: () => {
        P(() => {
          u(a) && u(a).setModalHeight();
        });
      }
    }, c = Z();
    c && t("register", i, c.uid);
    const d = h(() => ({
      ...e,
      ...u(o)
    })), { handleFullScreen: p, getWrapClassName: g, fullScreenRef: b } = uo(
      {
        modalWrapperRef: a,
        extHeightRef: s,
        wrapClassName: St(d.value, "wrapClassName")
      }
    ), O = h(() => ({
      ...{
        ...u(d),
        visible: u(r),
        okButtonProps: void 0,
        cancelButtonProps: void 0,
        title: void 0
      },
      wrapClassName: u(g)
    })), C = h(() => {
      const f = {
        ...n,
        ...u(d),
        visible: u(r),
        wrapClassName: u(g)
      };
      return u(b) ? de(f, ["height", "title"]) : de(f, "title");
    }), M = h(() => {
      if (!u(b))
        return u(O).height;
    });
    ie(() => {
      r.value = !!e.visible, b.value = !!e.defaultFullscreen;
    }), se(
      () => u(r),
      (f) => {
        t("visible-change", f), t("update:visible", f), P(() => {
          e.scrollTop && f && u(a) && u(a).scrollTop();
        });
      },
      {
        immediate: !1
      }
    );
    async function D(f) {
      var H, Ce;
      if (f == null || f.stopPropagation(), !((Ce = (H = f.target) == null ? void 0 : H.classList) != null && Ce.contains(
        l.b() + "-close--custom"
      ))) {
        if (e.closeFunc && Q(e.closeFunc)) {
          const dt = await e.closeFunc();
          r.value = !dt;
          return;
        }
        r.value = !1, t("cancel", f);
      }
    }
    function z(f) {
      o.value = et(u(o) || {}, f), Reflect.has(f, "visible") && (r.value = !!f.visible), Reflect.has(f, "defaultFullscreen") && (b.value = !!f.defaultFullscreen);
    }
    function q(f) {
      t("ok", f);
    }
    function Y(f) {
      t("height-change", f);
    }
    function V(f) {
      s.value = f;
    }
    function te(f) {
      e.canFullscreen && (f.stopPropagation(), p(f));
    }
    return {
      handleCancel: D,
      getBindValue: C,
      getProps: O,
      handleFullScreen: p,
      fullScreenRef: b,
      getMergeProps: d,
      handleOk: q,
      visibleRef: r,
      omit: de,
      modalWrapperRef: a,
      handleExtHeight: V,
      handleHeightChange: Y,
      handleTitleDbClick: te,
      getWrapperHeight: M
    };
  }
});
function po(e, t, n, r, o, a) {
  const l = T("ModalClose"), s = T("ModalHeader"), i = T("ModalFooter"), c = T("ModalWrapper"), d = T("Modal", !0);
  return y(), k(d, W(e.getBindValue, { onCancel: e.handleCancel }), Pe({
    default: _(() => [
      v(c, W(
        {
          useWrapper: e.getProps.useWrapper,
          footerOffset: e.wrapperFooterOffset,
          fullScreen: e.fullScreenRef,
          ref: "modalWrapperRef",
          loading: e.getProps.loading,
          "loading-tip": e.getProps.loadingTip,
          minHeight: e.getProps.minHeight,
          height: e.getWrapperHeight,
          visible: e.visibleRef,
          modalFooterHeight: e.footer !== void 0 && !e.footer ? 0 : void 0
        },
        e.omit(e.getProps.wrapperProps, "visible", "height", "modalFooterHeight"),
        {
          onExtHeight: e.handleExtHeight,
          onHeightChange: e.handleHeightChange
        }
      ), {
        default: _(() => [
          F(e.$slots, "default")
        ]),
        _: 3
      }, 16, ["useWrapper", "footerOffset", "fullScreen", "loading", "loading-tip", "minHeight", "height", "visible", "modalFooterHeight", "onExtHeight", "onHeightChange"])
    ]),
    _: 2
  }, [
    e.$slots.closeIcon ? void 0 : {
      name: "closeIcon",
      fn: _(() => [
        v(l, {
          canFullscreen: e.getProps.canFullscreen,
          fullScreen: e.fullScreenRef,
          onCancel: e.handleCancel,
          onFullscreen: e.handleFullScreen
        }, null, 8, ["canFullscreen", "fullScreen", "onCancel", "onFullscreen"])
      ]),
      key: "0"
    },
    e.$slots.title ? void 0 : {
      name: "title",
      fn: _(() => [
        v(s, {
          helpMessage: e.getProps.helpMessage,
          title: e.getMergeProps.title,
          onDblclick: e.handleTitleDbClick
        }, null, 8, ["helpMessage", "title", "onDblclick"])
      ]),
      key: "1"
    },
    e.$slots.footer ? void 0 : {
      name: "footer",
      fn: _(() => [
        v(i, W(e.getBindValue, {
          onOk: e.handleOk,
          onCancel: e.handleCancel
        }), Pe({ _: 2 }, [
          ke(Object.keys(e.$slots), (p) => ({
            name: p,
            fn: _((g) => [
              F(e.$slots, p, Fe(je(g || {})))
            ])
          }))
        ]), 1040, ["onOk", "onCancel"])
      ]),
      key: "2"
    },
    ke(Object.keys(e.omit(e.$slots, "default")), (p) => ({
      name: p,
      fn: _((g) => [
        F(e.$slots, p, Fe(je(g || {})))
      ])
    }))
  ]), 1040, ["onCancel"]);
}
const K = /* @__PURE__ */ x(fo, [["render", po]]);
const E = ae({}), be = ae({});
function wo() {
  const e = m(null), t = m(!1), n = m("");
  function r(l, s) {
    if (!Z())
      throw new Error(
        "useModal() can only be used inside setup() or functional components!"
      );
    n.value = s, Se(() => {
      e.value = null, t.value = !1, E[u(n)] = null;
    }), !(u(t) && l === u(e)) && (e.value = l, t.value = !0, l.emitVisible = (i, c) => {
      be[c] = i;
    });
  }
  const o = () => {
    const l = u(e);
    return l || nt("useModal instance is undefined!"), l;
  }, a = {
    setModalProps: (l) => {
      var s;
      (s = o()) == null || s.setModalProps(l);
    },
    getVisible: h(() => be[~~u(n)]),
    redoModalHeight: () => {
      var l, s;
      (s = (l = o()) == null ? void 0 : l.redoModalHeight) == null || s.call(l);
    },
    openModal: (l = !0, s, i = !0) => {
      var p;
      if ((p = o()) == null || p.setModalProps({
        visible: l
      }), !s)
        return;
      const c = u(n);
      if (i) {
        E[c] = null, E[c] = ne(s);
        return;
      }
      he(ne(E[c]), ne(s)) || (E[c] = ne(s));
    },
    closeModal: () => {
      var l;
      (l = o()) == null || l.setModalProps({ visible: !1 });
    }
  };
  return [r, a];
}
const Oo = (e) => {
  const t = m(null), n = Z(), r = m(""), o = () => {
    const l = u(t);
    return l || nt("useModalInner instance is undefined!"), l;
  }, a = (l, s) => {
    $e(() => {
      t.value = null;
    }), r.value = s, t.value = l, n == null || n.emit("register", l, s);
  };
  return ie(() => {
    const l = E[u(r)];
    l && (!e || !Q(e) || P(() => {
      e(l);
    }));
  }), [
    a,
    {
      changeLoading: (l = !0) => {
        var s;
        (s = o()) == null || s.setModalProps({ loading: l });
      },
      getVisible: h(() => be[~~u(r)]),
      changeOkLoading: (l = !0) => {
        var s;
        (s = o()) == null || s.setModalProps({ confirmLoading: l });
      },
      closeModal: () => {
        var l;
        (l = o()) == null || l.setModalProps({ visible: !1 });
      },
      setModalProps: (l) => {
        var s;
        (s = o()) == null || s.setModalProps(l);
      },
      redoModalHeight: () => {
        var s;
        const l = (s = o()) == null ? void 0 : s.redoModalHeight;
        l && l();
      }
    }
  ];
};
K.install = function(e, t) {
  e.component(t || K.name, K);
};
const Co = {
  title: "Modal 对话框",
  category: "反馈",
  status: "100%",
  install(e) {
    e.component(K.name, K);
  }
};
export {
  K as BasicModal,
  Co as default,
  wo as useModal,
  $o as useModalContext,
  Oo as useModalInner
};
