var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { M as e, cH as t, cI as o, cJ as a, ap as s, _ as c, cK as r, cL as n, cw as i, v as p, a6 as l, w as v, a4 as u } from "./index-8935f1b4.js";
import "./lodash-226cb5b1.js";
import { lA as m } from "./ant-design-icons-14ab96af.js";
import "./loglevel-5e7e37fc.js";
import "./axios-125479b5.js";
import "./redux-devtools-f8b1cd80.js";
import "./alasql-f59e855e.js";
import "./react-router-8d1fc2f1.js";
import "./antd-97b654da.js";
import "react";
import "react-dom";
import "./dayjs-7fc5ce65.js";
import "./fontawesome-89eb6278.js";
import "./dnd-kit-e67c9595.js";
import "./moment-d8baa15a.js";
import "./crypto-js-8020edb5.js";
import "./styled-components-c6abe9a3.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-2e4a9112.js";
import "./fetch-6a200310.js";
import "./react-draggable-fda4f1cb.js";
import "./remark-gfm-e9b5dec7.js";
import "./buffer-e20f80c8.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-cab52c82.js";
import "./react-best-gradient-color-picker-812be7ee.js";
import "./ua-parser-js-1d18a3f8.js";
import "./clsx-469c2c43.js";
import "./codemirror-edf161cb.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-1b0a458d.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-ae08f8b5.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-9e54e169.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-e4f7745b.js";
import "./katex-cda5b990.js";
import "./ecogis-maps-10bb29cf.js";
import "./devextreme-28d23085.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
const d = (e2) => m("div", {}), j = function() {
  const t2 = { v1: p("abc") };
  return new e(t2, (e2) => e2.v1).setPropertyViewFn(d).build();
}();
function x(e2) {
  return JSON.stringify(e2.toJsonValue());
}
test("test object create", () => {
  const e2 = new class {
    constructor() {
      __publicField(this, "a", 1);
      __publicField(this, "b", "abc");
    }
    getValue() {
      return this.a + 10;
    }
  }();
  expect(e2.a).toEqual(1), expect(e2.getValue()).toEqual(11);
  const t2 = Object.create(e2);
  t2.a = 2, expect(t2.a).toEqual(2), expect(t2.getValue()).toEqual(12), expect(e2.a).toEqual(1), expect(e2.getValue()).toEqual(11);
}), test("test action and reduce", () => {
  let e2 = new j({});
  expect(x(e2)).toEqual('{"v1":"abc"}'), e2 = e2.reduce(e2.changeChildAction("v1", "changed")), expect(x(e2)).toEqual('{"v1":"changed"}'), e2 = e2.reduce(e2.changeChildAction("v1", "changedXXXX")), expect(x(e2)).toEqual('{"v1":"changedXXXX"}');
}), test("test value constructor", () => {
  let e2 = new j({ value: { v1: "changed" } });
  expect(x(e2)).toEqual('{"v1":"changed"}');
});
const b = function() {
  const t2 = { v1: p("abc"), v2: j };
  return new e(t2, (e2) => e2).setPropertyViewFn(d).build();
}();
test("test multi2 toJson", () => {
  let e2 = new b({});
  const o2 = JSON.stringify(e2.toJsonValue());
  expect(o2).toEqual('{"v1":"abc","v2":{"v1":"abc"}}'), e2 = e2.reduce(t("v2", e2.children.v2.changeChildAction("v1", "changed"))), expect(x(e2)).toEqual('{"v1":"abc","v2":{"v1":"changed"}}');
  let a2 = new b({ value: JSON.parse(x(e2)) });
  expect(x(a2)).toEqual(x(e2));
}), test("test multi change action", () => {
  let e2 = new b({});
  expect(e2.getView().v1).toEqual("abc"), expect(e2.getView().v2).toEqual("abc");
  const t2 = o({ v1: a("v1_value", true), v2: s("v1", "xxxy", true) });
  e2 = e2.reduce(t2), expect(e2.getView().v1).toEqual("v1_value"), expect(e2.getView().v2).toEqual("xxxy");
});
const g = function() {
  const t2 = { v1: p("abc"), v2: b, v3: l };
  return new e(t2, (e2) => e2.v3).setPropertyViewFn(d).build();
}();
test("test multi toNode", () => {
  const e2 = new g({}).node().evaluate();
  expect(e2.v3.value).toEqual("");
}), test("test comp don't change if no value change", () => {
  let e2 = new g({});
  expect(c(e2)).toBe(e2);
}), test("test cache", () => {
  let e2 = c(new g({}));
  const t2 = e2.children.v1, o2 = e2.children.v2;
  e2 = e2.reduce(e2.changeChildAction("v1", "XXX")), expect(e2.children.v1.getView()).toEqual("XXX"), expect(e2.children.v1).not.toBe(t2), expect(e2.children.v2).toBe(o2), e2 = c(e2), expect(e2.node()).toBe(e2.node());
  const a2 = e2.node().evaluate();
  e2 = e2.reduce(r(a2));
  const s2 = e2.reduce(r(a2));
  expect(s2).toBe(e2), expect(e2.node().evaluate()).toBe(e2.node().evaluate()), expect(c(e2)).toBe(e2);
}), test("test code", () => {
  let t2 = new (function() {
    const t3 = { v1: v(l, "{{a.b}}") };
    return new e(t3, (e2) => e2.v1).setPropertyViewFn(d).build();
  }())({});
  const o2 = { a: n({ b: i("abc") }) };
  t2 = c(t2, o2), expect(t2.getView()).toEqual("abc");
}), test("removeDefault", () => {
  const t2 = function() {
    const t3 = { v0: l, v1: v(l, "{{a.b}}"), v2: u, v3: u.DEFAULT_TRUE };
    return new e(t3, (e2) => e2).setPropertyViewFn(d).build();
  }();
  expect(c(new t2({})).toJsonValue()).toEqual({ v1: "{{a.b}}", v3: true }), expect(c(new t2({ value: { v0: "", v1: "{{a.b}}", v2: false, v3: true } })).toJsonValue()).toEqual({ v1: "{{a.b}}", v3: true }), expect(c(new t2({ value: { v0: "bc", v1: "", v2: true, v3: false } })).toJsonValue()).toEqual({ v0: "bc", v1: "", v2: true, v3: false }), expect(c(new t2({ value: { v0: "bc", v1: "{{a.b}}", v2: true, v3: true } })).toJsonValue()).toEqual({ v0: "bc", v1: "{{a.b}}", v2: true, v3: true });
});
