import { ab as e, _ as t, cw as r, T as o, e9 as a, ea as s } from "./index-6d97e67f.js";
import { _ as i } from "./lodash-226cb5b1.js";
import "./ant-design-icons-a81e6d18.js";
import "./axios-0ffd51b8.js";
import "./redux-devtools-36ca30b8.js";
import "./alasql-f59e855e.js";
import "./react-router-38313ddc.js";
import "./antd-eb0b81b8.js";
import "react";
import "react-dom";
import "./dayjs-63343308.js";
import "./fontawesome-7bcd29b1.js";
import "./dnd-kit-e0a0bf75.js";
import "./moment-d731d247.js";
import "./crypto-js-8020edb5.js";
import "./styled-components-b776227d.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-6aa220db.js";
import "./websockets-80729b50.js";
import "./fetch-03ca8116.js";
import "./react-draggable-1ced44e5.js";
import "./clsx-b06d39d3.js";
import "./remark-gfm-72b87c7d.js";
import "./buffer-f89d742d.js";
import "./rehype-raw-49057806.js";
import "./parse5-31d0cb5d.js";
import "./rehype-sanitize-38a120e4.js";
import "./simplebar-react-a37a9b2a.js";
import "./react-best-gradient-color-picker-2e7ff36d.js";
import "./ua-parser-js-1d18a3f8.js";
import "./loglevel-5e7e37fc.js";
import "./codemirror-8fe65581.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-3b3a9c7b.js";
import "./hotkeys-js-216206c9.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-a03b99c9.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-7d152aa4.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-417e3716.js";
import "./katex-05fb1c31.js";
import "./ecogis-maps-10e82de5.js";
import "./devextreme-be18bda8.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
test("test column", () => {
  const r2 = { title: "name" };
  let o2 = new e({ value: r2 });
  o2 = t(o2);
  const a2 = o2.getView();
  expect(a2.title).toEqual(r2.title);
}), test("test column render", () => {
  let r2 = new e({ value: { render: { compType: "text", comp: { text: "{{currentRow.id}}" } } } });
  r2 = t(r2);
  const o2 = r2.getView();
  expect(o2.render({ currentCell: null, currentIndex: null, currentRow: { id: "hello" }, currentOriginalIndex: null }, "0").getView().view({}).props.normalView).toEqual("hello");
}), test("test table", async () => {
  const e2 = { data: JSON.stringify([{ a: 1 }]), columns: [{ dataIndex: "a", hide: true }, { title: "custom", dataIndex: "", isCustom: true }] }, a2 = { query1: r({ data: [{ q: 1 }] }), query2: r({ data: [{ q2: 2 }] }) };
  let s2 = new o({ dispatch: (e3) => {
    s2 = t(s2.reduce(e3), a2);
  }, value: e2 });
  s2 = t(s2);
  let i2 = s2.children.columns.getView();
  expect(i2.length).toEqual(2), s2 = t(s2.reduce(s2.changeChildAction("data", '[{"a":1, "c":2, "d":3}]'))), await new Promise((e3) => setTimeout(e3, 20)), i2 = s2.children.columns.getView(), expect(i2.length).toEqual(4), expect(i2[0].getView().dataIndex).toEqual("a"), expect(i2[0].getView().hide).toBe(true), expect(i2[1].getView().title).toEqual("custom"), expect(i2[2].getView().title).toEqual("c"), expect(i2[3].getView().title).toEqual("d");
}, 1e3), test("test mock table render", () => {
  let e2 = new a({});
  e2 = t(e2);
}), test("test table data transform", () => {
  function e2(e3, t2) {
    const r3 = t2.exposingValues.displayData, { data: o2 } = t2.getProps(), a3 = t2.filterData;
    return expect(o2.length).toEqual(3), expect(r3.length).toEqual(e3), expect(r3.map((e4) => i.omit(e4, "custom"))).toEqual(i.map(a3, (e4) => i.omit(e4, s))), { transformedData: a3, data: o2, displayData: r3 };
  }
  const r2 = { data: JSON.stringify([{ id: 1, name: "gg" }, { id: 5, name: "gg2" }, { id: 3, name: "jjj" }]), columns: [{ dataIndex: "id", isCustom: false, sortable: true, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { dataIndex: "name", isCustom: false, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { title: "custom", dataIndex: "ealekfg", isCustom: true, render: { compType: "image", comp: { src: "{{currentRow.id}}" } } }] };
  let a2 = new o({ dispatch: (e3) => {
    a2 = t(a2.reduce(e3));
  }, value: r2 });
  a2 = t(a2), a2 = t(a2.reduce(a2.changeChildAction("sort", [{ column: "id", desc: true }])));
  let { transformedData: m, data: l, displayData: p } = e2(3, a2);
  expect(m.map((e3) => e3.id)).toEqual([5, 3, 1]), a2 = t(a2.reduce(a2.changeChildAction("toolbar", { searchText: "gg" }))), e2(2, a2), a2 = t(a2.reduce(a2.changeChildAction("toolbar", { showFilter: true, filter: { stackType: "and", filters: [{ columnKey: "id", filterValue: "4", operator: "gt" }, { columnKey: "id", filterValue: "5", operator: "lte" }] } }))), e2(1, a2);
});
